-
Notifications
You must be signed in to change notification settings - Fork 15
/
jsonvalue.tps
29 lines (25 loc) · 988 Bytes
/
jsonvalue.tps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
CREATE OR REPLACE
TYPE jsonValue IS OBJECT
(
typ VARCHAR(1), -- O=Object, A=array or NULL for all other basic types
nodes jsonNodes, -- if typ is NULL the actual type is in the first and only node of the list
-- Default constructor
CONSTRUCTOR FUNCTION jsonValue(SELF IN OUT NOCOPY jsonValue) RETURN SELF AS RESULT,
-- Member getter methods
MEMBER FUNCTION get_type RETURN VARCHAR2,
MEMBER FUNCTION get_name RETURN VARCHAR2,
MEMBER FUNCTION get_string RETURN VARCHAR2,
MEMBER FUNCTION get_lob RETURN CLOB,
MEMBER FUNCTION get_number RETURN NUMBER,
MEMBER FUNCTION get_date RETURN DATE,
MEMBER FUNCTION get_bool RETURN BOOLEAN,
MEMBER FUNCTION is_object RETURN BOOLEAN,
MEMBER FUNCTION is_array RETURN BOOLEAN,
MEMBER FUNCTION is_string RETURN BOOLEAN,
MEMBER FUNCTION is_lob RETURN BOOLEAN,
MEMBER FUNCTION is_number RETURN BOOLEAN,
MEMBER FUNCTION is_date RETURN BOOLEAN,
MEMBER FUNCTION is_bool RETURN BOOLEAN,
MEMBER FUNCTION is_null RETURN BOOLEAN
);
/