SequoiaDB
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
client.h
Go to the documentation of this file.
1 /*******************************************************************************
2 
3  Copyright (C) 2011-2018 SequoiaDB Ltd.
4 
5  Licensed under the Apache License, Version 2.0 (the "License");
6  you may not use this file except in compliance with the License.
7  You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16 *******************************************************************************/
21 #ifndef CLIENT_H__
22 #define CLIENT_H__
23 #include "core.h"
24 #include "ossTypes.h"
25 #include "bson/bson.h"
26 #include "jstobs.h"
27 #include "spd.h"
28 #include "clientDef.h"
29 
30 SDB_EXTERN_C_START
31 
33 #define SDB_PAGESIZE_4K 4096
34 
35 #define SDB_PAGESIZE_8K 8192
36 
37 #define SDB_PAGESIZE_16K 16384
38 
39 #define SDB_PAGESIZE_32K 32768
40 
41 #define SDB_PAGESIZE_64K 65536
42 
43 #define SDB_PAGESIZE_DEFAULT 0
44 
46 {
47  SDB_LOB_CREATEONLY = 0x00000001,
48  SDB_LOB_READ = 0x00000004,
49  SDB_LOB_WRITE = 0x00000008,
50  SDB_LOB_SHAREREAD = 0x00000040
51 } ;
56 
58 {
62 } ;
67 
69 #define SDB_INVALID_HANDLE ((ossValuePtr) 0)
70 
71 typedef ossValuePtr sdbConnectionHandle ;
73 typedef ossValuePtr sdbCSHandle ;
75 typedef ossValuePtr sdbCollectionHandle ;
77 typedef ossValuePtr sdbCursorHandle ;
79 typedef ossValuePtr sdbReplicaGroupHandle ;
81 typedef ossValuePtr sdbNodeHandle ;
83 typedef ossValuePtr sdbDomainHandle ;
85 typedef ossValuePtr sdbLobHandle ;
87 typedef ossValuePtr sdbDCHandle ;
89 typedef ossValuePtr sdbSequenceHandle ;
90 
92 typedef void (*ERROR_ON_REPLY_FUNC)( const CHAR *pErrorObj,
93  UINT32 objSize,
94  INT32 flag,
95  const CHAR *pDescription,
96  const CHAR *pDetail ) ;
97 
102 SDB_EXPORT void sdbSetErrorOnReplyCallback( ERROR_ON_REPLY_FUNC func ) ;
103 
106 
108 #define sdbCreateReplicaNode sdbCreateNode
109 
110 #define sdbRemoveReplicaNode sdbRemoveNode
111 
112 #define sdbGetReplicaNodeMaster sdbGetNodeMaster
113 
114 #define sdbGetReplicaNodeSlave sdbGetNodeSlave
115 
116 #define sdbGetReplicaNodeByName sdbGetNodeByName
117 
118 #define sdbGetReplicaNodeByHost sdbGetNodeByHost
119 
120 #define sdbGetReplicaNodeSddr sdbGetNodeAddr
121 
122 #define sdbStartReplicaNode sdbStartNode
123 
124 #define sdbStopReplicaNode sdbStopNode
125 
126 #define sdbReleaseReplicaNode sdbReleaseNode
127 
129 #define QUERY_FORCE_HINT 0x00000080
130 
131 #define QUERY_PARALLED 0x00000100
132 
133 #define QUERY_WITH_RETURNDATA 0x00000200
134 
135 #define QUERY_PREPARE_MORE 0x00004000
136 
137 #define QUERY_KEEP_SHARDINGKEY_IN_UPDATE 0x00008000
138 
143 #define QUERY_FOR_UPDATE 0x00010000
144 
145 
147 #define FLG_INSERT_CONTONDUP 0x00000001
148 
149 // #define FLG_INSERT_RETURNNUM 0x00000002
151 #define FLG_INSERT_REPLACEONDUP 0x00000004
152 
153 #define FLG_INSERT_RETURN_OID 0x10000000
154 
156 #define UPDATE_KEEP_SHARDINGKEY QUERY_KEEP_SHARDINGKEY_IN_UPDATE
157 
158 // #define UPDATE_RETURNNUM 0x00000004
159 
161 // #define FLG_DELETE_RETURNNUM 0x00000004
162 
169 SDB_EXPORT INT32 initClient( sdbClientConf* config ) ;
170 
186 SDB_EXPORT INT32 sdbGetPasswdByCipherFile( const CHAR *pUsrName,
187  const CHAR *pToken,
188  const CHAR *pCipherFile,
189  CHAR *pUser, CHAR *pPasswd ) ;
190 
205 SDB_EXPORT INT32 sdbConnect ( const CHAR *pHostName, const CHAR *pServiceName,
206  const CHAR *pUsrName, const CHAR *pPasswd ,
207  sdbConnectionHandle *handle ) ;
208 
221 SDB_EXPORT INT32 sdbConnect1 ( const CHAR **pConnAddrs, INT32 arrSize,
222  const CHAR *pUsrName, const CHAR *pPasswd ,
223  sdbConnectionHandle *handle ) ;
224 
239 SDB_EXPORT INT32 sdbSecureConnect ( const CHAR *pHostName, const CHAR *pServiceName,
240  const CHAR *pUsrName, const CHAR *pPasswd ,
241  sdbConnectionHandle *handle ) ;
242 
255 SDB_EXPORT INT32 sdbSecureConnect1 ( const CHAR **pConnAddrs, INT32 arrSize,
256  const CHAR *pUsrName, const CHAR *pPasswd ,
257  sdbConnectionHandle *handle ) ;
258 
263 SDB_EXPORT void sdbDisconnect ( sdbConnectionHandle handle ) ;
264 
274 SDB_EXPORT INT32 sdbCreateUsr( sdbConnectionHandle cHandle, const CHAR *pUsrName,
275  const CHAR *pPasswd ) ;
276 
286 SDB_EXPORT INT32 sdbRemoveUsr( sdbConnectionHandle cHandle, const CHAR *pUsrName,
287  const CHAR *pPasswd ) ;
288 
289 /* \fn INT32 sdbModifyConfig ( sdbConnectionHandle cHandle,
290  bson *config )
291  \brief Modify config for the current node
292  \param [in] cHandle The connection handle
293  \param [in] config The new configurations
294  \retval SDB_OK Modify Success
295  \retval Others Modify Fail
296 
297 SDB_EXPORT INT32 sdbModifyConfig ( sdbConnectionHandle cHandle,
298  bson *config ) ;*/
299 
300 /* \fn INT32 sdbModifyNodeConfig ( sdbConnectionHandle cHandle,
301  INT32 nodeID,
302  bson *config )
303  \brief Modify config for a given node
304  \param [in] cHandle The connection handle
305  \param [in] nodeID The node id that want to be modified
306  \param [in] config The new configurations
307  \retval SDB_OK Modify Success
308  \retval Others Modify Fail
309 
310 SDB_EXPORT INT32 sdbModifyNodeConfig ( sdbConnectionHandle cHandle,
311  INT32 nodeID,
312  bson *config ) ;*/
313 
337 SDB_EXPORT INT32 sdbGetDataBlocks ( sdbCollectionHandle cHandle,
338  bson *condition,
339  bson *select,
340  bson *orderBy,
341  bson *hint,
342  INT64 numToSkip,
343  INT64 numToReturn,
344  sdbCursorHandle *handle );
345 
367 SDB_EXPORT INT32 sdbGetQueryMeta ( sdbCollectionHandle cHandle,
368  bson *condition,
369  bson *orderBy,
370  bson *hint,
371  INT64 numToSkip,
372  INT64 numToReturn,
373  sdbCursorHandle *handle ) ;
374 
410 SDB_EXPORT INT32 sdbGetSnapshot ( sdbConnectionHandle cHandle,
411  INT32 snapType,
412  bson *condition,
413  bson *selector,
414  bson *orderBy,
415  sdbCursorHandle *handle ) ;
416 
459 SDB_EXPORT INT32 sdbGetSnapshot1 ( sdbConnectionHandle cHandle,
460  INT32 snapType,
461  bson *condition,
462  bson *selector,
463  bson *orderBy,
464  bson *hint,
465  INT64 numToSkip,
466  INT64 numToReturn,
467  sdbCursorHandle *handle ) ;
468 
493 SDB_EXPORT INT32 sdbResetSnapshot ( sdbConnectionHandle cHandle,
494  bson *options ) ;
495 
538 SDB_EXPORT INT32 sdbTraceStart ( sdbConnectionHandle cHandle,
539  UINT32 traceBufferSize,
540  CHAR * component,
541  CHAR * breakPoint ,
542  UINT32 *tids,
543  UINT32 nTids ) ;
550 SDB_EXPORT INT32 sdbTraceResume ( sdbConnectionHandle cHandle ) ;
551 
560 SDB_EXPORT INT32 sdbTraceStop ( sdbConnectionHandle cHandle,
561  const CHAR *pDumpFileName ) ;
562 
571 SDB_EXPORT INT32 sdbTraceStatus ( sdbConnectionHandle cHandle,
572  sdbCursorHandle *handle ) ;
573 
609 SDB_EXPORT INT32 sdbGetList ( sdbConnectionHandle cHandle,
610  INT32 listType,
611  bson *condition,
612  bson *selector,
613  bson *orderBy,
614  sdbCursorHandle *handle ) ;
615 
659 SDB_EXPORT INT32 sdbGetList1( sdbConnectionHandle cHandle,
660  INT32 listType,
661  bson *condition,
662  bson *selector,
663  bson *orderBy,
664  bson *hint,
665  INT64 numToSkip,
666  INT64 numToReturn,
667  sdbCursorHandle *handle ) ;
668 
679 SDB_EXPORT INT32 sdbGetCollection ( sdbConnectionHandle cHandle,
680  const CHAR *pCollectionFullName,
681  sdbCollectionHandle *handle ) ;
682 
693 SDB_EXPORT INT32 sdbGetCollectionSpace ( sdbConnectionHandle cHandle,
694  const CHAR *pCollectionSpaceName,
695  sdbCSHandle *handle ) ;
696 
707 SDB_EXPORT INT32 sdbGetReplicaGroup ( sdbConnectionHandle cHandle,
708  const CHAR *pRGName,
709  sdbReplicaGroupHandle *handle ) ;
710 
721 SDB_EXPORT INT32 sdbGetReplicaGroup1 ( sdbConnectionHandle cHandle,
722  UINT32 id,
723  sdbReplicaGroupHandle *handle ) ;
724 
734 SDB_EXPORT INT32 sdbGetReplicaGroupName ( sdbReplicaGroupHandle cHandle,
735  CHAR **ppRGName ) ;
736 
746 SDB_EXPORT INT32 sdbGetRGName ( sdbReplicaGroupHandle cHandle,
747  CHAR *pBuffer, INT32 size ) ;
748 
755 SDB_EXPORT BOOLEAN sdbIsReplicaGroupCatalog ( sdbReplicaGroupHandle cHandle ) ;
756 
778 SDB_EXPORT INT32 sdbCreateCollectionSpace ( sdbConnectionHandle cHandle,
779  const CHAR *pCollectionSpaceName,
780  INT32 iPageSize,
781  sdbCSHandle *handle ) ;
782 
800 SDB_EXPORT INT32 sdbCreateCollectionSpaceV2 ( sdbConnectionHandle cHandle,
801  const CHAR *pCollectionSpaceName,
802  bson *options,
803  sdbCSHandle *handle ) ;
804 
813 SDB_EXPORT INT32 sdbDropCollectionSpace ( sdbConnectionHandle cHandle,
814  const CHAR *pCollectionSpaceName ) ;
815 
826 SDB_EXPORT INT32 sdbCreateReplicaGroup ( sdbConnectionHandle cHandle,
827  const CHAR *pRGName,
828  sdbReplicaGroupHandle *handle ) ;
829 
838 SDB_EXPORT INT32 sdbRemoveReplicaGroup ( sdbConnectionHandle cHandle,
839  const CHAR *pRGName ) ;
840 
847 SDB_EXPORT INT32 sdbStartReplicaGroup ( sdbReplicaGroupHandle cHandle ) ;
848 
857 SDB_EXPORT INT32 sdbGetNodeMaster ( sdbReplicaGroupHandle cHandle,
858  sdbNodeHandle *handle ) ;
859 
869 SDB_EXPORT INT32 sdbGetNodeSlave ( sdbReplicaGroupHandle cHandle,
870  sdbNodeHandle *handle ) ;
871 
886 SDB_EXPORT INT32 sdbGetNodeSlave1 ( sdbReplicaGroupHandle cHandle,
887  const INT32 *positionsArray,
888  INT32 positionsCount,
889  sdbNodeHandle *handle ) ;
890 
891 
903 SDB_EXPORT INT32 sdbGetNodeByName ( sdbReplicaGroupHandle cHandle,
904  const CHAR *pNodeName,
905  sdbNodeHandle *handle ) ;
906 
920 SDB_EXPORT INT32 sdbGetNodeByHost ( sdbReplicaGroupHandle cHandle,
921  const CHAR *pHostName,
922  const CHAR *pServiceName,
923  sdbNodeHandle *handle ) ;
924 
939 SDB_EXPORT INT32 sdbGetNodeAddr ( sdbNodeHandle cHandle,
940  const CHAR **ppHostName,
941  const CHAR **ppServiceName,
942  const CHAR **ppNodeName,
943  INT32 *pNodeID ) ;
944 
951 SDB_EXPORT INT32 sdbStartNode ( sdbNodeHandle cHandle ) ;
952 
959 SDB_EXPORT INT32 sdbStopNode ( sdbNodeHandle cHandle ) ;
960 
967 SDB_EXPORT INT32 sdbStopReplicaGroup ( sdbReplicaGroupHandle cHandle ) ;
968 
983 SDB_EXPORT INT32 sdbCreateReplicaCataGroup ( sdbConnectionHandle cHandle,
984  const CHAR *pHostName,
985  const CHAR *pServiceName,
986  const CHAR *pDatabasePath,
987  bson *configure );
988 
1003 SDB_EXPORT INT32 sdbCreateNode ( sdbReplicaGroupHandle cHandle,
1004  const CHAR *pHostName,
1005  const CHAR *pServiceName,
1006  const CHAR *pDatabasePath,
1007  bson *configure ) ;
1008 
1021 SDB_EXPORT INT32 sdbRemoveNode ( sdbReplicaGroupHandle cHandle,
1022  const CHAR *pHostName,
1023  const CHAR *pServiceName,
1024  bson *configure ) ;
1025 
1034 SDB_EXPORT INT32 sdbListCollectionSpaces ( sdbConnectionHandle cHandle,
1035  sdbCursorHandle *handle ) ;
1036 
1045 SDB_EXPORT INT32 sdbListCollections ( sdbConnectionHandle cHandle,
1046  sdbCursorHandle *handle ) ;
1047 
1057 SDB_EXPORT INT32 sdbListSequences ( sdbConnectionHandle cHandle,
1058  sdbCursorHandle *handle ) ;
1059 
1068 SDB_EXPORT INT32 sdbListReplicaGroups ( sdbConnectionHandle cHandle,
1069  sdbCursorHandle *handle ) ;
1070 
1093 SDB_EXPORT INT32 sdbFlushConfigure( sdbConnectionHandle cHandle,
1094  bson *options ) ;
1095 
1104 SDB_EXPORT INT32 sdbCrtJSProcedure( sdbConnectionHandle cHandle,
1105  const CHAR *code ) ;
1106 
1115 SDB_EXPORT INT32 sdbRmProcedure( sdbConnectionHandle cHandle,
1116  const CHAR *spName ) ;
1117 
1118 
1129 SDB_EXPORT INT32 sdbListProcedures( sdbConnectionHandle cHandle,
1130  bson *condition,
1131  sdbCursorHandle *handle ) ;
1132 
1149 SDB_EXPORT INT32 sdbEvalJS( sdbConnectionHandle cHandle,
1150  const CHAR *code,
1151  SDB_SPD_RES_TYPE *type,
1152  sdbCursorHandle *handle,
1153  bson *errmsg ) ;
1154 
1165 SDB_EXPORT INT32 sdbGetCollection1 ( sdbCSHandle cHandle,
1166  const CHAR *pCollectionName,
1167  sdbCollectionHandle *handle ) ;
1168 
1182 SDB_EXPORT INT32 sdbCreateCollection ( sdbCSHandle cHandle,
1183  const CHAR *pCollectionName,
1184  sdbCollectionHandle *handle ) ;
1185 
1202 SDB_EXPORT INT32 sdbCreateCollection1 ( sdbCSHandle cHandle,
1203  const CHAR *pCollectionName,
1204  bson *options,
1205  sdbCollectionHandle *handle ) ;
1206 
1229 SDB_EXPORT INT32 sdbAlterCollection ( sdbCollectionHandle cHandle,
1230  bson *options ) ;
1231 
1240 SDB_EXPORT INT32 sdbDropCollection ( sdbCSHandle cHandle,
1241  const CHAR *pCollectionName ) ;
1242 
1252 SDB_EXPORT INT32 sdbGetCSName ( sdbCSHandle cHandle,
1253  CHAR *pBuffer, INT32 size ) ;
1254 
1267 SDB_EXPORT INT32 sdbRenameCollection( sdbCSHandle cHandle,
1268  const CHAR *pOldName,
1269  const CHAR *pNewName,
1270  bson *options ) ;
1271 
1285 SDB_EXPORT INT32 sdbAlterCollectionSpace ( sdbCSHandle cHandle,
1286  bson * options ) ;
1287 
1299 SDB_EXPORT INT32 sdbCSSetDomain ( sdbCSHandle cHandle,
1300  bson * options ) ;
1301 
1308 SDB_EXPORT INT32 sdbCSRemoveDomain ( sdbCSHandle cHandle ) ;
1309 
1315 SDB_EXPORT INT32 sdbCSEnableCapped ( sdbCSHandle cHandle ) ;
1316 
1323 SDB_EXPORT INT32 sdbCSDisableCapped ( sdbCSHandle cHandle ) ;
1324 
1338 SDB_EXPORT INT32 sdbCSSetAttributes ( sdbCSHandle cHandle,
1339  bson * options ) ;
1340 
1350 SDB_EXPORT INT32 sdbGetCLName ( sdbCollectionHandle cHandle,
1351  CHAR *pBuffer, INT32 size ) ;
1352 
1362 SDB_EXPORT INT32 sdbGetCLFullName ( sdbCollectionHandle cHandle,
1363  CHAR *pBuffer, INT32 size ) ;
1364 
1383 SDB_EXPORT INT32 sdbSplitCollection ( sdbCollectionHandle cHandle,
1384  const CHAR *pSourceRG,
1385  const CHAR *pTargetRG,
1386  const bson *pSplitCondition,
1387  const bson *pSplitEndCondition ) ;
1388 
1409 SDB_EXPORT INT32 sdbSplitCLAsync ( sdbCollectionHandle cHandle,
1410  const CHAR *pSourceRG,
1411  const CHAR *pTargetRG,
1412  const bson *pSplitCondition,
1413  const bson *pSplitEndCondition,
1414  SINT64 *taskID ) ;
1415 
1428 SDB_EXPORT INT32 sdbSplitCollectionByPercent ( sdbCollectionHandle cHandle,
1429  const CHAR *pSourceRG,
1430  const CHAR *pTargetRG,
1431  FLOAT64 percent ) ;
1432 
1447 SDB_EXPORT INT32 sdbSplitCLByPercentAsync ( sdbCollectionHandle cHandle,
1448  const CHAR *pSourceRG,
1449  const CHAR *pTargetRG,
1450  FLOAT64 percent,
1451  SINT64 *taskID ) ;
1452 
1468 SDB_EXPORT INT32 sdbCreateIndex ( sdbCollectionHandle cHandle,
1469  bson *indexDef,
1470  const CHAR *pIndexName,
1471  BOOLEAN isUnique,
1472  BOOLEAN isEnforced ) ;
1473 
1492 SDB_EXPORT INT32 sdbCreateIndex1 ( sdbCollectionHandle cHandle,
1493  bson *indexDef,
1494  const CHAR *pIndexName,
1495  BOOLEAN isUnique,
1496  BOOLEAN isEnforced,
1497  INT32 sortBufferSize ) ;
1498 
1519 SDB_EXPORT INT32 sdbCreateIndex2 ( sdbCollectionHandle cHandle,
1520  bson *indexDef,
1521  const CHAR *pIndexName,
1522  bson *options ) ;
1523 
1535 SDB_EXPORT INT32 sdbGetIndexes ( sdbCollectionHandle cHandle,
1536  const CHAR *pIndexName,
1537  sdbCursorHandle *handle ) ;
1538 
1549 SDB_EXPORT INT32 sdbGetIndex ( sdbCollectionHandle cHandle,
1550  const CHAR *pIndexName,
1551  bson *info ) ;
1552 
1553 
1562 SDB_EXPORT INT32 sdbGetIndexInfo ( sdbCollectionHandle cHandle,
1563  sdbCursorHandle *handle ) ;
1564 
1565 
1574 SDB_EXPORT INT32 sdbDropIndex ( sdbCollectionHandle cHandle,
1575  const CHAR *pIndexName ) ;
1576 
1587 SDB_EXPORT INT32 sdbGetCount ( sdbCollectionHandle cHandle,
1588  bson *condition,
1589  SINT64 *count );
1590 
1591 
1607 SDB_EXPORT INT32 sdbGetCount1 ( sdbCollectionHandle cHandle,
1608  bson *condition,
1609  bson *hint,
1610  SINT64 *count );
1611 
1620 SDB_EXPORT INT32 sdbInsert ( sdbCollectionHandle cHandle,
1621  bson *obj ) ;
1622 
1641 SDB_EXPORT INT32 sdbInsert1 ( sdbCollectionHandle cHandle,
1642  bson *obj, bson_iterator *pId ) ;
1643 
1644 
1688 SDB_EXPORT INT32 sdbInsert2 ( sdbCollectionHandle cHandle,
1689  bson *obj, INT32 flags, bson *pResult ) ;
1690 
1747 SDB_EXPORT INT32 sdbBulkInsert ( sdbCollectionHandle cHandle,
1748  SINT32 flags, bson **objs, SINT32 num ) ;
1749 
1795 SDB_EXPORT INT32 sdbBulkInsert2 ( sdbCollectionHandle cHandle,
1796  SINT32 flags, bson **objs,
1797  SINT32 num,
1798  bson *pResult ) ;
1799 
1816 SDB_EXPORT INT32 sdbUpdate ( sdbCollectionHandle cHandle,
1817  bson *rule,
1818  bson *condition,
1819  bson *hint ) ;
1820 
1843 SDB_EXPORT INT32 sdbUpdate1 ( sdbCollectionHandle cHandle,
1844  bson *rule,
1845  bson *condition,
1846  bson *hint,
1847  INT32 flag ) ;
1848 
1865 SDB_EXPORT INT32 sdbUpsert ( sdbCollectionHandle cHandle,
1866  bson *rule,
1867  bson *condition,
1868  bson *hint ) ;
1869 
1888 SDB_EXPORT INT32 sdbUpsert1 ( sdbCollectionHandle cHandle,
1889  bson *rule,
1890  bson *condition,
1891  bson *hint,
1892  bson *setOnInsert ) ;
1893 
1918 SDB_EXPORT INT32 sdbUpsert2 ( sdbCollectionHandle cHandle,
1919  bson *rule,
1920  bson *condition,
1921  bson *hint,
1922  bson *setOnInsert,
1923  INT32 flag ) ;
1924 
1938 SDB_EXPORT INT32 sdbDelete ( sdbCollectionHandle cHandle,
1939  bson *condition,
1940  bson *hint ) ;
1941 
1973 SDB_EXPORT INT32 sdbQuery1 ( sdbCollectionHandle cHandle,
1974  bson *condition,
1975  bson *select,
1976  bson *orderBy,
1977  bson *hint,
1978  INT64 numToSkip,
1979  INT64 numToReturn,
1980  INT32 flags,
1981  sdbCursorHandle *handle ) ;
1982 
1983 
2007 SDB_EXPORT INT32 sdbQuery ( sdbCollectionHandle cHandle,
2008  bson *condition,
2009  bson *select,
2010  bson *orderBy,
2011  bson *hint,
2012  INT64 numToSkip,
2013  INT64 numToReturn,
2014  sdbCursorHandle *handle ) ;
2015 
2052 SDB_EXPORT INT32 sdbQueryAndUpdate ( sdbCollectionHandle cHandle,
2053  bson *condition,
2054  bson *select,
2055  bson *orderBy,
2056  bson *hint,
2057  bson *update,
2058  INT64 numToSkip,
2059  INT64 numToReturn,
2060  INT32 flag,
2061  BOOLEAN returnNew,
2062  sdbCursorHandle *handle ) ;
2063 
2095 SDB_EXPORT INT32 sdbQueryAndRemove ( sdbCollectionHandle cHandle,
2096  bson *condition,
2097  bson *select,
2098  bson *orderBy,
2099  bson *hint,
2100  INT64 numToSkip,
2101  INT64 numToReturn,
2102  INT32 flag,
2103  sdbCursorHandle *handle ) ;
2104 
2141 SDB_EXPORT INT32 sdbExplain ( sdbCollectionHandle cHandle,
2142  bson *condition,
2143  bson *select,
2144  bson *orderBy,
2145  bson *hint,
2146  INT32 flag,
2147  INT64 numToSkip,
2148  INT64 numToReturn,
2149  bson *options,
2150  sdbCursorHandle *handle ) ;
2151 
2160 SDB_EXPORT INT32 sdbNext ( sdbCursorHandle cHandle,
2161  bson *obj ) ;
2162 
2171 SDB_EXPORT INT32 sdbCurrent ( sdbCursorHandle cHandle,
2172  bson *obj ) ;
2173 
2174 /* \fn INT32 sdbUpdateCurrent ( sdbCursorHandle cHandle, bson *rule )
2175  \brief Update the current document of cursor
2176  \param [in] cHandle The cursor handle
2177  \param [in] rule The updating rule, cannot be null
2178  \retval SDB_OK Operation Success
2179  \retval Others Operation Fail
2180 */
2181 /*
2182 SDB_EXPORT INT32 sdbUpdateCurrent ( sdbCursorHandle cHandle,
2183  bson *rule ) ;
2184 */
2185 /* \fn INT32 sdbDeleteCurrent ( sdbCursorHandle cHandle )
2186  \brief Delete the current document of cursor
2187  \param [in] cHandle The cursor handle
2188  \retval SDB_OK Operation Success
2189  \retval Others Operation Fail
2190 */
2191 /*
2192 SDB_EXPORT INT32 sdbDeleteCurrent ( sdbCursorHandle cHandle ) ;
2193 */
2194 
2203 SDB_EXPORT INT32 sdbCloseCursor ( sdbCursorHandle cHandle ) ;
2204 
2212 SDB_EXPORT INT32 sdbCloseAllCursors ( sdbConnectionHandle cHandle ) ;
2213 
2221 SDB_EXPORT INT32 sdbInterrupt ( sdbConnectionHandle cHandle ) ;
2222 
2232 SDB_EXPORT INT32 sdbInterruptOperation ( sdbConnectionHandle cHandle ) ;
2233 
2234 
2245 SDB_EXPORT INT32 sdbExec( sdbConnectionHandle cHandle,
2246  const CHAR *sql,
2247  sdbCursorHandle *result );
2248 
2257 SDB_EXPORT INT32 sdbExecUpdate( sdbConnectionHandle cHandle,
2258  const CHAR *sql ) ;
2259 
2266 SDB_EXPORT INT32 sdbTransactionBegin( sdbConnectionHandle cHandle ) ;
2267 
2274 SDB_EXPORT INT32 sdbTransactionCommit( sdbConnectionHandle cHandle ) ;
2275 
2282 SDB_EXPORT INT32 sdbTransactionRollback( sdbConnectionHandle cHandle ) ;
2283 
2288 SDB_EXPORT void sdbReleaseConnection ( sdbConnectionHandle cHandle ) ;
2289 
2294 SDB_EXPORT void sdbReleaseCollection ( sdbCollectionHandle cHandle ) ;
2295 
2300 SDB_EXPORT void sdbReleaseCS ( sdbCSHandle cHandle ) ;
2301 
2306 SDB_EXPORT void sdbReleaseCursor ( sdbCursorHandle cHandle ) ;
2307 
2312 SDB_EXPORT void sdbReleaseReplicaGroup ( sdbReplicaGroupHandle cHandle ) ;
2313 
2318 SDB_EXPORT void sdbReleaseNode ( sdbNodeHandle cHandle ) ;
2319 
2324 SDB_EXPORT void sdbReleaseDomain ( sdbDomainHandle cHandle ) ;
2325 
2326 /* \fn void sdbReleaseDC ( sdbDCHandle cHandle )
2327  \brief Release the data center handle
2328  \param [in] cHandle the data center handle
2329 */
2330 SDB_EXPORT void sdbReleaseDC ( sdbDCHandle cHandle ) ;
2331 
2375 SDB_EXPORT INT32 sdbAggregate ( sdbCollectionHandle cHandle,
2376  bson **obj, SINT32 num,
2377  sdbCursorHandle *handle ) ;
2378 
2390 SDB_EXPORT INT32 sdbAttachCollection ( sdbCollectionHandle cHandle,
2391  const CHAR *subClFullName,
2392  bson *options) ;
2393 
2402 SDB_EXPORT INT32 sdbDetachCollection ( sdbCollectionHandle cHandle,
2403  const CHAR *subClFullName) ;
2404 
2426 SDB_EXPORT INT32 sdbBackupOffline ( sdbConnectionHandle cHandle,
2427  bson *options) ;
2428 
2448 SDB_EXPORT INT32 sdbBackup ( sdbConnectionHandle cHandle, bson *options) ;
2449 
2474 SDB_EXPORT INT32 sdbListBackup ( sdbConnectionHandle cHandle,
2475  bson *options,
2476  bson *condition,
2477  bson *selector,
2478  bson *orderBy,
2479  sdbCursorHandle *handle ) ;
2480 
2497 SDB_EXPORT INT32 sdbRemoveBackup ( sdbConnectionHandle cHandle,
2498  bson *options) ;
2499 
2519 SDB_EXPORT INT32 sdbListTasks ( sdbConnectionHandle cHandle,
2520  bson *condition,
2521  bson *selector,
2522  bson *orderBy,
2523  bson *hint,
2524  sdbCursorHandle *handle ) ;
2525 
2536 SDB_EXPORT INT32 sdbWaitTasks ( sdbConnectionHandle cHandle,
2537  const SINT64 *taskIDs,
2538  SINT32 num );
2539 
2551 SDB_EXPORT INT32 sdbCancelTask ( sdbConnectionHandle cHandle,
2552  SINT64 taskID,
2553  BOOLEAN isAsync ) ;
2554 
2567 SDB_EXPORT INT32 sdbSetSessionAttr ( sdbConnectionHandle cHandle,
2568  bson *options ) ;
2569 
2578 SDB_EXPORT INT32 sdbGetSessionAttr ( sdbConnectionHandle cHandle,
2579  bson * result ) ;
2580 
2591 SDB_EXPORT INT32 sdbGetSessionAttrEx ( sdbConnectionHandle cHandle,
2592  BOOLEAN useCache,
2593  bson * result ) ;
2594 
2600 SDB_EXPORT BOOLEAN sdbIsClosed( sdbConnectionHandle cHandle ) ;
2601 
2607 SDB_EXPORT BOOLEAN sdbIsValid( sdbConnectionHandle cHandle ) ;
2608 
2609 SDB_EXPORT INT32 _sdbMsg ( sdbConnectionHandle cHandle, const CHAR *msg ) ;
2610 
2631 SDB_EXPORT INT32 sdbCreateDomain ( sdbConnectionHandle cHandle,
2632  const CHAR *pDomainName,
2633  bson *options,
2634  sdbDomainHandle *handle ) ;
2635 
2644 SDB_EXPORT INT32 sdbDropDomain ( sdbConnectionHandle cHandle,
2645  const CHAR *pDomainName ) ;
2646 
2657 SDB_EXPORT INT32 sdbGetDomain ( sdbConnectionHandle cHandle,
2658  const CHAR *pDomainName,
2659  sdbDomainHandle *handle ) ;
2660 
2679 SDB_EXPORT INT32 sdbListDomains ( sdbConnectionHandle cHandle,
2680  bson *condition,
2681  bson *selector,
2682  bson *orderBy,
2683  sdbCursorHandle *handle ) ;
2684 
2704 SDB_EXPORT INT32 sdbAlterDomain( sdbDomainHandle cHandle,
2705  const bson *options ) ;
2706 
2719 SDB_EXPORT INT32 sdbDomainAddGroups ( sdbDomainHandle cHandle,
2720  const bson * options ) ;
2721 
2735 SDB_EXPORT INT32 sdbDomainRemoveGroups ( sdbDomainHandle cHandle,
2736  const bson * options ) ;
2737 
2752 SDB_EXPORT INT32 sdbDomainSetGroups ( sdbDomainHandle cHandle,
2753  const bson * options ) ;
2754 
2774 SDB_EXPORT INT32 sdbDomainSetAttributes ( sdbDomainHandle cHandle,
2775  const bson * options ) ;
2776 
2785 SDB_EXPORT INT32 sdbListCollectionSpacesInDomain( sdbDomainHandle cHandle,
2786  sdbCursorHandle *cursor ) ;
2787 
2796 SDB_EXPORT INT32 sdbListCollectionsInDomain( sdbDomainHandle cHandle,
2797  sdbCursorHandle *cursor ) ;
2798 
2807 SDB_EXPORT INT32 sdbListGroupsInDomain( sdbDomainHandle cHandle,
2808  sdbCursorHandle *cursor ) ;
2809 
2829 SDB_EXPORT INT32 sdbInvalidateCache( sdbConnectionHandle cHandle,
2830  bson *options ) ;
2831 
2842 SDB_EXPORT INT32 sdbForceSession( sdbConnectionHandle cHandle,
2843  SINT64 sessionID,
2844  bson *options ) ;
2845 
2854 SDB_EXPORT INT32 sdbCreateLobID( sdbCollectionHandle cHandle,
2855  bson_oid_t *oid ) ;
2856 
2869 SDB_EXPORT INT32 sdbCreateLobID1( sdbCollectionHandle cHandle,
2870  const CHAR *pTimeStamp,
2871  bson_oid_t *oid ) ;
2872 
2881 SDB_EXPORT INT32 sdbGetLobId( sdbLobHandle lobHandle,
2882  bson_oid_t *oid ) ;
2883 
2897 SDB_EXPORT INT32 sdbOpenLob( sdbCollectionHandle cHandle,
2898  const bson_oid_t *oid,
2899  INT32 mode,
2900  sdbLobHandle *lobHandle ) ;
2901 
2912 SDB_EXPORT INT32 sdbWriteLob( sdbLobHandle lobHandle,
2913  const CHAR *buf,
2914  UINT32 len ) ;
2915 
2926 SDB_EXPORT INT32 sdbLockLob( sdbLobHandle lobHandle,
2927  INT64 offset,
2928  INT64 length ) ;
2929 
2940 SDB_EXPORT INT32 sdbLockAndSeekLob( sdbLobHandle lobHandle,
2941  INT64 offset,
2942  INT64 length ) ;
2943 
2956 SDB_EXPORT INT32 sdbReadLob( sdbLobHandle lobHandle,
2957  UINT32 len,
2958  CHAR *buf,
2959  UINT32 *read ) ;
2960 
2967 SDB_EXPORT INT32 sdbCloseLob( sdbLobHandle *lobHandle ) ;
2968 
2977 SDB_EXPORT INT32 sdbRemoveLob( sdbCollectionHandle cHandle,
2978  const bson_oid_t *oid ) ;
2979 
2989 SDB_EXPORT INT32 sdbTruncateLob( sdbCollectionHandle cHandle,
2990  const bson_oid_t *oid, INT64 length ) ;
2991 
3000 SDB_EXPORT INT32 sdbGetLobSize( sdbLobHandle lobHandle,
3001  SINT64 *size ) ;
3002 
3011 SDB_EXPORT INT32 sdbGetLobCreateTime( sdbLobHandle lobHandle,
3012  UINT64 *millis ) ;
3013 
3022 SDB_EXPORT INT32 sdbGetLobModificationTime( sdbLobHandle lobHandle,
3023  UINT64 *millis ) ;
3024 
3031 SDB_EXPORT BOOLEAN sdbLobIsEof( sdbLobHandle lobHandle ) ;
3032 
3033 
3044 SDB_EXPORT INT32 sdbSeekLob( sdbLobHandle lobHandle,
3045  SINT64 size,
3046  SDB_LOB_SEEK whence ) ;
3047 
3056 SDB_EXPORT INT32 sdbListLobs( sdbCollectionHandle cHandle,
3057  sdbCursorHandle *cursor) ;
3058 
3080 SDB_EXPORT INT32 sdbListLobs1( sdbCollectionHandle cHandle,
3081  bson *condition,
3082  bson *selected,
3083  bson *orderBy,
3084  bson *hint,
3085  INT64 numToSkip,
3086  INT64 numToReturn,
3087  sdbCursorHandle *cursor) ;
3088 
3097 SDB_EXPORT INT32 sdbListLobPieces( sdbCollectionHandle cHandle,
3098  sdbCursorHandle *cursor ) ;
3099 
3100 
3122 SDB_EXPORT INT32 sdbListLobPieces1( sdbCollectionHandle cHandle,
3123  bson *condition,
3124  bson *selected,
3125  bson *orderBy,
3126  bson *hint,
3127  INT64 numToSkip,
3128  INT64 numToReturn,
3129  sdbCursorHandle *cursor ) ;
3130 
3137 SDB_EXPORT INT32 sdbGetRunTimeDetail( sdbLobHandle lobHandle,
3138  bson *detail) ;
3139 
3140 
3150 SDB_EXPORT INT32 sdbReelect( sdbReplicaGroupHandle cHandle,
3151  const bson *options ) ;
3152 
3160 SDB_EXPORT INT32 sdbForceStepUp( sdbConnectionHandle cHandle,
3161  const bson *options ) ;
3162 
3171 SDB_EXPORT INT32 sdbTruncateCollection( sdbConnectionHandle cHandle,
3172  const CHAR *fullName ) ;
3173 
3193 SDB_EXPORT INT32 sdbDetachNode( sdbReplicaGroupHandle cHandle,
3194  const CHAR *hostName,
3195  const CHAR *serviceName,
3196  const bson *options ) ;
3197 
3215 SDB_EXPORT INT32 sdbAttachNode( sdbReplicaGroupHandle cHandle,
3216  const CHAR *hostName,
3217  const CHAR *serviceName,
3218  const bson *options ) ;
3219 
3230 SDB_EXPORT INT32 sdbCreateIdIndex( sdbCollectionHandle cHandle,
3231  const bson *args ) ;
3232 
3240 SDB_EXPORT INT32 sdbDropIdIndex( sdbCollectionHandle cHandle ) ;
3241 
3254 SDB_EXPORT INT32 sdbEnableSharding ( sdbCollectionHandle cHandle,
3255  const bson * args ) ;
3256 
3263 SDB_EXPORT INT32 sdbDisableSharding ( sdbCollectionHandle cHandle ) ;
3264 
3274 SDB_EXPORT INT32 sdbEnableCompression ( sdbCollectionHandle cHandle,
3275  const bson * args ) ;
3276 
3283 SDB_EXPORT INT32 sdbDisableCompression ( sdbCollectionHandle cHandle ) ;
3284 
3302 SDB_EXPORT INT32 sdbCreateAutoIncrement( sdbCollectionHandle cHandle,
3303  const bson * options ) ;
3304 
3314 SDB_EXPORT INT32 sdbDropAutoIncrement( sdbCollectionHandle cHandle,
3315  const bson * options ) ;
3316 
3337 SDB_EXPORT INT32 sdbCLSetAttributes ( sdbCollectionHandle cHandle,
3338  const bson *options ) ;
3339 
3348 SDB_EXPORT INT32 sdbCLGetDetail ( sdbCollectionHandle cHandle,
3349  sdbCursorHandle *handle ) ;
3350 
3361 SDB_EXPORT INT32 sdbCLGetIndexStat( sdbCollectionHandle cHandle,
3362  const CHAR *pIndexName,
3363  bson *result ) ;
3364 
3365 /* \fn INT32 sdbPop( sdbCollectionHandle cHandle, bson *options )
3366  \brief pop records from capped collection
3367  \param [in] cHandle The handle of connection
3368  \param [in] fullName The full name of collection to be popped, eg: foo.bar
3369  \param [in] options Pop target and direction, including "LogicalID" and "Direction".
3370  Direction is optional. Its default value is 1.
3371  e.g. { LogicalID:100, Direction:1 }
3372  \retval SDB_OK Operation Success
3373  \retval Others Operation Fail
3374 */
3375 SDB_EXPORT INT32 sdbPop( sdbCollectionHandle cHandle, bson *options ) ;
3376 
3377 /* \fn INT32 sdbGetDCName( sdbDCHandle cHandle, CHAR *pBuffer, INT32 size )
3378  \brief Get the name of the data center
3379  \param [in] cHandle The data center handle
3380  \param [in] pBuffer The output buffer
3381  \param [in] size The size of the output buffer
3382  \retval SDB_OK Operation Success
3383  \retval Others Operation Fail
3384 */
3385 SDB_EXPORT INT32 sdbGetDCName( sdbDCHandle cHandle, CHAR *pBuffer, INT32 size ) ;
3386 
3387 /* \fn INT32 sdbGetDC( sdbConnectionHandle cHandle, sdbDCHandle *handle )
3388  \brief Get the data center
3389  \param [in] cHandle The connection handle
3390  \param [out] handle The data center handle
3391  \retval SDB_OK Operation Success
3392  \retval Others Operation Fail
3393 */
3394 SDB_EXPORT INT32 sdbGetDC( sdbConnectionHandle cHandle, sdbDCHandle *handle ) ;
3395 
3396 /* \fn INT32 sdbGetDCDetail( sdbDCHandle cHandle, bson *retInfo )
3397  \brief Get the detail of data center
3398  \param [in] cHandle The connection handle
3399  \param [out] retInfo The the detail of data center
3400  \retval SDB_OK Operation Success
3401  \retval Others Operation Fail
3402 */
3403 SDB_EXPORT INT32 sdbGetDCDetail( sdbDCHandle cHandle, bson *retInfo ) ;
3404 
3405 /* \fn INT32 sdbActivateDC( sdbDCHandle cHandle )
3406  \brief Activate the data center
3407  \param [in] cHandle The data center handle
3408  \retval SDB_OK Operation Success
3409  \retval Others Operation Fail
3410 */
3411 SDB_EXPORT INT32 sdbActivateDC( sdbDCHandle cHandle ) ;
3412 
3413 /* \fn INT32 sdbDeactivateDC( sdbDCHandle cHandle )
3414  \brief Deactivate the data center
3415  \param [in] cHandle The data center handle
3416  \retval SDB_OK Operation Success
3417  \retval Others Operation Fail
3418 */
3419 SDB_EXPORT INT32 sdbDeactivateDC( sdbDCHandle cHandle ) ;
3420 
3421 /* \fn INT32 sdbEnableReadOnly( sdbDCHandle cHandle, BOOLEAN isReadOnly )
3422  \brief Enable data center works in readonly mode or not
3423  \param [in] cHandle The data center handle
3424  \param [in] isReadOnly Whether to use readonly mode or not
3425  \retval SDB_OK Operation Success
3426  \retval Others Operation Fail
3427 */
3428 SDB_EXPORT INT32 sdbEnableReadOnly( sdbDCHandle cHandle, BOOLEAN isReadOnly ) ;
3429 
3430 /* \fn INT32 sdbCreateImage( sdbDCHandle cHandle, const CHAR *pCataAddrList )
3431  \brief Create image in data center
3432  \param [in] cHandle The data center handle
3433  \param [in] pCataAddrList Catalog address list of remote data center, e.g. "192.168.20.165:30003",
3434  "192.168.20.165:30003,192.168.20.166:30003"
3435  \retval SDB_OK Operation Success
3436  \retval Others Operation Fail
3437 */
3438 SDB_EXPORT INT32 sdbCreateImage( sdbDCHandle cHandle, const CHAR *pCataAddrList ) ;
3439 
3440 /* \fn INT32 sdbRemoveImage( sdbDCHandle cHandle )
3441  \brief Remove image in data center
3442  \param [in] cHandle The data center handle
3443  \retval SDB_OK Operation Success
3444  \retval Others Operation Fail
3445 */
3446 SDB_EXPORT INT32 sdbRemoveImage( sdbDCHandle cHandle ) ;
3447 
3448 /* \fn INT32 sdbEnableImage( sdbDCHandle cHandle )
3449  \brief Enable image in data center
3450  \param [in] cHandle The data center handle
3451  \retval SDB_OK Operation Success
3452  \retval Others Operation Fail
3453 */
3454 SDB_EXPORT INT32 sdbEnableImage( sdbDCHandle cHandle ) ;
3455 
3456 /* \fn INT32 sdbDisableImage( sdbDCHandle cHandle )
3457  \brief Disable image in data center
3458  \param [in] cHandle The data center handle
3459  \retval SDB_OK Operation Success
3460  \retval Others Operation Fail
3461 */
3462 SDB_EXPORT INT32 sdbDisableImage( sdbDCHandle cHandle ) ;
3463 
3464 /* \fn INT32 sdbAttachGroups( sdbDCHandle cHandle, bson *info )
3465  \brief Attach specified groups to data center
3466  \param [in] cHandle The data center handle
3467  \param [in] info The information of groups to attach, e.g. {Groups:[["group1", "group1"], ["group2", "group2"]]}
3468  \code
3469  bson obj ;
3470  bson_init( &obj ) ;
3471  bson_append_start_array( &obj, "Groups" ) ;
3472 
3473  bson_append_start_array( &obj, "0" ) ;
3474  bson_append_string( &obj, "0", "group1" ) ;
3475  bson_append_string( &obj, "1", "group1" ) ;
3476  bson_append_finish_array( &obj ) ;
3477 
3478  bson_append_start_array( &obj, "0" ) ;
3479  bson_append_string( &obj, "0", "group2" ) ;
3480  bson_append_string( &obj, "1", "group2" ) ;
3481  bson_append_finish_array( &obj ) ;
3482 
3483  bson_append_finish_array( &obj ) ;
3484 
3485  rc = bson_finish( &obj ) ;
3486  ASSERT_EQ( SDB_OK, rc ) ;
3487 
3488  rc = sdbAttachGroups( dc, &obj ) ;
3489  ASSERT_EQ( SDB_OK, rc ) ;
3490 
3491  bson_destroy( &obj ) ;
3492  \endcode
3493  \retval SDB_OK Operation Success
3494  \retval Others Operation Fail
3495 */
3496 SDB_EXPORT INT32 sdbAttachGroups( sdbDCHandle cHandle, bson *info ) ;
3497 
3498 /* \fn INT32 sdbDetachGroups( sdbDCHandle cHandle, bson *info )
3499  \brief Detach specified groups from data center
3500  \param [in] cHandle The data center handle
3501  \param [in] info The information of groups to detach, e.g. {Groups:[["a", "a"], ["b", "b"]]}
3502  \retval SDB_OK Operation Success
3503  \retval Others Operation Fail
3504 */
3505 SDB_EXPORT INT32 sdbDetachGroups( sdbDCHandle cHandle, bson *info ) ;
3506 
3530 SDB_EXPORT INT32 sdbSyncDB( sdbConnectionHandle cHandle,
3531  bson *options ) ;
3532 
3549 SDB_EXPORT INT32 sdbLoadCollectionSpace( sdbConnectionHandle cHandle,
3550  const CHAR *csName,
3551  bson *options ) ;
3552 
3569 SDB_EXPORT INT32 sdbUnloadCollectionSpace( sdbConnectionHandle cHandle,
3570  const CHAR *csName,
3571  bson *options ) ;
3572 
3589 SDB_EXPORT INT32 sdbSetPDLevel( sdbConnectionHandle cHandle,
3590  INT32 pdLevel,
3591  bson *options ) ;
3592 
3607 SDB_EXPORT INT32 sdbReloadConfig( sdbConnectionHandle cHandle,
3608  bson *options ) ;
3609 
3625 SDB_EXPORT INT32 sdbUpdateConfig( sdbConnectionHandle cHandle,
3626  bson *configs, bson *options ) ;
3627 
3643 SDB_EXPORT INT32 sdbDeleteConfig( sdbConnectionHandle cHandle,
3644  bson *configs, bson *options ) ;
3645 
3658 SDB_EXPORT INT32 sdbRenameCollectionSpace( sdbConnectionHandle cHandle,
3659  const CHAR *pOldName,
3660  const CHAR *pNewName,
3661  bson *options ) ;
3662 
3670 SDB_EXPORT void sdbSetConnectionInterruptFunc(
3671  sdbConnectionHandle cHandle,
3672  socketInterruptFunc func ) ;
3673 
3701 SDB_EXPORT INT32 sdbAnalyze( sdbConnectionHandle cHandle,
3702  bson *options ) ;
3703 
3716 SDB_EXPORT INT32 sdbGetLastErrorObj( sdbConnectionHandle cHandle, bson *errObj ) ;
3717 
3722 SDB_EXPORT void sdbCleanLastErrorObj( sdbConnectionHandle cHandle ) ;
3723 
3747 SDB_EXPORT INT32 sdbCreateSequence( sdbConnectionHandle cHandle,
3748  const CHAR *pSequenceName,
3749  const bson *options,
3750  sdbSequenceHandle *sHandle ) ;
3751 
3762 SDB_EXPORT INT32 sdbGetSequence( sdbConnectionHandle cHandle,
3763  const CHAR *pSequenceName,
3764  sdbSequenceHandle *sHandle ) ;
3765 
3776 SDB_EXPORT INT32 sdbRenameSequence( sdbConnectionHandle cHandle,
3777  const CHAR *pOldName,
3778  const CHAR *pNewName ) ;
3779 
3788 SDB_EXPORT INT32 sdbDropSequence( sdbConnectionHandle cHandle,
3789  const CHAR *pSequenceName ) ;
3790 
3795 SDB_EXPORT void sdbReleaseSequence( sdbSequenceHandle sHandle ) ;
3796 
3815 SDB_EXPORT INT32 sdbSeqSetAttributes( sdbSequenceHandle sHandle,
3816  const bson *options ) ;
3817 
3825 SDB_EXPORT INT32 sdbSeqGetNextValue( sdbSequenceHandle sHandle, INT64 *value ) ;
3826 
3834 SDB_EXPORT INT32 sdbSeqGetCurrentValue( sdbSequenceHandle sHandle,
3835  INT64 *value ) ;
3836 
3845 SDB_EXPORT INT32 sdbSeqSetCurrentValue( sdbSequenceHandle sHandle,
3846  const INT64 value ) ;
3847 
3862 SDB_EXPORT INT32 sdbSeqFetch( sdbSequenceHandle sHandle,
3863  const INT32 fetchNum,
3864  INT64 *nextValue,
3865  INT32 *returnNum,
3866  INT32 *increment ) ;
3867 
3875 SDB_EXPORT INT32 sdbSeqRestart( sdbSequenceHandle sHandle,
3876  const INT64 startValue ) ;
3877 
3878 SDB_EXTERN_C_END
3879 #endif
3880