|
69 | 69 | aNodeID := json_utils.addNode(theNodes=>SELF.nodes, theLastID=>SELF.lastID, theNode=>json_node(theName, theValue)); |
70 | 70 | END put; |
71 | 71 |
|
| 72 | +---------------------------------------------------------- |
| 73 | +-- put |
| 74 | +-- |
| 75 | +MEMBER PROCEDURE put(SELF IN OUT NOCOPY json_object, theName IN VARCHAR2, theValue IN DATE) |
| 76 | +IS |
| 77 | + aNodeID BINARY_INTEGER; |
| 78 | +BEGIN |
| 79 | + aNodeID := json_utils.addNode(theNodes=>SELF.nodes, theLastID=>SELF.lastID, theNode=>json_node(theName, theValue)); |
| 80 | +END put; |
| 81 | + |
72 | 82 | ---------------------------------------------------------- |
73 | 83 | -- put |
74 | 84 | -- |
|
87 | 97 | aNodeID BINARY_INTEGER; |
88 | 98 | BEGIN |
89 | 99 | -- add a new object node that will be used as the root for all the sub notes |
90 | | - aNodeID := json_utils.addNode(theNodes=>SELF.nodes, theLastID=>SELF.lastID, theNode=>json_node('O', theName, NULL, NULL, NULL, NULL, NULL)); |
| 100 | + aNodeID := json_utils.addNode(theNodes=>SELF.nodes, theLastID=>SELF.lastID, theNode=>json_node('O', theName, NULL, NULL, NULL, NULL, NULL, NULL)); |
91 | 101 |
|
92 | 102 | -- copy the sub-nodes |
93 | 103 | json_utils.copyNodes(theTargetNodes=>SELF.nodes, theTargetNodeID=>aNodeID, theLastID=>SELF.lastID, theName=>theName, theSourceNodes=>theValue.nodes); |
|
101 | 111 | aNodeID BINARY_INTEGER; |
102 | 112 | BEGIN |
103 | 113 | -- add a new object node that will be used as the root for all the sub notes |
104 | | - aNodeID := json_utils.addNode(theNodes=>SELF.nodes, theLastID=>SELF.lastID, theNode=>json_node(theValue.typ, theName, NULL, NULL, NULL, NULL, NULL)); |
| 114 | + aNodeID := json_utils.addNode(theNodes=>SELF.nodes, theLastID=>SELF.lastID, theNode=>json_node(theValue.typ, theName, NULL, NULL, NULL, NULL, NULL, NULL)); |
105 | 115 |
|
106 | 116 | -- copy the sub-nodes |
107 | 117 | json_utils.copyNodes(theTargetNodes=>SELF.nodes, theTargetNodeID=>aNodeID, theLastID=>SELF.lastID, theName=>theName, theSourceNodes=>theValue.nodes); |
@@ -179,13 +189,13 @@ END to_clob; |
179 | 189 | ---------------------------------------------------------- |
180 | 190 | -- htp |
181 | 191 | -- |
182 | | -MEMBER PROCEDURE htp(SELF IN json_object) |
| 192 | +MEMBER PROCEDURE htp(SELF IN json_object, theJSONP IN VARCHAR2 DEFAULT NULL) |
183 | 193 | IS |
184 | 194 | aLob CLOB := empty_clob(); |
185 | 195 | BEGIN |
186 | 196 | dbms_lob.createtemporary(aLob, TRUE); |
187 | 197 | SELF.to_clob(aLob); |
188 | | - json_utils.htp_output_clob(aLob); |
| 198 | + json_utils.htp_output_clob(aLob, theJSONP); |
189 | 199 | dbms_lob.freetemporary(aLob); |
190 | 200 | END htp; |
191 | 201 |
|
|
0 commit comments