@@ -722,10 +722,24 @@ static int dpiConn__getHandles(dpiConn *conn, dpiError *error)
722722}
723723
724724
725+ //-----------------------------------------------------------------------------
726+ // dpiConn__getJsonTDO() [INTERNAL]
727+ // Internal method used for ensuring that the JSON TDO has been cached on the
728+ // connection.
729+ //-----------------------------------------------------------------------------
730+ int dpiConn__getJsonTDO (dpiConn * conn , dpiError * error )
731+ {
732+ if (conn -> jsonTDO )
733+ return DPI_SUCCESS ;
734+ return dpiOci__typeByName (conn , "SYS" , 3 , "JSON" , 4 , & conn -> jsonTDO ,
735+ error );
736+ }
737+
738+
725739//-----------------------------------------------------------------------------
726740// dpiConn__getRawTDO() [INTERNAL]
727741// Internal method used for ensuring that the RAW TDO has been cached on the
728- //connection.
742+ // connection.
729743//-----------------------------------------------------------------------------
730744int dpiConn__getRawTDO (dpiConn * conn , dpiError * error )
731745{
@@ -2126,6 +2140,43 @@ int dpiConn_newEnqOptions(dpiConn *conn, dpiEnqOptions **options)
21262140}
21272141
21282142
2143+ //-----------------------------------------------------------------------------
2144+ // dpiConn_newJson() [PUBLIC]
2145+ // Create a new JSON object and return it.
2146+ //-----------------------------------------------------------------------------
2147+ int dpiConn_newJson (dpiConn * conn , dpiJson * * json )
2148+ {
2149+ dpiError error ;
2150+ int status ;
2151+
2152+ if (dpiConn__check (conn , __func__ , & error ) < 0 )
2153+ return dpiGen__endPublicFn (conn , DPI_FAILURE , & error );
2154+ DPI_CHECK_PTR_NOT_NULL (conn , json );
2155+ status = dpiJson__allocate (conn , json , & error );
2156+ return dpiGen__endPublicFn (conn , status , & error );
2157+ }
2158+
2159+
2160+ //-----------------------------------------------------------------------------
2161+ // dpiConn_newJsonQueue() [PUBLIC]
2162+ // Create a new AQ queue object with JSON payload and return it.
2163+ //-----------------------------------------------------------------------------
2164+ int dpiConn_newJsonQueue (dpiConn * conn , const char * name , uint32_t nameLength ,
2165+ dpiQueue * * queue )
2166+ {
2167+ dpiError error ;
2168+ int status ;
2169+
2170+ if (dpiConn__check (conn , __func__ , & error ) < 0 )
2171+ return dpiGen__endPublicFn (conn , DPI_FAILURE , & error );
2172+ DPI_CHECK_PTR_AND_LENGTH (conn , name )
2173+ DPI_CHECK_PTR_NOT_NULL (conn , queue )
2174+ status = dpiQueue__allocate (conn , name , nameLength , NULL , queue , 1 ,
2175+ & error );
2176+ return dpiGen__endPublicFn (conn , status , & error );
2177+ }
2178+
2179+
21292180//-----------------------------------------------------------------------------
21302181// dpiConn_newTempLob() [PUBLIC]
21312182// Create a new temporary LOB and return it.
@@ -2194,7 +2245,7 @@ int dpiConn_newQueue(dpiConn *conn, const char *name, uint32_t nameLength,
21942245 DPI_CHECK_PTR_AND_LENGTH (conn , name )
21952246 DPI_CHECK_PTR_NOT_NULL (conn , queue )
21962247 status = dpiQueue__allocate (conn , name , nameLength , payloadType , queue ,
2197- & error );
2248+ 0 , & error );
21982249 return dpiGen__endPublicFn (conn , status , & error );
21992250}
22002251
0 commit comments