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_UPDATEONDUP 0x00000008
159 // #define FLG_INSERT_HAS_ID_FIELD 0x00000010
161 #define FLG_INSERT_CONTONDUP_ID 0x00000020
162 
164 #define FLG_INSERT_REPLACEONDUP_ID 0x00000040
165 
166 #define FLG_INSERT_RETURN_OID 0x10000000
167 
169 #define UPDATE_KEEP_SHARDINGKEY QUERY_KEEP_SHARDINGKEY_IN_UPDATE
170 
171 // #define UPDATE_RETURNNUM 0x00000004
172 
174 // #define FLG_DELETE_RETURNNUM 0x00000004
175 
176 #if defined( SDB_ENGINE ) || defined( SDB_TOOL ) || defined ( SDB_FMP ) || defined ( SDB_SHELL )
177 
178 #include "network.h"
179 #include "msg.h"
180 
181 INT32 sendAndRecv ( sdbConnectionHandle cHandle, Socket* sock,
182  const MsgHeader *sendMsg,
183  MsgHeader **recvMsg, INT32 *size,
184  BOOLEAN needRecv,
185  BOOLEAN endianConvert ) ;
186 
187 #endif
188 
195 SDB_EXPORT INT32 initClient( sdbClientConf* config ) ;
196 
212 SDB_EXPORT INT32 sdbGetPasswdByCipherFile( const CHAR *pUsrName,
213  const CHAR *pToken,
214  const CHAR *pCipherFile,
215  CHAR *pUser, CHAR *pPasswd ) ;
216 
231 SDB_EXPORT INT32 sdbConnect ( const CHAR *pHostName, const CHAR *pServiceName,
232  const CHAR *pUsrName, const CHAR *pPasswd ,
233  sdbConnectionHandle *handle ) ;
234 
247 SDB_EXPORT INT32 sdbConnect1 ( const CHAR **pConnAddrs, INT32 arrSize,
248  const CHAR *pUsrName, const CHAR *pPasswd ,
249  sdbConnectionHandle *handle ) ;
250 
265 SDB_EXPORT INT32 sdbSecureConnect ( const CHAR *pHostName, const CHAR *pServiceName,
266  const CHAR *pUsrName, const CHAR *pPasswd ,
267  sdbConnectionHandle *handle ) ;
268 
281 SDB_EXPORT INT32 sdbSecureConnect1 ( const CHAR **pConnAddrs, INT32 arrSize,
282  const CHAR *pUsrName, const CHAR *pPasswd ,
283  sdbConnectionHandle *handle ) ;
284 
289 SDB_EXPORT void sdbDisconnect ( sdbConnectionHandle handle ) ;
290 
300 SDB_EXPORT INT32 sdbCreateUsr( sdbConnectionHandle cHandle, const CHAR *pUsrName,
301  const CHAR *pPasswd ) ;
302 
312 SDB_EXPORT INT32 sdbRemoveUsr( sdbConnectionHandle cHandle, const CHAR *pUsrName,
313  const CHAR *pPasswd ) ;
314 
315 /* \fn INT32 sdbModifyConfig ( sdbConnectionHandle cHandle,
316  bson *config )
317  \brief Modify config for the current node
318  \param [in] cHandle The connection handle
319  \param [in] config The new configurations
320  \retval SDB_OK Modify Success
321  \retval Others Modify Fail
322 
323 SDB_EXPORT INT32 sdbModifyConfig ( sdbConnectionHandle cHandle,
324  bson *config ) ;*/
325 
326 /* \fn INT32 sdbModifyNodeConfig ( sdbConnectionHandle cHandle,
327  INT32 nodeID,
328  bson *config )
329  \brief Modify config for a given node
330  \param [in] cHandle The connection handle
331  \param [in] nodeID The node id that want to be modified
332  \param [in] config The new configurations
333  \retval SDB_OK Modify Success
334  \retval Others Modify Fail
335 
336 SDB_EXPORT INT32 sdbModifyNodeConfig ( sdbConnectionHandle cHandle,
337  INT32 nodeID,
338  bson *config ) ;*/
339 
363 SDB_EXPORT INT32 sdbGetDataBlocks ( sdbCollectionHandle cHandle,
364  bson *condition,
365  bson *select,
366  bson *orderBy,
367  bson *hint,
368  INT64 numToSkip,
369  INT64 numToReturn,
370  sdbCursorHandle *handle );
371 
393 SDB_EXPORT INT32 sdbGetQueryMeta ( sdbCollectionHandle cHandle,
394  bson *condition,
395  bson *orderBy,
396  bson *hint,
397  INT64 numToSkip,
398  INT64 numToReturn,
399  sdbCursorHandle *handle ) ;
400 
438 SDB_EXPORT INT32 sdbGetSnapshot ( sdbConnectionHandle cHandle,
439  INT32 snapType,
440  bson *condition,
441  bson *selector,
442  bson *orderBy,
443  sdbCursorHandle *handle ) ;
444 
489 SDB_EXPORT INT32 sdbGetSnapshot1 ( sdbConnectionHandle cHandle,
490  INT32 snapType,
491  bson *condition,
492  bson *selector,
493  bson *orderBy,
494  bson *hint,
495  INT64 numToSkip,
496  INT64 numToReturn,
497  sdbCursorHandle *handle ) ;
498 
523 SDB_EXPORT INT32 sdbResetSnapshot ( sdbConnectionHandle cHandle,
524  bson *options ) ;
525 
568 SDB_EXPORT INT32 sdbTraceStart ( sdbConnectionHandle cHandle,
569  UINT32 traceBufferSize,
570  CHAR * component,
571  CHAR * breakPoint ,
572  UINT32 *tids,
573  UINT32 nTids ) ;
580 SDB_EXPORT INT32 sdbTraceResume ( sdbConnectionHandle cHandle ) ;
581 
590 SDB_EXPORT INT32 sdbTraceStop ( sdbConnectionHandle cHandle,
591  const CHAR *pDumpFileName ) ;
592 
601 SDB_EXPORT INT32 sdbTraceStatus ( sdbConnectionHandle cHandle,
602  sdbCursorHandle *handle ) ;
603 
639 SDB_EXPORT INT32 sdbGetList ( sdbConnectionHandle cHandle,
640  INT32 listType,
641  bson *condition,
642  bson *selector,
643  bson *orderBy,
644  sdbCursorHandle *handle ) ;
645 
689 SDB_EXPORT INT32 sdbGetList1( sdbConnectionHandle cHandle,
690  INT32 listType,
691  bson *condition,
692  bson *selector,
693  bson *orderBy,
694  bson *hint,
695  INT64 numToSkip,
696  INT64 numToReturn,
697  sdbCursorHandle *handle ) ;
698 
709 SDB_EXPORT INT32 sdbGetCollection ( sdbConnectionHandle cHandle,
710  const CHAR *pCollectionFullName,
711  sdbCollectionHandle *handle ) ;
712 
723 SDB_EXPORT INT32 sdbGetCollectionSpace ( sdbConnectionHandle cHandle,
724  const CHAR *pCollectionSpaceName,
725  sdbCSHandle *handle ) ;
726 
737 SDB_EXPORT INT32 sdbGetReplicaGroup ( sdbConnectionHandle cHandle,
738  const CHAR *pRGName,
739  sdbReplicaGroupHandle *handle ) ;
740 
751 SDB_EXPORT INT32 sdbGetReplicaGroup1 ( sdbConnectionHandle cHandle,
752  UINT32 id,
753  sdbReplicaGroupHandle *handle ) ;
754 
764 SDB_EXPORT INT32 sdbGetReplicaGroupName ( sdbReplicaGroupHandle cHandle,
765  CHAR **ppRGName ) ;
766 
776 SDB_EXPORT INT32 sdbGetRGName ( sdbReplicaGroupHandle cHandle,
777  CHAR *pBuffer, INT32 size ) ;
778 
785 SDB_EXPORT BOOLEAN sdbIsReplicaGroupCatalog ( sdbReplicaGroupHandle cHandle ) ;
786 
808 SDB_EXPORT INT32 sdbCreateCollectionSpace ( sdbConnectionHandle cHandle,
809  const CHAR *pCollectionSpaceName,
810  INT32 iPageSize,
811  sdbCSHandle *handle ) ;
812 
830 SDB_EXPORT INT32 sdbCreateCollectionSpaceV2 ( sdbConnectionHandle cHandle,
831  const CHAR *pCollectionSpaceName,
832  bson *options,
833  sdbCSHandle *handle ) ;
834 
843 SDB_EXPORT INT32 sdbDropCollectionSpace ( sdbConnectionHandle cHandle,
844  const CHAR *pCollectionSpaceName ) ;
845 
859 SDB_EXPORT INT32 sdbDropCollectionSpace1 ( sdbConnectionHandle cHandle,
860  const CHAR *pCollectionSpaceName,
861  bson *options) ;
862 
873 SDB_EXPORT INT32 sdbCreateReplicaGroup ( sdbConnectionHandle cHandle,
874  const CHAR *pRGName,
875  sdbReplicaGroupHandle *handle ) ;
876 
885 SDB_EXPORT INT32 sdbRemoveReplicaGroup ( sdbConnectionHandle cHandle,
886  const CHAR *pRGName ) ;
887 
894 SDB_EXPORT INT32 sdbStartReplicaGroup ( sdbReplicaGroupHandle cHandle ) ;
895 
904 SDB_EXPORT INT32 sdbGetNodeMaster ( sdbReplicaGroupHandle cHandle,
905  sdbNodeHandle *handle ) ;
906 
916 SDB_EXPORT INT32 sdbGetNodeSlave ( sdbReplicaGroupHandle cHandle,
917  sdbNodeHandle *handle ) ;
918 
933 SDB_EXPORT INT32 sdbGetNodeSlave1 ( sdbReplicaGroupHandle cHandle,
934  const INT32 *positionsArray,
935  INT32 positionsCount,
936  sdbNodeHandle *handle ) ;
937 
938 
950 SDB_EXPORT INT32 sdbGetNodeByName ( sdbReplicaGroupHandle cHandle,
951  const CHAR *pNodeName,
952  sdbNodeHandle *handle ) ;
953 
967 SDB_EXPORT INT32 sdbGetNodeByHost ( sdbReplicaGroupHandle cHandle,
968  const CHAR *pHostName,
969  const CHAR *pServiceName,
970  sdbNodeHandle *handle ) ;
971 
986 SDB_EXPORT INT32 sdbGetNodeAddr ( sdbNodeHandle cHandle,
987  const CHAR **ppHostName,
988  const CHAR **ppServiceName,
989  const CHAR **ppNodeName,
990  INT32 *pNodeID ) ;
991 
998 SDB_EXPORT INT32 sdbStartNode ( sdbNodeHandle cHandle ) ;
999 
1006 SDB_EXPORT INT32 sdbStopNode ( sdbNodeHandle cHandle ) ;
1007 
1014 SDB_EXPORT INT32 sdbStopReplicaGroup ( sdbReplicaGroupHandle cHandle ) ;
1015 
1030 SDB_EXPORT INT32 sdbCreateReplicaCataGroup ( sdbConnectionHandle cHandle,
1031  const CHAR *pHostName,
1032  const CHAR *pServiceName,
1033  const CHAR *pDatabasePath,
1034  bson *configure );
1035 
1050 SDB_EXPORT INT32 sdbCreateNode ( sdbReplicaGroupHandle cHandle,
1051  const CHAR *pHostName,
1052  const CHAR *pServiceName,
1053  const CHAR *pDatabasePath,
1054  bson *configure ) ;
1055 
1068 SDB_EXPORT INT32 sdbRemoveNode ( sdbReplicaGroupHandle cHandle,
1069  const CHAR *pHostName,
1070  const CHAR *pServiceName,
1071  bson *configure ) ;
1072 
1081 SDB_EXPORT INT32 sdbListCollectionSpaces ( sdbConnectionHandle cHandle,
1082  sdbCursorHandle *handle ) ;
1083 
1092 SDB_EXPORT INT32 sdbListCollections ( sdbConnectionHandle cHandle,
1093  sdbCursorHandle *handle ) ;
1094 
1104 SDB_EXPORT INT32 sdbListSequences ( sdbConnectionHandle cHandle,
1105  sdbCursorHandle *handle ) ;
1106 
1115 SDB_EXPORT INT32 sdbListReplicaGroups ( sdbConnectionHandle cHandle,
1116  sdbCursorHandle *handle ) ;
1117 
1140 SDB_EXPORT INT32 sdbFlushConfigure( sdbConnectionHandle cHandle,
1141  bson *options ) ;
1142 
1151 SDB_EXPORT INT32 sdbCrtJSProcedure( sdbConnectionHandle cHandle,
1152  const CHAR *code ) ;
1153 
1162 SDB_EXPORT INT32 sdbRmProcedure( sdbConnectionHandle cHandle,
1163  const CHAR *spName ) ;
1164 
1165 
1176 SDB_EXPORT INT32 sdbListProcedures( sdbConnectionHandle cHandle,
1177  bson *condition,
1178  sdbCursorHandle *handle ) ;
1179 
1196 SDB_EXPORT INT32 sdbEvalJS( sdbConnectionHandle cHandle,
1197  const CHAR *code,
1198  SDB_SPD_RES_TYPE *type,
1199  sdbCursorHandle *handle,
1200  bson *errmsg ) ;
1201 
1212 SDB_EXPORT INT32 sdbGetCollection1 ( sdbCSHandle cHandle,
1213  const CHAR *pCollectionName,
1214  sdbCollectionHandle *handle ) ;
1215 
1229 SDB_EXPORT INT32 sdbCreateCollection ( sdbCSHandle cHandle,
1230  const CHAR *pCollectionName,
1231  sdbCollectionHandle *handle ) ;
1232 
1274 SDB_EXPORT INT32 sdbCreateCollection1 ( sdbCSHandle cHandle,
1275  const CHAR *pCollectionName,
1276  bson *options,
1277  sdbCollectionHandle *handle ) ;
1278 
1309 SDB_EXPORT INT32 sdbAlterCollection ( sdbCollectionHandle cHandle,
1310  bson *options ) ;
1311 
1320 SDB_EXPORT INT32 sdbDropCollection ( sdbCSHandle cHandle,
1321  const CHAR *pCollectionName ) ;
1322 
1332 SDB_EXPORT INT32 sdbGetCSName ( sdbCSHandle cHandle,
1333  CHAR *pBuffer, INT32 size ) ;
1334 
1347 SDB_EXPORT INT32 sdbRenameCollection( sdbCSHandle cHandle,
1348  const CHAR *pOldName,
1349  const CHAR *pNewName,
1350  bson *options ) ;
1351 
1365 SDB_EXPORT INT32 sdbAlterCollectionSpace ( sdbCSHandle cHandle,
1366  bson * options ) ;
1367 
1379 SDB_EXPORT INT32 sdbCSSetDomain ( sdbCSHandle cHandle,
1380  bson * options ) ;
1381 
1391 SDB_EXPORT INT32 sdbCSGetDomainName ( sdbCSHandle cHandle,
1392  CHAR *pResult, INT32 size ) ;
1393 
1400 SDB_EXPORT INT32 sdbCSRemoveDomain ( sdbCSHandle cHandle ) ;
1401 
1407 SDB_EXPORT INT32 sdbCSEnableCapped ( sdbCSHandle cHandle ) ;
1408 
1415 SDB_EXPORT INT32 sdbCSDisableCapped ( sdbCSHandle cHandle ) ;
1416 
1430 SDB_EXPORT INT32 sdbCSSetAttributes ( sdbCSHandle cHandle,
1431  bson * options ) ;
1432 
1441 SDB_EXPORT INT32 sdbCSListCollections ( sdbCSHandle cHandle,
1442  sdbCursorHandle *handle ) ;
1443 
1453 SDB_EXPORT INT32 sdbGetCLName ( sdbCollectionHandle cHandle,
1454  CHAR *pBuffer, INT32 size ) ;
1455 
1465 SDB_EXPORT INT32 sdbGetCLFullName ( sdbCollectionHandle cHandle,
1466  CHAR *pBuffer, INT32 size ) ;
1467 
1486 SDB_EXPORT INT32 sdbSplitCollection ( sdbCollectionHandle cHandle,
1487  const CHAR *pSourceRG,
1488  const CHAR *pTargetRG,
1489  const bson *pSplitCondition,
1490  const bson *pSplitEndCondition ) ;
1491 
1512 SDB_EXPORT INT32 sdbSplitCLAsync ( sdbCollectionHandle cHandle,
1513  const CHAR *pSourceRG,
1514  const CHAR *pTargetRG,
1515  const bson *pSplitCondition,
1516  const bson *pSplitEndCondition,
1517  SINT64 *taskID ) ;
1518 
1531 SDB_EXPORT INT32 sdbSplitCollectionByPercent ( sdbCollectionHandle cHandle,
1532  const CHAR *pSourceRG,
1533  const CHAR *pTargetRG,
1534  FLOAT64 percent ) ;
1535 
1550 SDB_EXPORT INT32 sdbSplitCLByPercentAsync ( sdbCollectionHandle cHandle,
1551  const CHAR *pSourceRG,
1552  const CHAR *pTargetRG,
1553  FLOAT64 percent,
1554  SINT64 *taskID ) ;
1555 
1571 SDB_EXPORT INT32 sdbCreateIndex ( sdbCollectionHandle cHandle,
1572  bson *indexDef,
1573  const CHAR *pIndexName,
1574  BOOLEAN isUnique,
1575  BOOLEAN isEnforced ) ;
1576 
1595 SDB_EXPORT INT32 sdbCreateIndex1 ( sdbCollectionHandle cHandle,
1596  bson *indexDef,
1597  const CHAR *pIndexName,
1598  BOOLEAN isUnique,
1599  BOOLEAN isEnforced,
1600  INT32 sortBufferSize ) ;
1601 
1622 SDB_EXPORT INT32 sdbCreateIndex2 ( sdbCollectionHandle cHandle,
1623  bson *indexDef,
1624  const CHAR *pIndexName,
1625  bson *options ) ;
1626 
1638 SDB_EXPORT INT32 sdbGetIndexes ( sdbCollectionHandle cHandle,
1639  const CHAR *pIndexName,
1640  sdbCursorHandle *handle ) ;
1641 
1652 SDB_EXPORT INT32 sdbGetIndex ( sdbCollectionHandle cHandle,
1653  const CHAR *pIndexName,
1654  bson *info ) ;
1655 
1656 
1665 SDB_EXPORT INT32 sdbGetIndexInfo ( sdbCollectionHandle cHandle,
1666  sdbCursorHandle *handle ) ;
1667 
1668 
1677 SDB_EXPORT INT32 sdbDropIndex ( sdbCollectionHandle cHandle,
1678  const CHAR *pIndexName ) ;
1679 
1690 SDB_EXPORT INT32 sdbGetCount ( sdbCollectionHandle cHandle,
1691  bson *condition,
1692  SINT64 *count );
1693 
1694 
1710 SDB_EXPORT INT32 sdbGetCount1 ( sdbCollectionHandle cHandle,
1711  bson *condition,
1712  bson *hint,
1713  SINT64 *count );
1714 
1723 SDB_EXPORT INT32 sdbInsert ( sdbCollectionHandle cHandle,
1724  bson *obj ) ;
1725 
1744 SDB_EXPORT INT32 sdbInsert1 ( sdbCollectionHandle cHandle,
1745  bson *obj, bson_iterator *pId ) ;
1746 
1747 
1794 SDB_EXPORT INT32 sdbInsert2 ( sdbCollectionHandle cHandle,
1795  bson *obj, INT32 flags, bson *pResult ) ;
1796 
1853 SDB_EXPORT INT32 sdbBulkInsert ( sdbCollectionHandle cHandle,
1854  SINT32 flags, bson **objs, SINT32 num ) ;
1855 
1905 SDB_EXPORT INT32 sdbBulkInsert2 ( sdbCollectionHandle cHandle,
1906  SINT32 flags, bson **objs,
1907  SINT32 num,
1908  bson *pResult ) ;
1909 
1926 SDB_EXPORT INT32 sdbUpdate ( sdbCollectionHandle cHandle,
1927  bson *rule,
1928  bson *condition,
1929  bson *hint ) ;
1930 
1953 SDB_EXPORT INT32 sdbUpdate1 ( sdbCollectionHandle cHandle,
1954  bson *rule,
1955  bson *condition,
1956  bson *hint,
1957  INT32 flag ) ;
1958 
1992 SDB_EXPORT INT32 sdbUpdate2 ( sdbCollectionHandle cHandle,
1993  bson *rule,
1994  bson *condition,
1995  bson *hint,
1996  INT32 flag,
1997  bson *pResult ) ;
1998 
2015 SDB_EXPORT INT32 sdbUpsert ( sdbCollectionHandle cHandle,
2016  bson *rule,
2017  bson *condition,
2018  bson *hint ) ;
2019 
2038 SDB_EXPORT INT32 sdbUpsert1 ( sdbCollectionHandle cHandle,
2039  bson *rule,
2040  bson *condition,
2041  bson *hint,
2042  bson *setOnInsert ) ;
2043 
2068 SDB_EXPORT INT32 sdbUpsert2 ( sdbCollectionHandle cHandle,
2069  bson *rule,
2070  bson *condition,
2071  bson *hint,
2072  bson *setOnInsert,
2073  INT32 flag ) ;
2074 
2110 SDB_EXPORT INT32 sdbUpsert3 ( sdbCollectionHandle cHandle,
2111  bson *rule,
2112  bson *condition,
2113  bson *hint,
2114  bson *setOnInsert,
2115  INT32 flag,
2116  bson *pResult ) ;
2117 
2131 SDB_EXPORT INT32 sdbDelete ( sdbCollectionHandle cHandle,
2132  bson *condition,
2133  bson *hint ) ;
2134 
2159 SDB_EXPORT INT32 sdbDelete1 ( sdbCollectionHandle cHandle,
2160  bson *condition,
2161  bson *hint,
2162  INT32 flag,
2163  bson *pResult ) ;
2164 
2196 SDB_EXPORT INT32 sdbQuery1 ( sdbCollectionHandle cHandle,
2197  bson *condition,
2198  bson *select,
2199  bson *orderBy,
2200  bson *hint,
2201  INT64 numToSkip,
2202  INT64 numToReturn,
2203  INT32 flags,
2204  sdbCursorHandle *handle ) ;
2205 
2206 
2230 SDB_EXPORT INT32 sdbQuery ( sdbCollectionHandle cHandle,
2231  bson *condition,
2232  bson *select,
2233  bson *orderBy,
2234  bson *hint,
2235  INT64 numToSkip,
2236  INT64 numToReturn,
2237  sdbCursorHandle *handle ) ;
2238 
2275 SDB_EXPORT INT32 sdbQueryAndUpdate ( sdbCollectionHandle cHandle,
2276  bson *condition,
2277  bson *select,
2278  bson *orderBy,
2279  bson *hint,
2280  bson *update,
2281  INT64 numToSkip,
2282  INT64 numToReturn,
2283  INT32 flag,
2284  BOOLEAN returnNew,
2285  sdbCursorHandle *handle ) ;
2286 
2318 SDB_EXPORT INT32 sdbQueryAndRemove ( sdbCollectionHandle cHandle,
2319  bson *condition,
2320  bson *select,
2321  bson *orderBy,
2322  bson *hint,
2323  INT64 numToSkip,
2324  INT64 numToReturn,
2325  INT32 flag,
2326  sdbCursorHandle *handle ) ;
2327 
2364 SDB_EXPORT INT32 sdbExplain ( sdbCollectionHandle cHandle,
2365  bson *condition,
2366  bson *select,
2367  bson *orderBy,
2368  bson *hint,
2369  INT32 flag,
2370  INT64 numToSkip,
2371  INT64 numToReturn,
2372  bson *options,
2373  sdbCursorHandle *handle ) ;
2374 
2383 SDB_EXPORT INT32 sdbNext ( sdbCursorHandle cHandle,
2384  bson *obj ) ;
2385 
2394 SDB_EXPORT INT32 sdbCurrent ( sdbCursorHandle cHandle,
2395  bson *obj ) ;
2396 
2397 /* \fn INT32 sdbUpdateCurrent ( sdbCursorHandle cHandle, bson *rule )
2398  \brief Update the current document of cursor
2399  \param [in] cHandle The cursor handle
2400  \param [in] rule The updating rule, cannot be null
2401  \retval SDB_OK Operation Success
2402  \retval Others Operation Fail
2403 */
2404 /*
2405 SDB_EXPORT INT32 sdbUpdateCurrent ( sdbCursorHandle cHandle,
2406  bson *rule ) ;
2407 */
2408 /* \fn INT32 sdbDeleteCurrent ( sdbCursorHandle cHandle )
2409  \brief Delete the current document of cursor
2410  \param [in] cHandle The cursor handle
2411  \retval SDB_OK Operation Success
2412  \retval Others Operation Fail
2413 */
2414 /*
2415 SDB_EXPORT INT32 sdbDeleteCurrent ( sdbCursorHandle cHandle ) ;
2416 */
2417 
2426 SDB_EXPORT INT32 sdbCloseCursor ( sdbCursorHandle cHandle ) ;
2427 
2435 SDB_EXPORT INT32 sdbCloseAllCursors ( sdbConnectionHandle cHandle ) ;
2436 
2444 SDB_EXPORT INT32 sdbInterrupt ( sdbConnectionHandle cHandle ) ;
2445 
2455 SDB_EXPORT INT32 sdbInterruptOperation ( sdbConnectionHandle cHandle ) ;
2456 
2457 
2468 SDB_EXPORT INT32 sdbExec( sdbConnectionHandle cHandle,
2469  const CHAR *sql,
2470  sdbCursorHandle *result );
2471 
2480 SDB_EXPORT INT32 sdbExecUpdate( sdbConnectionHandle cHandle,
2481  const CHAR *sql ) ;
2482 
2489 SDB_EXPORT INT32 sdbTransactionBegin( sdbConnectionHandle cHandle ) ;
2490 
2497 SDB_EXPORT INT32 sdbTransactionCommit( sdbConnectionHandle cHandle ) ;
2498 
2505 SDB_EXPORT INT32 sdbTransactionRollback( sdbConnectionHandle cHandle ) ;
2506 
2511 SDB_EXPORT void sdbReleaseConnection ( sdbConnectionHandle cHandle ) ;
2512 
2517 SDB_EXPORT void sdbReleaseCollection ( sdbCollectionHandle cHandle ) ;
2518 
2523 SDB_EXPORT void sdbReleaseCS ( sdbCSHandle cHandle ) ;
2524 
2529 SDB_EXPORT void sdbReleaseCursor ( sdbCursorHandle cHandle ) ;
2530 
2535 SDB_EXPORT void sdbReleaseReplicaGroup ( sdbReplicaGroupHandle cHandle ) ;
2536 
2541 SDB_EXPORT void sdbReleaseNode ( sdbNodeHandle cHandle ) ;
2542 
2547 SDB_EXPORT void sdbReleaseDomain ( sdbDomainHandle cHandle ) ;
2548 
2549 /* \fn void sdbReleaseDC ( sdbDCHandle cHandle )
2550  \brief Release the data center handle
2551  \param [in] cHandle the data center handle
2552 */
2553 SDB_EXPORT void sdbReleaseDC ( sdbDCHandle cHandle ) ;
2554 
2598 SDB_EXPORT INT32 sdbAggregate ( sdbCollectionHandle cHandle,
2599  bson **obj, SINT32 num,
2600  sdbCursorHandle *handle ) ;
2601 
2613 SDB_EXPORT INT32 sdbAttachCollection ( sdbCollectionHandle cHandle,
2614  const CHAR *subClFullName,
2615  bson *options) ;
2616 
2625 SDB_EXPORT INT32 sdbDetachCollection ( sdbCollectionHandle cHandle,
2626  const CHAR *subClFullName) ;
2627 
2649 SDB_EXPORT INT32 sdbBackupOffline ( sdbConnectionHandle cHandle,
2650  bson *options) ;
2651 
2671 SDB_EXPORT INT32 sdbBackup ( sdbConnectionHandle cHandle, bson *options) ;
2672 
2697 SDB_EXPORT INT32 sdbListBackup ( sdbConnectionHandle cHandle,
2698  bson *options,
2699  bson *condition,
2700  bson *selector,
2701  bson *orderBy,
2702  sdbCursorHandle *handle ) ;
2703 
2720 SDB_EXPORT INT32 sdbRemoveBackup ( sdbConnectionHandle cHandle,
2721  bson *options) ;
2722 
2742 SDB_EXPORT INT32 sdbListTasks ( sdbConnectionHandle cHandle,
2743  bson *condition,
2744  bson *selector,
2745  bson *orderBy,
2746  bson *hint,
2747  sdbCursorHandle *handle ) ;
2748 
2759 SDB_EXPORT INT32 sdbWaitTasks ( sdbConnectionHandle cHandle,
2760  const SINT64 *taskIDs,
2761  SINT32 num );
2762 
2774 SDB_EXPORT INT32 sdbCancelTask ( sdbConnectionHandle cHandle,
2775  SINT64 taskID,
2776  BOOLEAN isAsync ) ;
2777 
2790 SDB_EXPORT INT32 sdbSetSessionAttr ( sdbConnectionHandle cHandle,
2791  bson *options ) ;
2792 
2801 SDB_EXPORT INT32 sdbGetSessionAttr ( sdbConnectionHandle cHandle,
2802  bson * result ) ;
2803 
2814 SDB_EXPORT INT32 sdbGetSessionAttrEx ( sdbConnectionHandle cHandle,
2815  BOOLEAN useCache,
2816  bson * result ) ;
2817 
2823 SDB_EXPORT BOOLEAN sdbIsClosed( sdbConnectionHandle cHandle ) ;
2824 
2830 SDB_EXPORT BOOLEAN sdbIsValid( sdbConnectionHandle cHandle ) ;
2831 
2832 SDB_EXPORT INT32 _sdbMsg ( sdbConnectionHandle cHandle, const CHAR *msg ) ;
2833 
2854 SDB_EXPORT INT32 sdbCreateDomain ( sdbConnectionHandle cHandle,
2855  const CHAR *pDomainName,
2856  bson *options,
2857  sdbDomainHandle *handle ) ;
2858 
2867 SDB_EXPORT INT32 sdbDropDomain ( sdbConnectionHandle cHandle,
2868  const CHAR *pDomainName ) ;
2869 
2880 SDB_EXPORT INT32 sdbGetDomain ( sdbConnectionHandle cHandle,
2881  const CHAR *pDomainName,
2882  sdbDomainHandle *handle ) ;
2883 
2902 SDB_EXPORT INT32 sdbListDomains ( sdbConnectionHandle cHandle,
2903  bson *condition,
2904  bson *selector,
2905  bson *orderBy,
2906  sdbCursorHandle *handle ) ;
2907 
2927 SDB_EXPORT INT32 sdbAlterDomain( sdbDomainHandle cHandle,
2928  const bson *options ) ;
2929 
2942 SDB_EXPORT INT32 sdbDomainAddGroups ( sdbDomainHandle cHandle,
2943  const bson * options ) ;
2944 
2958 SDB_EXPORT INT32 sdbDomainRemoveGroups ( sdbDomainHandle cHandle,
2959  const bson * options ) ;
2960 
2975 SDB_EXPORT INT32 sdbDomainSetGroups ( sdbDomainHandle cHandle,
2976  const bson * options ) ;
2977 
2997 SDB_EXPORT INT32 sdbDomainSetAttributes ( sdbDomainHandle cHandle,
2998  const bson * options ) ;
2999 
3008 SDB_EXPORT INT32 sdbListCollectionSpacesInDomain( sdbDomainHandle cHandle,
3009  sdbCursorHandle *cursor ) ;
3010 
3019 SDB_EXPORT INT32 sdbListCollectionsInDomain( sdbDomainHandle cHandle,
3020  sdbCursorHandle *cursor ) ;
3021 
3030 SDB_EXPORT INT32 sdbListGroupsInDomain( sdbDomainHandle cHandle,
3031  sdbCursorHandle *cursor ) ;
3032 
3052 SDB_EXPORT INT32 sdbInvalidateCache( sdbConnectionHandle cHandle,
3053  bson *options ) ;
3054 
3065 SDB_EXPORT INT32 sdbForceSession( sdbConnectionHandle cHandle,
3066  SINT64 sessionID,
3067  bson *options ) ;
3068 
3077 SDB_EXPORT INT32 sdbCreateLobID( sdbCollectionHandle cHandle,
3078  bson_oid_t *oid ) ;
3079 
3092 SDB_EXPORT INT32 sdbCreateLobID1( sdbCollectionHandle cHandle,
3093  const CHAR *pTimeStamp,
3094  bson_oid_t *oid ) ;
3095 
3104 SDB_EXPORT INT32 sdbGetLobId( sdbLobHandle lobHandle,
3105  bson_oid_t *oid ) ;
3106 
3120 SDB_EXPORT INT32 sdbOpenLob( sdbCollectionHandle cHandle,
3121  const bson_oid_t *oid,
3122  INT32 mode,
3123  sdbLobHandle *lobHandle ) ;
3124 
3135 SDB_EXPORT INT32 sdbWriteLob( sdbLobHandle lobHandle,
3136  const CHAR *buf,
3137  UINT32 len ) ;
3138 
3149 SDB_EXPORT INT32 sdbLockLob( sdbLobHandle lobHandle,
3150  INT64 offset,
3151  INT64 length ) ;
3152 
3163 SDB_EXPORT INT32 sdbLockAndSeekLob( sdbLobHandle lobHandle,
3164  INT64 offset,
3165  INT64 length ) ;
3166 
3179 SDB_EXPORT INT32 sdbReadLob( sdbLobHandle lobHandle,
3180  UINT32 len,
3181  CHAR *buf,
3182  UINT32 *read ) ;
3183 
3190 SDB_EXPORT INT32 sdbCloseLob( sdbLobHandle *lobHandle ) ;
3191 
3200 SDB_EXPORT INT32 sdbRemoveLob( sdbCollectionHandle cHandle,
3201  const bson_oid_t *oid ) ;
3202 
3212 SDB_EXPORT INT32 sdbTruncateLob( sdbCollectionHandle cHandle,
3213  const bson_oid_t *oid, INT64 length ) ;
3214 
3223 SDB_EXPORT INT32 sdbGetLobSize( sdbLobHandle lobHandle,
3224  SINT64 *size ) ;
3225 
3234 SDB_EXPORT INT32 sdbGetLobCreateTime( sdbLobHandle lobHandle,
3235  UINT64 *millis ) ;
3236 
3245 SDB_EXPORT INT32 sdbGetLobModificationTime( sdbLobHandle lobHandle,
3246  UINT64 *millis ) ;
3247 
3254 SDB_EXPORT BOOLEAN sdbLobIsEof( sdbLobHandle lobHandle ) ;
3255 
3256 
3267 SDB_EXPORT INT32 sdbSeekLob( sdbLobHandle lobHandle,
3268  SINT64 size,
3269  SDB_LOB_SEEK whence ) ;
3270 
3279 SDB_EXPORT INT32 sdbListLobs( sdbCollectionHandle cHandle,
3280  sdbCursorHandle *cursor) ;
3281 
3303 SDB_EXPORT INT32 sdbListLobs1( sdbCollectionHandle cHandle,
3304  bson *condition,
3305  bson *selected,
3306  bson *orderBy,
3307  bson *hint,
3308  INT64 numToSkip,
3309  INT64 numToReturn,
3310  sdbCursorHandle *cursor) ;
3311 
3320 SDB_EXPORT INT32 sdbListLobPieces( sdbCollectionHandle cHandle,
3321  sdbCursorHandle *cursor ) ;
3322 
3323 
3345 SDB_EXPORT INT32 sdbListLobPieces1( sdbCollectionHandle cHandle,
3346  bson *condition,
3347  bson *selected,
3348  bson *orderBy,
3349  bson *hint,
3350  INT64 numToSkip,
3351  INT64 numToReturn,
3352  sdbCursorHandle *cursor ) ;
3353 
3360 SDB_EXPORT INT32 sdbGetRunTimeDetail( sdbLobHandle lobHandle,
3361  bson *detail) ;
3362 
3363 
3373 SDB_EXPORT INT32 sdbReelect( sdbReplicaGroupHandle cHandle,
3374  const bson *options ) ;
3375 
3383 SDB_EXPORT INT32 sdbForceStepUp( sdbConnectionHandle cHandle,
3384  const bson *options ) ;
3385 
3394 SDB_EXPORT INT32 sdbTruncateCollection( sdbConnectionHandle cHandle,
3395  const CHAR *fullName ) ;
3396 
3416 SDB_EXPORT INT32 sdbDetachNode( sdbReplicaGroupHandle cHandle,
3417  const CHAR *hostName,
3418  const CHAR *serviceName,
3419  const bson *options ) ;
3420 
3438 SDB_EXPORT INT32 sdbAttachNode( sdbReplicaGroupHandle cHandle,
3439  const CHAR *hostName,
3440  const CHAR *serviceName,
3441  const bson *options ) ;
3442 
3453 SDB_EXPORT INT32 sdbCreateIdIndex( sdbCollectionHandle cHandle,
3454  const bson *args ) ;
3455 
3463 SDB_EXPORT INT32 sdbDropIdIndex( sdbCollectionHandle cHandle ) ;
3464 
3477 SDB_EXPORT INT32 sdbEnableSharding ( sdbCollectionHandle cHandle,
3478  const bson * args ) ;
3479 
3486 SDB_EXPORT INT32 sdbDisableSharding ( sdbCollectionHandle cHandle ) ;
3487 
3497 SDB_EXPORT INT32 sdbEnableCompression ( sdbCollectionHandle cHandle,
3498  const bson * args ) ;
3499 
3506 SDB_EXPORT INT32 sdbDisableCompression ( sdbCollectionHandle cHandle ) ;
3507 
3525 SDB_EXPORT INT32 sdbCreateAutoIncrement( sdbCollectionHandle cHandle,
3526  const bson * options ) ;
3527 
3537 SDB_EXPORT INT32 sdbDropAutoIncrement( sdbCollectionHandle cHandle,
3538  const bson * options ) ;
3539 
3560 SDB_EXPORT INT32 sdbCLSetAttributes ( sdbCollectionHandle cHandle,
3561  const bson *options ) ;
3562 
3571 SDB_EXPORT INT32 sdbCLGetDetail ( sdbCollectionHandle cHandle,
3572  sdbCursorHandle *handle ) ;
3573 
3582 SDB_EXPORT INT32 sdbCLGetCollectionStat ( sdbCollectionHandle cHandle,
3583  bson *result ) ;
3584 
3595 SDB_EXPORT INT32 sdbCLGetIndexStat( sdbCollectionHandle cHandle,
3596  const CHAR *pIndexName,
3597  bson *result ) ;
3598 
3611 SDB_EXPORT INT32 sdbCLGetIndexStat1( sdbCollectionHandle cHandle,
3612  const CHAR *pIndexName,
3613  bson *result,
3614  BOOLEAN detail ) ;
3615 
3616 /* \fn INT32 sdbPop( sdbCollectionHandle cHandle, bson *options )
3617  \brief pop records from capped collection
3618  \param [in] cHandle The handle of connection
3619  \param [in] fullName The full name of collection to be popped, eg: foo.bar
3620  \param [in] options Pop target and direction, including "LogicalID" and "Direction".
3621  Direction is optional. Its default value is 1.
3622  e.g. { LogicalID:100, Direction:1 }
3623  \retval SDB_OK Operation Success
3624  \retval Others Operation Fail
3625 */
3626 SDB_EXPORT INT32 sdbPop( sdbCollectionHandle cHandle, bson *options ) ;
3627 
3628 /* \fn INT32 sdbGetDCName( sdbDCHandle cHandle, CHAR *pBuffer, INT32 size )
3629  \brief Get the name of the data center
3630  \param [in] cHandle The data center handle
3631  \param [in] pBuffer The output buffer
3632  \param [in] size The size of the output buffer
3633  \retval SDB_OK Operation Success
3634  \retval Others Operation Fail
3635 */
3636 SDB_EXPORT INT32 sdbGetDCName( sdbDCHandle cHandle, CHAR *pBuffer, INT32 size ) ;
3637 
3638 /* \fn INT32 sdbGetDC( sdbConnectionHandle cHandle, sdbDCHandle *handle )
3639  \brief Get the data center
3640  \param [in] cHandle The connection handle
3641  \param [out] handle The data center handle
3642  \retval SDB_OK Operation Success
3643  \retval Others Operation Fail
3644 */
3645 SDB_EXPORT INT32 sdbGetDC( sdbConnectionHandle cHandle, sdbDCHandle *handle ) ;
3646 
3647 /* \fn INT32 sdbGetDCDetail( sdbDCHandle cHandle, bson *retInfo )
3648  \brief Get the detail of data center
3649  \param [in] cHandle The connection handle
3650  \param [out] retInfo The the detail of data center
3651  \retval SDB_OK Operation Success
3652  \retval Others Operation Fail
3653 */
3654 SDB_EXPORT INT32 sdbGetDCDetail( sdbDCHandle cHandle, bson *retInfo ) ;
3655 
3656 /* \fn INT32 sdbActivateDC( sdbDCHandle cHandle )
3657  \brief Activate the data center
3658  \param [in] cHandle The data center handle
3659  \retval SDB_OK Operation Success
3660  \retval Others Operation Fail
3661 */
3662 SDB_EXPORT INT32 sdbActivateDC( sdbDCHandle cHandle ) ;
3663 
3664 /* \fn INT32 sdbDeactivateDC( sdbDCHandle cHandle )
3665  \brief Deactivate the data center
3666  \param [in] cHandle The data center handle
3667  \retval SDB_OK Operation Success
3668  \retval Others Operation Fail
3669 */
3670 SDB_EXPORT INT32 sdbDeactivateDC( sdbDCHandle cHandle ) ;
3671 
3672 /* \fn INT32 sdbEnableReadOnly( sdbDCHandle cHandle, BOOLEAN isReadOnly )
3673  \brief Enable data center works in readonly mode or not
3674  \param [in] cHandle The data center handle
3675  \param [in] isReadOnly Whether to use readonly mode or not
3676  \retval SDB_OK Operation Success
3677  \retval Others Operation Fail
3678 */
3679 SDB_EXPORT INT32 sdbEnableReadOnly( sdbDCHandle cHandle, BOOLEAN isReadOnly ) ;
3680 
3704 SDB_EXPORT INT32 sdbSyncDB( sdbConnectionHandle cHandle,
3705  bson *options ) ;
3706 
3723 SDB_EXPORT INT32 sdbLoadCollectionSpace( sdbConnectionHandle cHandle,
3724  const CHAR *csName,
3725  bson *options ) ;
3726 
3743 SDB_EXPORT INT32 sdbUnloadCollectionSpace( sdbConnectionHandle cHandle,
3744  const CHAR *csName,
3745  bson *options ) ;
3746 
3763 SDB_EXPORT INT32 sdbSetPDLevel( sdbConnectionHandle cHandle,
3764  INT32 pdLevel,
3765  bson *options ) ;
3766 
3781 SDB_EXPORT INT32 sdbReloadConfig( sdbConnectionHandle cHandle,
3782  bson *options ) ;
3783 
3799 SDB_EXPORT INT32 sdbUpdateConfig( sdbConnectionHandle cHandle,
3800  bson *configs, bson *options ) ;
3801 
3817 SDB_EXPORT INT32 sdbDeleteConfig( sdbConnectionHandle cHandle,
3818  bson *configs, bson *options ) ;
3819 
3832 SDB_EXPORT INT32 sdbRenameCollectionSpace( sdbConnectionHandle cHandle,
3833  const CHAR *pOldName,
3834  const CHAR *pNewName,
3835  bson *options ) ;
3836 
3844 SDB_EXPORT void sdbSetConnectionInterruptFunc(
3845  sdbConnectionHandle cHandle,
3846  socketInterruptFunc func ) ;
3847 
3875 SDB_EXPORT INT32 sdbAnalyze( sdbConnectionHandle cHandle,
3876  bson *options ) ;
3877 
3890 SDB_EXPORT INT32 sdbGetLastErrorObj( sdbConnectionHandle cHandle, bson *errObj ) ;
3891 
3896 SDB_EXPORT void sdbCleanLastErrorObj( sdbConnectionHandle cHandle ) ;
3897 
3921 SDB_EXPORT INT32 sdbCreateSequence( sdbConnectionHandle cHandle,
3922  const CHAR *pSequenceName,
3923  const bson *options,
3924  sdbSequenceHandle *sHandle ) ;
3925 
3936 SDB_EXPORT INT32 sdbGetSequence( sdbConnectionHandle cHandle,
3937  const CHAR *pSequenceName,
3938  sdbSequenceHandle *sHandle ) ;
3939 
3950 SDB_EXPORT INT32 sdbRenameSequence( sdbConnectionHandle cHandle,
3951  const CHAR *pOldName,
3952  const CHAR *pNewName ) ;
3953 
3962 SDB_EXPORT INT32 sdbDropSequence( sdbConnectionHandle cHandle,
3963  const CHAR *pSequenceName ) ;
3964 
3969 SDB_EXPORT void sdbReleaseSequence( sdbSequenceHandle sHandle ) ;
3970 
3989 SDB_EXPORT INT32 sdbSeqSetAttributes( sdbSequenceHandle sHandle,
3990  const bson *options ) ;
3991 
3999 SDB_EXPORT INT32 sdbSeqGetNextValue( sdbSequenceHandle sHandle, INT64 *value ) ;
4000 
4008 SDB_EXPORT INT32 sdbSeqGetCurrentValue( sdbSequenceHandle sHandle,
4009  INT64 *value ) ;
4010 
4019 SDB_EXPORT INT32 sdbSeqSetCurrentValue( sdbSequenceHandle sHandle,
4020  const INT64 value ) ;
4021 
4036 SDB_EXPORT INT32 sdbSeqFetch( sdbSequenceHandle sHandle,
4037  const INT32 fetchNum,
4038  INT64 *nextValue,
4039  INT32 *returnNum,
4040  INT32 *increment ) ;
4041 
4049 SDB_EXPORT INT32 sdbSeqRestart( sdbSequenceHandle sHandle,
4050  const INT64 startValue ) ;
4051 
4052 SDB_EXTERN_C_END
4053 #endif