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 
142 #define QUERY_FOR_UPDATE 0x00010000
143 
147 #define QUERY_FOR_SHARE 0x00040000
148 
149 
151 #define FLG_INSERT_CONTONDUP 0x00000001
152 
153 // #define FLG_INSERT_RETURNNUM 0x00000002
155 #define FLG_INSERT_REPLACEONDUP 0x00000004
156 
157 #define FLG_INSERT_RETURN_OID 0x10000000
158 
160 #define UPDATE_KEEP_SHARDINGKEY QUERY_KEEP_SHARDINGKEY_IN_UPDATE
161 
162 // #define UPDATE_RETURNNUM 0x00000004
163 
165 // #define FLG_DELETE_RETURNNUM 0x00000004
166 
173 SDB_EXPORT INT32 initClient( sdbClientConf* config ) ;
174 
190 SDB_EXPORT INT32 sdbGetPasswdByCipherFile( const CHAR *pUsrName,
191  const CHAR *pToken,
192  const CHAR *pCipherFile,
193  CHAR *pUser, CHAR *pPasswd ) ;
194 
209 SDB_EXPORT INT32 sdbConnect ( const CHAR *pHostName, const CHAR *pServiceName,
210  const CHAR *pUsrName, const CHAR *pPasswd ,
211  sdbConnectionHandle *handle ) ;
212 
225 SDB_EXPORT INT32 sdbConnect1 ( const CHAR **pConnAddrs, INT32 arrSize,
226  const CHAR *pUsrName, const CHAR *pPasswd ,
227  sdbConnectionHandle *handle ) ;
228 
243 SDB_EXPORT INT32 sdbSecureConnect ( const CHAR *pHostName, const CHAR *pServiceName,
244  const CHAR *pUsrName, const CHAR *pPasswd ,
245  sdbConnectionHandle *handle ) ;
246 
259 SDB_EXPORT INT32 sdbSecureConnect1 ( const CHAR **pConnAddrs, INT32 arrSize,
260  const CHAR *pUsrName, const CHAR *pPasswd ,
261  sdbConnectionHandle *handle ) ;
262 
267 SDB_EXPORT void sdbDisconnect ( sdbConnectionHandle handle ) ;
268 
278 SDB_EXPORT INT32 sdbCreateUsr( sdbConnectionHandle cHandle, const CHAR *pUsrName,
279  const CHAR *pPasswd ) ;
280 
290 SDB_EXPORT INT32 sdbRemoveUsr( sdbConnectionHandle cHandle, const CHAR *pUsrName,
291  const CHAR *pPasswd ) ;
292 
293 /* \fn INT32 sdbModifyConfig ( sdbConnectionHandle cHandle,
294  bson *config )
295  \brief Modify config for the current node
296  \param [in] cHandle The connection handle
297  \param [in] config The new configurations
298  \retval SDB_OK Modify Success
299  \retval Others Modify Fail
300 
301 SDB_EXPORT INT32 sdbModifyConfig ( sdbConnectionHandle cHandle,
302  bson *config ) ;*/
303 
304 /* \fn INT32 sdbModifyNodeConfig ( sdbConnectionHandle cHandle,
305  INT32 nodeID,
306  bson *config )
307  \brief Modify config for a given node
308  \param [in] cHandle The connection handle
309  \param [in] nodeID The node id that want to be modified
310  \param [in] config The new configurations
311  \retval SDB_OK Modify Success
312  \retval Others Modify Fail
313 
314 SDB_EXPORT INT32 sdbModifyNodeConfig ( sdbConnectionHandle cHandle,
315  INT32 nodeID,
316  bson *config ) ;*/
317 
341 SDB_EXPORT INT32 sdbGetDataBlocks ( sdbCollectionHandle cHandle,
342  bson *condition,
343  bson *select,
344  bson *orderBy,
345  bson *hint,
346  INT64 numToSkip,
347  INT64 numToReturn,
348  sdbCursorHandle *handle );
349 
371 SDB_EXPORT INT32 sdbGetQueryMeta ( sdbCollectionHandle cHandle,
372  bson *condition,
373  bson *orderBy,
374  bson *hint,
375  INT64 numToSkip,
376  INT64 numToReturn,
377  sdbCursorHandle *handle ) ;
378 
416 SDB_EXPORT INT32 sdbGetSnapshot ( sdbConnectionHandle cHandle,
417  INT32 snapType,
418  bson *condition,
419  bson *selector,
420  bson *orderBy,
421  sdbCursorHandle *handle ) ;
422 
467 SDB_EXPORT INT32 sdbGetSnapshot1 ( sdbConnectionHandle cHandle,
468  INT32 snapType,
469  bson *condition,
470  bson *selector,
471  bson *orderBy,
472  bson *hint,
473  INT64 numToSkip,
474  INT64 numToReturn,
475  sdbCursorHandle *handle ) ;
476 
501 SDB_EXPORT INT32 sdbResetSnapshot ( sdbConnectionHandle cHandle,
502  bson *options ) ;
503 
546 SDB_EXPORT INT32 sdbTraceStart ( sdbConnectionHandle cHandle,
547  UINT32 traceBufferSize,
548  CHAR * component,
549  CHAR * breakPoint ,
550  UINT32 *tids,
551  UINT32 nTids ) ;
558 SDB_EXPORT INT32 sdbTraceResume ( sdbConnectionHandle cHandle ) ;
559 
568 SDB_EXPORT INT32 sdbTraceStop ( sdbConnectionHandle cHandle,
569  const CHAR *pDumpFileName ) ;
570 
579 SDB_EXPORT INT32 sdbTraceStatus ( sdbConnectionHandle cHandle,
580  sdbCursorHandle *handle ) ;
581 
617 SDB_EXPORT INT32 sdbGetList ( sdbConnectionHandle cHandle,
618  INT32 listType,
619  bson *condition,
620  bson *selector,
621  bson *orderBy,
622  sdbCursorHandle *handle ) ;
623 
667 SDB_EXPORT INT32 sdbGetList1( sdbConnectionHandle cHandle,
668  INT32 listType,
669  bson *condition,
670  bson *selector,
671  bson *orderBy,
672  bson *hint,
673  INT64 numToSkip,
674  INT64 numToReturn,
675  sdbCursorHandle *handle ) ;
676 
687 SDB_EXPORT INT32 sdbGetCollection ( sdbConnectionHandle cHandle,
688  const CHAR *pCollectionFullName,
689  sdbCollectionHandle *handle ) ;
690 
701 SDB_EXPORT INT32 sdbGetCollectionSpace ( sdbConnectionHandle cHandle,
702  const CHAR *pCollectionSpaceName,
703  sdbCSHandle *handle ) ;
704 
715 SDB_EXPORT INT32 sdbGetReplicaGroup ( sdbConnectionHandle cHandle,
716  const CHAR *pRGName,
717  sdbReplicaGroupHandle *handle ) ;
718 
729 SDB_EXPORT INT32 sdbGetReplicaGroup1 ( sdbConnectionHandle cHandle,
730  UINT32 id,
731  sdbReplicaGroupHandle *handle ) ;
732 
742 SDB_EXPORT INT32 sdbGetReplicaGroupName ( sdbReplicaGroupHandle cHandle,
743  CHAR **ppRGName ) ;
744 
754 SDB_EXPORT INT32 sdbGetRGName ( sdbReplicaGroupHandle cHandle,
755  CHAR *pBuffer, INT32 size ) ;
756 
763 SDB_EXPORT BOOLEAN sdbIsReplicaGroupCatalog ( sdbReplicaGroupHandle cHandle ) ;
764 
786 SDB_EXPORT INT32 sdbCreateCollectionSpace ( sdbConnectionHandle cHandle,
787  const CHAR *pCollectionSpaceName,
788  INT32 iPageSize,
789  sdbCSHandle *handle ) ;
790 
808 SDB_EXPORT INT32 sdbCreateCollectionSpaceV2 ( sdbConnectionHandle cHandle,
809  const CHAR *pCollectionSpaceName,
810  bson *options,
811  sdbCSHandle *handle ) ;
812 
821 SDB_EXPORT INT32 sdbDropCollectionSpace ( sdbConnectionHandle cHandle,
822  const CHAR *pCollectionSpaceName ) ;
823 
837 SDB_EXPORT INT32 sdbDropCollectionSpace1 ( sdbConnectionHandle cHandle,
838  const CHAR *pCollectionSpaceName,
839  bson *options) ;
840 
851 SDB_EXPORT INT32 sdbCreateReplicaGroup ( sdbConnectionHandle cHandle,
852  const CHAR *pRGName,
853  sdbReplicaGroupHandle *handle ) ;
854 
863 SDB_EXPORT INT32 sdbRemoveReplicaGroup ( sdbConnectionHandle cHandle,
864  const CHAR *pRGName ) ;
865 
872 SDB_EXPORT INT32 sdbStartReplicaGroup ( sdbReplicaGroupHandle cHandle ) ;
873 
882 SDB_EXPORT INT32 sdbGetNodeMaster ( sdbReplicaGroupHandle cHandle,
883  sdbNodeHandle *handle ) ;
884 
894 SDB_EXPORT INT32 sdbGetNodeSlave ( sdbReplicaGroupHandle cHandle,
895  sdbNodeHandle *handle ) ;
896 
911 SDB_EXPORT INT32 sdbGetNodeSlave1 ( sdbReplicaGroupHandle cHandle,
912  const INT32 *positionsArray,
913  INT32 positionsCount,
914  sdbNodeHandle *handle ) ;
915 
916 
928 SDB_EXPORT INT32 sdbGetNodeByName ( sdbReplicaGroupHandle cHandle,
929  const CHAR *pNodeName,
930  sdbNodeHandle *handle ) ;
931 
945 SDB_EXPORT INT32 sdbGetNodeByHost ( sdbReplicaGroupHandle cHandle,
946  const CHAR *pHostName,
947  const CHAR *pServiceName,
948  sdbNodeHandle *handle ) ;
949 
964 SDB_EXPORT INT32 sdbGetNodeAddr ( sdbNodeHandle cHandle,
965  const CHAR **ppHostName,
966  const CHAR **ppServiceName,
967  const CHAR **ppNodeName,
968  INT32 *pNodeID ) ;
969 
976 SDB_EXPORT INT32 sdbStartNode ( sdbNodeHandle cHandle ) ;
977 
984 SDB_EXPORT INT32 sdbStopNode ( sdbNodeHandle cHandle ) ;
985 
992 SDB_EXPORT INT32 sdbStopReplicaGroup ( sdbReplicaGroupHandle cHandle ) ;
993 
1008 SDB_EXPORT INT32 sdbCreateReplicaCataGroup ( sdbConnectionHandle cHandle,
1009  const CHAR *pHostName,
1010  const CHAR *pServiceName,
1011  const CHAR *pDatabasePath,
1012  bson *configure );
1013 
1028 SDB_EXPORT INT32 sdbCreateNode ( sdbReplicaGroupHandle cHandle,
1029  const CHAR *pHostName,
1030  const CHAR *pServiceName,
1031  const CHAR *pDatabasePath,
1032  bson *configure ) ;
1033 
1046 SDB_EXPORT INT32 sdbRemoveNode ( sdbReplicaGroupHandle cHandle,
1047  const CHAR *pHostName,
1048  const CHAR *pServiceName,
1049  bson *configure ) ;
1050 
1059 SDB_EXPORT INT32 sdbListCollectionSpaces ( sdbConnectionHandle cHandle,
1060  sdbCursorHandle *handle ) ;
1061 
1070 SDB_EXPORT INT32 sdbListCollections ( sdbConnectionHandle cHandle,
1071  sdbCursorHandle *handle ) ;
1072 
1082 SDB_EXPORT INT32 sdbListSequences ( sdbConnectionHandle cHandle,
1083  sdbCursorHandle *handle ) ;
1084 
1093 SDB_EXPORT INT32 sdbListReplicaGroups ( sdbConnectionHandle cHandle,
1094  sdbCursorHandle *handle ) ;
1095 
1118 SDB_EXPORT INT32 sdbFlushConfigure( sdbConnectionHandle cHandle,
1119  bson *options ) ;
1120 
1129 SDB_EXPORT INT32 sdbCrtJSProcedure( sdbConnectionHandle cHandle,
1130  const CHAR *code ) ;
1131 
1140 SDB_EXPORT INT32 sdbRmProcedure( sdbConnectionHandle cHandle,
1141  const CHAR *spName ) ;
1142 
1143 
1154 SDB_EXPORT INT32 sdbListProcedures( sdbConnectionHandle cHandle,
1155  bson *condition,
1156  sdbCursorHandle *handle ) ;
1157 
1174 SDB_EXPORT INT32 sdbEvalJS( sdbConnectionHandle cHandle,
1175  const CHAR *code,
1176  SDB_SPD_RES_TYPE *type,
1177  sdbCursorHandle *handle,
1178  bson *errmsg ) ;
1179 
1190 SDB_EXPORT INT32 sdbGetCollection1 ( sdbCSHandle cHandle,
1191  const CHAR *pCollectionName,
1192  sdbCollectionHandle *handle ) ;
1193 
1207 SDB_EXPORT INT32 sdbCreateCollection ( sdbCSHandle cHandle,
1208  const CHAR *pCollectionName,
1209  sdbCollectionHandle *handle ) ;
1210 
1227 SDB_EXPORT INT32 sdbCreateCollection1 ( sdbCSHandle cHandle,
1228  const CHAR *pCollectionName,
1229  bson *options,
1230  sdbCollectionHandle *handle ) ;
1231 
1254 SDB_EXPORT INT32 sdbAlterCollection ( sdbCollectionHandle cHandle,
1255  bson *options ) ;
1256 
1265 SDB_EXPORT INT32 sdbDropCollection ( sdbCSHandle cHandle,
1266  const CHAR *pCollectionName ) ;
1267 
1277 SDB_EXPORT INT32 sdbGetCSName ( sdbCSHandle cHandle,
1278  CHAR *pBuffer, INT32 size ) ;
1279 
1292 SDB_EXPORT INT32 sdbRenameCollection( sdbCSHandle cHandle,
1293  const CHAR *pOldName,
1294  const CHAR *pNewName,
1295  bson *options ) ;
1296 
1310 SDB_EXPORT INT32 sdbAlterCollectionSpace ( sdbCSHandle cHandle,
1311  bson * options ) ;
1312 
1324 SDB_EXPORT INT32 sdbCSSetDomain ( sdbCSHandle cHandle,
1325  bson * options ) ;
1326 
1336 SDB_EXPORT INT32 sdbCSGetDomainName ( sdbCSHandle cHandle,
1337  CHAR *pResult, INT32 size ) ;
1338 
1345 SDB_EXPORT INT32 sdbCSRemoveDomain ( sdbCSHandle cHandle ) ;
1346 
1352 SDB_EXPORT INT32 sdbCSEnableCapped ( sdbCSHandle cHandle ) ;
1353 
1360 SDB_EXPORT INT32 sdbCSDisableCapped ( sdbCSHandle cHandle ) ;
1361 
1375 SDB_EXPORT INT32 sdbCSSetAttributes ( sdbCSHandle cHandle,
1376  bson * options ) ;
1377 
1386 SDB_EXPORT INT32 sdbCSListCollections ( sdbCSHandle cHandle,
1387  sdbCursorHandle *handle ) ;
1388 
1398 SDB_EXPORT INT32 sdbGetCLName ( sdbCollectionHandle cHandle,
1399  CHAR *pBuffer, INT32 size ) ;
1400 
1410 SDB_EXPORT INT32 sdbGetCLFullName ( sdbCollectionHandle cHandle,
1411  CHAR *pBuffer, INT32 size ) ;
1412 
1431 SDB_EXPORT INT32 sdbSplitCollection ( sdbCollectionHandle cHandle,
1432  const CHAR *pSourceRG,
1433  const CHAR *pTargetRG,
1434  const bson *pSplitCondition,
1435  const bson *pSplitEndCondition ) ;
1436 
1457 SDB_EXPORT INT32 sdbSplitCLAsync ( sdbCollectionHandle cHandle,
1458  const CHAR *pSourceRG,
1459  const CHAR *pTargetRG,
1460  const bson *pSplitCondition,
1461  const bson *pSplitEndCondition,
1462  SINT64 *taskID ) ;
1463 
1476 SDB_EXPORT INT32 sdbSplitCollectionByPercent ( sdbCollectionHandle cHandle,
1477  const CHAR *pSourceRG,
1478  const CHAR *pTargetRG,
1479  FLOAT64 percent ) ;
1480 
1495 SDB_EXPORT INT32 sdbSplitCLByPercentAsync ( sdbCollectionHandle cHandle,
1496  const CHAR *pSourceRG,
1497  const CHAR *pTargetRG,
1498  FLOAT64 percent,
1499  SINT64 *taskID ) ;
1500 
1516 SDB_EXPORT INT32 sdbCreateIndex ( sdbCollectionHandle cHandle,
1517  bson *indexDef,
1518  const CHAR *pIndexName,
1519  BOOLEAN isUnique,
1520  BOOLEAN isEnforced ) ;
1521 
1540 SDB_EXPORT INT32 sdbCreateIndex1 ( sdbCollectionHandle cHandle,
1541  bson *indexDef,
1542  const CHAR *pIndexName,
1543  BOOLEAN isUnique,
1544  BOOLEAN isEnforced,
1545  INT32 sortBufferSize ) ;
1546 
1567 SDB_EXPORT INT32 sdbCreateIndex2 ( sdbCollectionHandle cHandle,
1568  bson *indexDef,
1569  const CHAR *pIndexName,
1570  bson *options ) ;
1571 
1583 SDB_EXPORT INT32 sdbGetIndexes ( sdbCollectionHandle cHandle,
1584  const CHAR *pIndexName,
1585  sdbCursorHandle *handle ) ;
1586 
1597 SDB_EXPORT INT32 sdbGetIndex ( sdbCollectionHandle cHandle,
1598  const CHAR *pIndexName,
1599  bson *info ) ;
1600 
1601 
1610 SDB_EXPORT INT32 sdbGetIndexInfo ( sdbCollectionHandle cHandle,
1611  sdbCursorHandle *handle ) ;
1612 
1613 
1622 SDB_EXPORT INT32 sdbDropIndex ( sdbCollectionHandle cHandle,
1623  const CHAR *pIndexName ) ;
1624 
1635 SDB_EXPORT INT32 sdbGetCount ( sdbCollectionHandle cHandle,
1636  bson *condition,
1637  SINT64 *count );
1638 
1639 
1655 SDB_EXPORT INT32 sdbGetCount1 ( sdbCollectionHandle cHandle,
1656  bson *condition,
1657  bson *hint,
1658  SINT64 *count );
1659 
1668 SDB_EXPORT INT32 sdbInsert ( sdbCollectionHandle cHandle,
1669  bson *obj ) ;
1670 
1689 SDB_EXPORT INT32 sdbInsert1 ( sdbCollectionHandle cHandle,
1690  bson *obj, bson_iterator *pId ) ;
1691 
1692 
1739 SDB_EXPORT INT32 sdbInsert2 ( sdbCollectionHandle cHandle,
1740  bson *obj, INT32 flags, bson *pResult ) ;
1741 
1798 SDB_EXPORT INT32 sdbBulkInsert ( sdbCollectionHandle cHandle,
1799  SINT32 flags, bson **objs, SINT32 num ) ;
1800 
1850 SDB_EXPORT INT32 sdbBulkInsert2 ( sdbCollectionHandle cHandle,
1851  SINT32 flags, bson **objs,
1852  SINT32 num,
1853  bson *pResult ) ;
1854 
1871 SDB_EXPORT INT32 sdbUpdate ( sdbCollectionHandle cHandle,
1872  bson *rule,
1873  bson *condition,
1874  bson *hint ) ;
1875 
1898 SDB_EXPORT INT32 sdbUpdate1 ( sdbCollectionHandle cHandle,
1899  bson *rule,
1900  bson *condition,
1901  bson *hint,
1902  INT32 flag ) ;
1903 
1937 SDB_EXPORT INT32 sdbUpdate2 ( sdbCollectionHandle cHandle,
1938  bson *rule,
1939  bson *condition,
1940  bson *hint,
1941  INT32 flag,
1942  bson *pResult ) ;
1943 
1960 SDB_EXPORT INT32 sdbUpsert ( sdbCollectionHandle cHandle,
1961  bson *rule,
1962  bson *condition,
1963  bson *hint ) ;
1964 
1983 SDB_EXPORT INT32 sdbUpsert1 ( sdbCollectionHandle cHandle,
1984  bson *rule,
1985  bson *condition,
1986  bson *hint,
1987  bson *setOnInsert ) ;
1988 
2013 SDB_EXPORT INT32 sdbUpsert2 ( sdbCollectionHandle cHandle,
2014  bson *rule,
2015  bson *condition,
2016  bson *hint,
2017  bson *setOnInsert,
2018  INT32 flag ) ;
2019 
2055 SDB_EXPORT INT32 sdbUpsert3 ( sdbCollectionHandle cHandle,
2056  bson *rule,
2057  bson *condition,
2058  bson *hint,
2059  bson *setOnInsert,
2060  INT32 flag,
2061  bson *pResult ) ;
2062 
2076 SDB_EXPORT INT32 sdbDelete ( sdbCollectionHandle cHandle,
2077  bson *condition,
2078  bson *hint ) ;
2079 
2104 SDB_EXPORT INT32 sdbDelete1 ( sdbCollectionHandle cHandle,
2105  bson *condition,
2106  bson *hint,
2107  INT32 flag,
2108  bson *pResult ) ;
2109 
2141 SDB_EXPORT INT32 sdbQuery1 ( sdbCollectionHandle cHandle,
2142  bson *condition,
2143  bson *select,
2144  bson *orderBy,
2145  bson *hint,
2146  INT64 numToSkip,
2147  INT64 numToReturn,
2148  INT32 flags,
2149  sdbCursorHandle *handle ) ;
2150 
2151 
2175 SDB_EXPORT INT32 sdbQuery ( sdbCollectionHandle cHandle,
2176  bson *condition,
2177  bson *select,
2178  bson *orderBy,
2179  bson *hint,
2180  INT64 numToSkip,
2181  INT64 numToReturn,
2182  sdbCursorHandle *handle ) ;
2183 
2220 SDB_EXPORT INT32 sdbQueryAndUpdate ( sdbCollectionHandle cHandle,
2221  bson *condition,
2222  bson *select,
2223  bson *orderBy,
2224  bson *hint,
2225  bson *update,
2226  INT64 numToSkip,
2227  INT64 numToReturn,
2228  INT32 flag,
2229  BOOLEAN returnNew,
2230  sdbCursorHandle *handle ) ;
2231 
2263 SDB_EXPORT INT32 sdbQueryAndRemove ( sdbCollectionHandle cHandle,
2264  bson *condition,
2265  bson *select,
2266  bson *orderBy,
2267  bson *hint,
2268  INT64 numToSkip,
2269  INT64 numToReturn,
2270  INT32 flag,
2271  sdbCursorHandle *handle ) ;
2272 
2309 SDB_EXPORT INT32 sdbExplain ( sdbCollectionHandle cHandle,
2310  bson *condition,
2311  bson *select,
2312  bson *orderBy,
2313  bson *hint,
2314  INT32 flag,
2315  INT64 numToSkip,
2316  INT64 numToReturn,
2317  bson *options,
2318  sdbCursorHandle *handle ) ;
2319 
2328 SDB_EXPORT INT32 sdbNext ( sdbCursorHandle cHandle,
2329  bson *obj ) ;
2330 
2339 SDB_EXPORT INT32 sdbCurrent ( sdbCursorHandle cHandle,
2340  bson *obj ) ;
2341 
2342 /* \fn INT32 sdbUpdateCurrent ( sdbCursorHandle cHandle, bson *rule )
2343  \brief Update the current document of cursor
2344  \param [in] cHandle The cursor handle
2345  \param [in] rule The updating rule, cannot be null
2346  \retval SDB_OK Operation Success
2347  \retval Others Operation Fail
2348 */
2349 /*
2350 SDB_EXPORT INT32 sdbUpdateCurrent ( sdbCursorHandle cHandle,
2351  bson *rule ) ;
2352 */
2353 /* \fn INT32 sdbDeleteCurrent ( sdbCursorHandle cHandle )
2354  \brief Delete the current document of cursor
2355  \param [in] cHandle The cursor handle
2356  \retval SDB_OK Operation Success
2357  \retval Others Operation Fail
2358 */
2359 /*
2360 SDB_EXPORT INT32 sdbDeleteCurrent ( sdbCursorHandle cHandle ) ;
2361 */
2362 
2371 SDB_EXPORT INT32 sdbCloseCursor ( sdbCursorHandle cHandle ) ;
2372 
2380 SDB_EXPORT INT32 sdbCloseAllCursors ( sdbConnectionHandle cHandle ) ;
2381 
2389 SDB_EXPORT INT32 sdbInterrupt ( sdbConnectionHandle cHandle ) ;
2390 
2400 SDB_EXPORT INT32 sdbInterruptOperation ( sdbConnectionHandle cHandle ) ;
2401 
2402 
2413 SDB_EXPORT INT32 sdbExec( sdbConnectionHandle cHandle,
2414  const CHAR *sql,
2415  sdbCursorHandle *result );
2416 
2425 SDB_EXPORT INT32 sdbExecUpdate( sdbConnectionHandle cHandle,
2426  const CHAR *sql ) ;
2427 
2434 SDB_EXPORT INT32 sdbTransactionBegin( sdbConnectionHandle cHandle ) ;
2435 
2442 SDB_EXPORT INT32 sdbTransactionCommit( sdbConnectionHandle cHandle ) ;
2443 
2450 SDB_EXPORT INT32 sdbTransactionRollback( sdbConnectionHandle cHandle ) ;
2451 
2456 SDB_EXPORT void sdbReleaseConnection ( sdbConnectionHandle cHandle ) ;
2457 
2462 SDB_EXPORT void sdbReleaseCollection ( sdbCollectionHandle cHandle ) ;
2463 
2468 SDB_EXPORT void sdbReleaseCS ( sdbCSHandle cHandle ) ;
2469 
2474 SDB_EXPORT void sdbReleaseCursor ( sdbCursorHandle cHandle ) ;
2475 
2480 SDB_EXPORT void sdbReleaseReplicaGroup ( sdbReplicaGroupHandle cHandle ) ;
2481 
2486 SDB_EXPORT void sdbReleaseNode ( sdbNodeHandle cHandle ) ;
2487 
2492 SDB_EXPORT void sdbReleaseDomain ( sdbDomainHandle cHandle ) ;
2493 
2494 /* \fn void sdbReleaseDC ( sdbDCHandle cHandle )
2495  \brief Release the data center handle
2496  \param [in] cHandle the data center handle
2497 */
2498 SDB_EXPORT void sdbReleaseDC ( sdbDCHandle cHandle ) ;
2499 
2543 SDB_EXPORT INT32 sdbAggregate ( sdbCollectionHandle cHandle,
2544  bson **obj, SINT32 num,
2545  sdbCursorHandle *handle ) ;
2546 
2558 SDB_EXPORT INT32 sdbAttachCollection ( sdbCollectionHandle cHandle,
2559  const CHAR *subClFullName,
2560  bson *options) ;
2561 
2570 SDB_EXPORT INT32 sdbDetachCollection ( sdbCollectionHandle cHandle,
2571  const CHAR *subClFullName) ;
2572 
2594 SDB_EXPORT INT32 sdbBackupOffline ( sdbConnectionHandle cHandle,
2595  bson *options) ;
2596 
2616 SDB_EXPORT INT32 sdbBackup ( sdbConnectionHandle cHandle, bson *options) ;
2617 
2642 SDB_EXPORT INT32 sdbListBackup ( sdbConnectionHandle cHandle,
2643  bson *options,
2644  bson *condition,
2645  bson *selector,
2646  bson *orderBy,
2647  sdbCursorHandle *handle ) ;
2648 
2665 SDB_EXPORT INT32 sdbRemoveBackup ( sdbConnectionHandle cHandle,
2666  bson *options) ;
2667 
2687 SDB_EXPORT INT32 sdbListTasks ( sdbConnectionHandle cHandle,
2688  bson *condition,
2689  bson *selector,
2690  bson *orderBy,
2691  bson *hint,
2692  sdbCursorHandle *handle ) ;
2693 
2704 SDB_EXPORT INT32 sdbWaitTasks ( sdbConnectionHandle cHandle,
2705  const SINT64 *taskIDs,
2706  SINT32 num );
2707 
2719 SDB_EXPORT INT32 sdbCancelTask ( sdbConnectionHandle cHandle,
2720  SINT64 taskID,
2721  BOOLEAN isAsync ) ;
2722 
2735 SDB_EXPORT INT32 sdbSetSessionAttr ( sdbConnectionHandle cHandle,
2736  bson *options ) ;
2737 
2746 SDB_EXPORT INT32 sdbGetSessionAttr ( sdbConnectionHandle cHandle,
2747  bson * result ) ;
2748 
2759 SDB_EXPORT INT32 sdbGetSessionAttrEx ( sdbConnectionHandle cHandle,
2760  BOOLEAN useCache,
2761  bson * result ) ;
2762 
2768 SDB_EXPORT BOOLEAN sdbIsClosed( sdbConnectionHandle cHandle ) ;
2769 
2775 SDB_EXPORT BOOLEAN sdbIsValid( sdbConnectionHandle cHandle ) ;
2776 
2777 SDB_EXPORT INT32 _sdbMsg ( sdbConnectionHandle cHandle, const CHAR *msg ) ;
2778 
2799 SDB_EXPORT INT32 sdbCreateDomain ( sdbConnectionHandle cHandle,
2800  const CHAR *pDomainName,
2801  bson *options,
2802  sdbDomainHandle *handle ) ;
2803 
2812 SDB_EXPORT INT32 sdbDropDomain ( sdbConnectionHandle cHandle,
2813  const CHAR *pDomainName ) ;
2814 
2825 SDB_EXPORT INT32 sdbGetDomain ( sdbConnectionHandle cHandle,
2826  const CHAR *pDomainName,
2827  sdbDomainHandle *handle ) ;
2828 
2847 SDB_EXPORT INT32 sdbListDomains ( sdbConnectionHandle cHandle,
2848  bson *condition,
2849  bson *selector,
2850  bson *orderBy,
2851  sdbCursorHandle *handle ) ;
2852 
2872 SDB_EXPORT INT32 sdbAlterDomain( sdbDomainHandle cHandle,
2873  const bson *options ) ;
2874 
2887 SDB_EXPORT INT32 sdbDomainAddGroups ( sdbDomainHandle cHandle,
2888  const bson * options ) ;
2889 
2903 SDB_EXPORT INT32 sdbDomainRemoveGroups ( sdbDomainHandle cHandle,
2904  const bson * options ) ;
2905 
2920 SDB_EXPORT INT32 sdbDomainSetGroups ( sdbDomainHandle cHandle,
2921  const bson * options ) ;
2922 
2942 SDB_EXPORT INT32 sdbDomainSetAttributes ( sdbDomainHandle cHandle,
2943  const bson * options ) ;
2944 
2953 SDB_EXPORT INT32 sdbListCollectionSpacesInDomain( sdbDomainHandle cHandle,
2954  sdbCursorHandle *cursor ) ;
2955 
2964 SDB_EXPORT INT32 sdbListCollectionsInDomain( sdbDomainHandle cHandle,
2965  sdbCursorHandle *cursor ) ;
2966 
2975 SDB_EXPORT INT32 sdbListGroupsInDomain( sdbDomainHandle cHandle,
2976  sdbCursorHandle *cursor ) ;
2977 
2997 SDB_EXPORT INT32 sdbInvalidateCache( sdbConnectionHandle cHandle,
2998  bson *options ) ;
2999 
3010 SDB_EXPORT INT32 sdbForceSession( sdbConnectionHandle cHandle,
3011  SINT64 sessionID,
3012  bson *options ) ;
3013 
3022 SDB_EXPORT INT32 sdbCreateLobID( sdbCollectionHandle cHandle,
3023  bson_oid_t *oid ) ;
3024 
3037 SDB_EXPORT INT32 sdbCreateLobID1( sdbCollectionHandle cHandle,
3038  const CHAR *pTimeStamp,
3039  bson_oid_t *oid ) ;
3040 
3049 SDB_EXPORT INT32 sdbGetLobId( sdbLobHandle lobHandle,
3050  bson_oid_t *oid ) ;
3051 
3065 SDB_EXPORT INT32 sdbOpenLob( sdbCollectionHandle cHandle,
3066  const bson_oid_t *oid,
3067  INT32 mode,
3068  sdbLobHandle *lobHandle ) ;
3069 
3080 SDB_EXPORT INT32 sdbWriteLob( sdbLobHandle lobHandle,
3081  const CHAR *buf,
3082  UINT32 len ) ;
3083 
3094 SDB_EXPORT INT32 sdbLockLob( sdbLobHandle lobHandle,
3095  INT64 offset,
3096  INT64 length ) ;
3097 
3108 SDB_EXPORT INT32 sdbLockAndSeekLob( sdbLobHandle lobHandle,
3109  INT64 offset,
3110  INT64 length ) ;
3111 
3124 SDB_EXPORT INT32 sdbReadLob( sdbLobHandle lobHandle,
3125  UINT32 len,
3126  CHAR *buf,
3127  UINT32 *read ) ;
3128 
3135 SDB_EXPORT INT32 sdbCloseLob( sdbLobHandle *lobHandle ) ;
3136 
3145 SDB_EXPORT INT32 sdbRemoveLob( sdbCollectionHandle cHandle,
3146  const bson_oid_t *oid ) ;
3147 
3157 SDB_EXPORT INT32 sdbTruncateLob( sdbCollectionHandle cHandle,
3158  const bson_oid_t *oid, INT64 length ) ;
3159 
3168 SDB_EXPORT INT32 sdbGetLobSize( sdbLobHandle lobHandle,
3169  SINT64 *size ) ;
3170 
3179 SDB_EXPORT INT32 sdbGetLobCreateTime( sdbLobHandle lobHandle,
3180  UINT64 *millis ) ;
3181 
3190 SDB_EXPORT INT32 sdbGetLobModificationTime( sdbLobHandle lobHandle,
3191  UINT64 *millis ) ;
3192 
3199 SDB_EXPORT BOOLEAN sdbLobIsEof( sdbLobHandle lobHandle ) ;
3200 
3201 
3212 SDB_EXPORT INT32 sdbSeekLob( sdbLobHandle lobHandle,
3213  SINT64 size,
3214  SDB_LOB_SEEK whence ) ;
3215 
3224 SDB_EXPORT INT32 sdbListLobs( sdbCollectionHandle cHandle,
3225  sdbCursorHandle *cursor) ;
3226 
3248 SDB_EXPORT INT32 sdbListLobs1( sdbCollectionHandle cHandle,
3249  bson *condition,
3250  bson *selected,
3251  bson *orderBy,
3252  bson *hint,
3253  INT64 numToSkip,
3254  INT64 numToReturn,
3255  sdbCursorHandle *cursor) ;
3256 
3265 SDB_EXPORT INT32 sdbListLobPieces( sdbCollectionHandle cHandle,
3266  sdbCursorHandle *cursor ) ;
3267 
3268 
3290 SDB_EXPORT INT32 sdbListLobPieces1( sdbCollectionHandle cHandle,
3291  bson *condition,
3292  bson *selected,
3293  bson *orderBy,
3294  bson *hint,
3295  INT64 numToSkip,
3296  INT64 numToReturn,
3297  sdbCursorHandle *cursor ) ;
3298 
3305 SDB_EXPORT INT32 sdbGetRunTimeDetail( sdbLobHandle lobHandle,
3306  bson *detail) ;
3307 
3308 
3318 SDB_EXPORT INT32 sdbReelect( sdbReplicaGroupHandle cHandle,
3319  const bson *options ) ;
3320 
3328 SDB_EXPORT INT32 sdbForceStepUp( sdbConnectionHandle cHandle,
3329  const bson *options ) ;
3330 
3339 SDB_EXPORT INT32 sdbTruncateCollection( sdbConnectionHandle cHandle,
3340  const CHAR *fullName ) ;
3341 
3361 SDB_EXPORT INT32 sdbDetachNode( sdbReplicaGroupHandle cHandle,
3362  const CHAR *hostName,
3363  const CHAR *serviceName,
3364  const bson *options ) ;
3365 
3383 SDB_EXPORT INT32 sdbAttachNode( sdbReplicaGroupHandle cHandle,
3384  const CHAR *hostName,
3385  const CHAR *serviceName,
3386  const bson *options ) ;
3387 
3398 SDB_EXPORT INT32 sdbCreateIdIndex( sdbCollectionHandle cHandle,
3399  const bson *args ) ;
3400 
3408 SDB_EXPORT INT32 sdbDropIdIndex( sdbCollectionHandle cHandle ) ;
3409 
3422 SDB_EXPORT INT32 sdbEnableSharding ( sdbCollectionHandle cHandle,
3423  const bson * args ) ;
3424 
3431 SDB_EXPORT INT32 sdbDisableSharding ( sdbCollectionHandle cHandle ) ;
3432 
3442 SDB_EXPORT INT32 sdbEnableCompression ( sdbCollectionHandle cHandle,
3443  const bson * args ) ;
3444 
3451 SDB_EXPORT INT32 sdbDisableCompression ( sdbCollectionHandle cHandle ) ;
3452 
3470 SDB_EXPORT INT32 sdbCreateAutoIncrement( sdbCollectionHandle cHandle,
3471  const bson * options ) ;
3472 
3482 SDB_EXPORT INT32 sdbDropAutoIncrement( sdbCollectionHandle cHandle,
3483  const bson * options ) ;
3484 
3505 SDB_EXPORT INT32 sdbCLSetAttributes ( sdbCollectionHandle cHandle,
3506  const bson *options ) ;
3507 
3516 SDB_EXPORT INT32 sdbCLGetDetail ( sdbCollectionHandle cHandle,
3517  sdbCursorHandle *handle ) ;
3518 
3529 SDB_EXPORT INT32 sdbCLGetIndexStat( sdbCollectionHandle cHandle,
3530  const CHAR *pIndexName,
3531  bson *result ) ;
3532 
3533 /* \fn INT32 sdbPop( sdbCollectionHandle cHandle, bson *options )
3534  \brief pop records from capped collection
3535  \param [in] cHandle The handle of connection
3536  \param [in] fullName The full name of collection to be popped, eg: foo.bar
3537  \param [in] options Pop target and direction, including "LogicalID" and "Direction".
3538  Direction is optional. Its default value is 1.
3539  e.g. { LogicalID:100, Direction:1 }
3540  \retval SDB_OK Operation Success
3541  \retval Others Operation Fail
3542 */
3543 SDB_EXPORT INT32 sdbPop( sdbCollectionHandle cHandle, bson *options ) ;
3544 
3545 /* \fn INT32 sdbGetDCName( sdbDCHandle cHandle, CHAR *pBuffer, INT32 size )
3546  \brief Get the name of the data center
3547  \param [in] cHandle The data center handle
3548  \param [in] pBuffer The output buffer
3549  \param [in] size The size of the output buffer
3550  \retval SDB_OK Operation Success
3551  \retval Others Operation Fail
3552 */
3553 SDB_EXPORT INT32 sdbGetDCName( sdbDCHandle cHandle, CHAR *pBuffer, INT32 size ) ;
3554 
3555 /* \fn INT32 sdbGetDC( sdbConnectionHandle cHandle, sdbDCHandle *handle )
3556  \brief Get the data center
3557  \param [in] cHandle The connection handle
3558  \param [out] handle The data center handle
3559  \retval SDB_OK Operation Success
3560  \retval Others Operation Fail
3561 */
3562 SDB_EXPORT INT32 sdbGetDC( sdbConnectionHandle cHandle, sdbDCHandle *handle ) ;
3563 
3564 /* \fn INT32 sdbGetDCDetail( sdbDCHandle cHandle, bson *retInfo )
3565  \brief Get the detail of data center
3566  \param [in] cHandle The connection handle
3567  \param [out] retInfo The the detail of data center
3568  \retval SDB_OK Operation Success
3569  \retval Others Operation Fail
3570 */
3571 SDB_EXPORT INT32 sdbGetDCDetail( sdbDCHandle cHandle, bson *retInfo ) ;
3572 
3573 /* \fn INT32 sdbActivateDC( sdbDCHandle cHandle )
3574  \brief Activate the data center
3575  \param [in] cHandle The data center handle
3576  \retval SDB_OK Operation Success
3577  \retval Others Operation Fail
3578 */
3579 SDB_EXPORT INT32 sdbActivateDC( sdbDCHandle cHandle ) ;
3580 
3581 /* \fn INT32 sdbDeactivateDC( sdbDCHandle cHandle )
3582  \brief Deactivate the data center
3583  \param [in] cHandle The data center handle
3584  \retval SDB_OK Operation Success
3585  \retval Others Operation Fail
3586 */
3587 SDB_EXPORT INT32 sdbDeactivateDC( sdbDCHandle cHandle ) ;
3588 
3589 /* \fn INT32 sdbEnableReadOnly( sdbDCHandle cHandle, BOOLEAN isReadOnly )
3590  \brief Enable data center works in readonly mode or not
3591  \param [in] cHandle The data center handle
3592  \param [in] isReadOnly Whether to use readonly mode or not
3593  \retval SDB_OK Operation Success
3594  \retval Others Operation Fail
3595 */
3596 SDB_EXPORT INT32 sdbEnableReadOnly( sdbDCHandle cHandle, BOOLEAN isReadOnly ) ;
3597 
3598 /* \fn INT32 sdbCreateImage( sdbDCHandle cHandle, const CHAR *pCataAddrList )
3599  \brief Create image in data center
3600  \param [in] cHandle The data center handle
3601  \param [in] pCataAddrList Catalog address list of remote data center, e.g. "192.168.20.165:30003",
3602  "192.168.20.165:30003,192.168.20.166:30003"
3603  \retval SDB_OK Operation Success
3604  \retval Others Operation Fail
3605 */
3606 SDB_EXPORT INT32 sdbCreateImage( sdbDCHandle cHandle, const CHAR *pCataAddrList ) ;
3607 
3608 /* \fn INT32 sdbRemoveImage( sdbDCHandle cHandle )
3609  \brief Remove image in data center
3610  \param [in] cHandle The data center handle
3611  \retval SDB_OK Operation Success
3612  \retval Others Operation Fail
3613 */
3614 SDB_EXPORT INT32 sdbRemoveImage( sdbDCHandle cHandle ) ;
3615 
3616 /* \fn INT32 sdbEnableImage( sdbDCHandle cHandle )
3617  \brief Enable image in data center
3618  \param [in] cHandle The data center handle
3619  \retval SDB_OK Operation Success
3620  \retval Others Operation Fail
3621 */
3622 SDB_EXPORT INT32 sdbEnableImage( sdbDCHandle cHandle ) ;
3623 
3624 /* \fn INT32 sdbDisableImage( sdbDCHandle cHandle )
3625  \brief Disable image in data center
3626  \param [in] cHandle The data center handle
3627  \retval SDB_OK Operation Success
3628  \retval Others Operation Fail
3629 */
3630 SDB_EXPORT INT32 sdbDisableImage( sdbDCHandle cHandle ) ;
3631 
3632 /* \fn INT32 sdbAttachGroups( sdbDCHandle cHandle, bson *info )
3633  \brief Attach specified groups to data center
3634  \param [in] cHandle The data center handle
3635  \param [in] info The information of groups to attach, e.g. {Groups:[["group1", "group1"], ["group2", "group2"]]}
3636  \code
3637  bson obj ;
3638  bson_init( &obj ) ;
3639  bson_append_start_array( &obj, "Groups" ) ;
3640 
3641  bson_append_start_array( &obj, "0" ) ;
3642  bson_append_string( &obj, "0", "group1" ) ;
3643  bson_append_string( &obj, "1", "group1" ) ;
3644  bson_append_finish_array( &obj ) ;
3645 
3646  bson_append_start_array( &obj, "0" ) ;
3647  bson_append_string( &obj, "0", "group2" ) ;
3648  bson_append_string( &obj, "1", "group2" ) ;
3649  bson_append_finish_array( &obj ) ;
3650 
3651  bson_append_finish_array( &obj ) ;
3652 
3653  rc = bson_finish( &obj ) ;
3654  ASSERT_EQ( SDB_OK, rc ) ;
3655 
3656  rc = sdbAttachGroups( dc, &obj ) ;
3657  ASSERT_EQ( SDB_OK, rc ) ;
3658 
3659  bson_destroy( &obj ) ;
3660  \endcode
3661  \retval SDB_OK Operation Success
3662  \retval Others Operation Fail
3663 */
3664 SDB_EXPORT INT32 sdbAttachGroups( sdbDCHandle cHandle, bson *info ) ;
3665 
3666 /* \fn INT32 sdbDetachGroups( sdbDCHandle cHandle, bson *info )
3667  \brief Detach specified groups from data center
3668  \param [in] cHandle The data center handle
3669  \param [in] info The information of groups to detach, e.g. {Groups:[["a", "a"], ["b", "b"]]}
3670  \retval SDB_OK Operation Success
3671  \retval Others Operation Fail
3672 */
3673 SDB_EXPORT INT32 sdbDetachGroups( sdbDCHandle cHandle, bson *info ) ;
3674 
3698 SDB_EXPORT INT32 sdbSyncDB( sdbConnectionHandle cHandle,
3699  bson *options ) ;
3700 
3717 SDB_EXPORT INT32 sdbLoadCollectionSpace( sdbConnectionHandle cHandle,
3718  const CHAR *csName,
3719  bson *options ) ;
3720 
3737 SDB_EXPORT INT32 sdbUnloadCollectionSpace( sdbConnectionHandle cHandle,
3738  const CHAR *csName,
3739  bson *options ) ;
3740 
3757 SDB_EXPORT INT32 sdbSetPDLevel( sdbConnectionHandle cHandle,
3758  INT32 pdLevel,
3759  bson *options ) ;
3760 
3775 SDB_EXPORT INT32 sdbReloadConfig( sdbConnectionHandle cHandle,
3776  bson *options ) ;
3777 
3793 SDB_EXPORT INT32 sdbUpdateConfig( sdbConnectionHandle cHandle,
3794  bson *configs, bson *options ) ;
3795 
3811 SDB_EXPORT INT32 sdbDeleteConfig( sdbConnectionHandle cHandle,
3812  bson *configs, bson *options ) ;
3813 
3826 SDB_EXPORT INT32 sdbRenameCollectionSpace( sdbConnectionHandle cHandle,
3827  const CHAR *pOldName,
3828  const CHAR *pNewName,
3829  bson *options ) ;
3830 
3838 SDB_EXPORT void sdbSetConnectionInterruptFunc(
3839  sdbConnectionHandle cHandle,
3840  socketInterruptFunc func ) ;
3841 
3869 SDB_EXPORT INT32 sdbAnalyze( sdbConnectionHandle cHandle,
3870  bson *options ) ;
3871 
3884 SDB_EXPORT INT32 sdbGetLastErrorObj( sdbConnectionHandle cHandle, bson *errObj ) ;
3885 
3890 SDB_EXPORT void sdbCleanLastErrorObj( sdbConnectionHandle cHandle ) ;
3891 
3915 SDB_EXPORT INT32 sdbCreateSequence( sdbConnectionHandle cHandle,
3916  const CHAR *pSequenceName,
3917  const bson *options,
3918  sdbSequenceHandle *sHandle ) ;
3919 
3930 SDB_EXPORT INT32 sdbGetSequence( sdbConnectionHandle cHandle,
3931  const CHAR *pSequenceName,
3932  sdbSequenceHandle *sHandle ) ;
3933 
3944 SDB_EXPORT INT32 sdbRenameSequence( sdbConnectionHandle cHandle,
3945  const CHAR *pOldName,
3946  const CHAR *pNewName ) ;
3947 
3956 SDB_EXPORT INT32 sdbDropSequence( sdbConnectionHandle cHandle,
3957  const CHAR *pSequenceName ) ;
3958 
3963 SDB_EXPORT void sdbReleaseSequence( sdbSequenceHandle sHandle ) ;
3964 
3983 SDB_EXPORT INT32 sdbSeqSetAttributes( sdbSequenceHandle sHandle,
3984  const bson *options ) ;
3985 
3993 SDB_EXPORT INT32 sdbSeqGetNextValue( sdbSequenceHandle sHandle, INT64 *value ) ;
3994 
4002 SDB_EXPORT INT32 sdbSeqGetCurrentValue( sdbSequenceHandle sHandle,
4003  INT64 *value ) ;
4004 
4013 SDB_EXPORT INT32 sdbSeqSetCurrentValue( sdbSequenceHandle sHandle,
4014  const INT64 value ) ;
4015 
4030 SDB_EXPORT INT32 sdbSeqFetch( sdbSequenceHandle sHandle,
4031  const INT32 fetchNum,
4032  INT64 *nextValue,
4033  INT32 *returnNum,
4034  INT32 *increment ) ;
4035 
4043 SDB_EXPORT INT32 sdbSeqRestart( sdbSequenceHandle sHandle,
4044  const INT64 startValue ) ;
4045 
4046 SDB_EXTERN_C_END
4047 #endif