25 #include "bson/bson.h"
33 #define SDB_PAGESIZE_4K 4096
35 #define SDB_PAGESIZE_8K 8192
37 #define SDB_PAGESIZE_16K 16384
39 #define SDB_PAGESIZE_32K 32768
41 #define SDB_PAGESIZE_64K 65536
43 #define SDB_PAGESIZE_DEFAULT 0
69 #define SDB_INVALID_HANDLE ((ossValuePtr) 0)
95 const CHAR *pDescription,
96 const CHAR *pDetail ) ;
108 #define sdbCreateReplicaNode sdbCreateNode
110 #define sdbRemoveReplicaNode sdbRemoveNode
112 #define sdbGetReplicaNodeMaster sdbGetNodeMaster
114 #define sdbGetReplicaNodeSlave sdbGetNodeSlave
116 #define sdbGetReplicaNodeByName sdbGetNodeByName
118 #define sdbGetReplicaNodeByHost sdbGetNodeByHost
120 #define sdbGetReplicaNodeSddr sdbGetNodeAddr
122 #define sdbStartReplicaNode sdbStartNode
124 #define sdbStopReplicaNode sdbStopNode
126 #define sdbReleaseReplicaNode sdbReleaseNode
129 #define QUERY_FORCE_HINT 0x00000080
131 #define QUERY_PARALLED 0x00000100
133 #define QUERY_WITH_RETURNDATA 0x00000200
135 #define QUERY_PREPARE_MORE 0x00004000
137 #define QUERY_KEEP_SHARDINGKEY_IN_UPDATE 0x00008000
143 #define QUERY_FOR_UPDATE 0x00010000
147 #define FLG_INSERT_CONTONDUP 0x00000001
151 #define FLG_INSERT_REPLACEONDUP 0x00000004
157 #define FLG_INSERT_CONTONDUP_ID 0x00000020
160 #define FLG_INSERT_REPLACEONDUP_ID 0x00000040
162 #define FLG_INSERT_RETURN_OID 0x10000000
165 #define UPDATE_KEEP_SHARDINGKEY QUERY_KEEP_SHARDINGKEY_IN_UPDATE
197 const CHAR *pCipherFile,
198 CHAR *pUser, CHAR *pPasswd ) ;
214 SDB_EXPORT INT32
sdbConnect (
const CHAR *pHostName,
const CHAR *pServiceName,
215 const CHAR *pUsrName,
const CHAR *pPasswd ,
230 SDB_EXPORT INT32
sdbConnect1 (
const CHAR **pConnAddrs, INT32 arrSize,
231 const CHAR *pUsrName,
const CHAR *pPasswd ,
248 SDB_EXPORT INT32
sdbSecureConnect (
const CHAR *pHostName,
const CHAR *pServiceName,
249 const CHAR *pUsrName,
const CHAR *pPasswd ,
265 const CHAR *pUsrName,
const CHAR *pPasswd ,
284 const CHAR *pPasswd ) ;
296 const CHAR *pPasswd ) ;
552 UINT32 traceBufferSize,
574 const CHAR *pDumpFileName ) ;
693 const CHAR *pCollectionFullName,
707 const CHAR *pCollectionSpaceName,
760 CHAR *pBuffer, INT32 size ) ;
792 const CHAR *pCollectionSpaceName,
814 const CHAR *pCollectionSpaceName,
827 const CHAR *pCollectionSpaceName ) ;
843 const CHAR *pCollectionSpaceName,
869 const CHAR *pRGName ) ;
917 const INT32 *positionsArray,
918 INT32 positionsCount,
934 const CHAR *pNodeName,
951 const CHAR *pHostName,
952 const CHAR *pServiceName,
970 const CHAR **ppHostName,
971 const CHAR **ppServiceName,
972 const CHAR **ppNodeName,
1014 const CHAR *pHostName,
1015 const CHAR *pServiceName,
1016 const CHAR *pDatabasePath,
1034 const CHAR *pHostName,
1035 const CHAR *pServiceName,
1036 const CHAR *pDatabasePath,
1052 const CHAR *pHostName,
1053 const CHAR *pServiceName,
1135 const CHAR *code ) ;
1146 const CHAR *spName ) ;
1196 const CHAR *pCollectionName,
1213 const CHAR *pCollectionName,
1258 const CHAR *pCollectionName,
1304 const CHAR *pCollectionName ) ;
1316 CHAR *pBuffer, INT32 size ) ;
1331 const CHAR *pOldName,
1332 const CHAR *pNewName,
1375 CHAR *pResult, INT32 size ) ;
1437 CHAR *pBuffer, INT32 size ) ;
1449 CHAR *pBuffer, INT32 size ) ;
1470 const CHAR *pSourceRG,
1471 const CHAR *pTargetRG,
1472 const bson *pSplitCondition,
1473 const bson *pSplitEndCondition ) ;
1496 const CHAR *pSourceRG,
1497 const CHAR *pTargetRG,
1498 const bson *pSplitCondition,
1499 const bson *pSplitEndCondition,
1515 const CHAR *pSourceRG,
1516 const CHAR *pTargetRG,
1534 const CHAR *pSourceRG,
1535 const CHAR *pTargetRG,
1556 const CHAR *pIndexName,
1558 BOOLEAN isEnforced ) ;
1580 const CHAR *pIndexName,
1583 INT32 sortBufferSize ) ;
1607 const CHAR *pIndexName,
1622 const CHAR *pIndexName,
1636 const CHAR *pIndexName,
1661 const CHAR *pIndexName ) ;
1728 bson *obj, bson_iterator *pId ) ;
1778 bson *obj, INT32 flags, bson *pResult ) ;
1837 SINT32 flags, bson **objs, SINT32 num ) ;
1889 SINT32 flags, bson **objs,
2025 bson *setOnInsert ) ;
2536 SDB_EXPORT
void sdbReleaseDC (
sdbDCHandle cHandle ) ;
2582 bson **obj, SINT32 num,
2597 const CHAR *subClFullName,
2609 const CHAR *subClFullName) ;
2743 const SINT64 *taskIDs,
2838 const CHAR *pDomainName,
2851 const CHAR *pDomainName ) ;
2864 const CHAR *pDomainName,
2911 const bson *options ) ;
2926 const bson * options ) ;
2942 const bson * options ) ;
2959 const bson * options ) ;
2981 const bson * options ) ;
3076 const CHAR *pTimeStamp,
3104 const bson_oid_t *oid,
3184 const bson_oid_t *oid ) ;
3196 const bson_oid_t *oid, INT64 length ) ;
3357 const bson *options ) ;
3367 const bson *options ) ;
3378 const CHAR *fullName ) ;
3400 const CHAR *hostName,
3401 const CHAR *serviceName,
3402 const bson *options ) ;
3422 const CHAR *hostName,
3423 const CHAR *serviceName,
3424 const bson *options ) ;
3437 const bson *args ) ;
3461 const bson * args ) ;
3481 const bson * args ) ;
3509 const bson * options ) ;
3521 const bson * options ) ;
3544 const bson *options ) ;
3568 const CHAR *pIndexName,
3584 const CHAR *pIndexName,
3608 SDB_EXPORT INT32 sdbGetDCName(
sdbDCHandle cHandle, CHAR *pBuffer, INT32 size ) ;
3626 SDB_EXPORT INT32 sdbGetDCDetail(
sdbDCHandle cHandle, bson *retInfo ) ;
3634 SDB_EXPORT INT32 sdbActivateDC(
sdbDCHandle cHandle ) ;
3642 SDB_EXPORT INT32 sdbDeactivateDC(
sdbDCHandle cHandle ) ;
3651 SDB_EXPORT INT32 sdbEnableReadOnly(
sdbDCHandle cHandle, BOOLEAN isReadOnly ) ;
3661 SDB_EXPORT INT32 sdbCreateImage(
sdbDCHandle cHandle,
const CHAR *pCataAddrList ) ;
3669 SDB_EXPORT INT32 sdbRemoveImage(
sdbDCHandle cHandle ) ;
3677 SDB_EXPORT INT32 sdbEnableImage(
sdbDCHandle cHandle ) ;
3685 SDB_EXPORT INT32 sdbDisableImage(
sdbDCHandle cHandle ) ;
3719 SDB_EXPORT INT32 sdbAttachGroups(
sdbDCHandle cHandle, bson *info ) ;
3728 SDB_EXPORT INT32 sdbDetachGroups(
sdbDCHandle cHandle, bson *info ) ;
3849 bson *configs, bson *options ) ;
3867 bson *configs, bson *options ) ;
3882 const CHAR *pOldName,
3883 const CHAR *pNewName,
3971 const CHAR *pSequenceName,
3972 const bson *options,
3986 const CHAR *pSequenceName,
4000 const CHAR *pOldName,
4001 const CHAR *pNewName ) ;
4012 const CHAR *pSequenceName ) ;
4039 const bson *options ) ;
4069 const INT64 value ) ;
4086 const INT32 fetchNum,
4089 INT32 *increment ) ;
4099 const INT64 startValue ) ;