forked from doberkofler/PLSQL-JSON
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjson_value.tps
29 lines (25 loc) · 989 Bytes
/
json_value.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 json_value IS OBJECT
(
typ CHAR(1), -- O=Object, A=array or NULL for all other basic types
nodes json_nodes, -- if typ is NULL the actual type is in the first and only node of the list
-- Default constructor
CONSTRUCTOR FUNCTION json_value(SELF IN OUT NOCOPY json_value) 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
);
/