28 #if defined (SDB_ENGINE) || defined (SDB_CLIENT)
29 #include "../bson/bson.h"
30 #include "../util/fromjson.hpp"
32 #include "bson/bson.hpp"
33 #include "fromjson.hpp"
41 #define RELEASE_INNER_HANDLE( handle ) \
51 #define DLLEXPORT SDB_EXPORT
54 #define SDB_PAGESIZE_4K 4096
56 #define SDB_PAGESIZE_8K 8192
58 #define SDB_PAGESIZE_16K 16384
60 #define SDB_PAGESIZE_32K 32768
62 #define SDB_PAGESIZE_64K 65536
64 #define SDB_PAGESIZE_DEFAULT 0
68 #define FLG_INSERT_CONTONDUP 0x00000001
70 #define FLG_INSERT_RETURNNUM 0x00000002
72 #define FLG_INSERT_REPLACEONDUP 0x00000004
74 #define FLG_INSERT_RETURN_OID 0x10000000
81 #define SDB_CLIENT_SOCKET_TIMEOUT_DFT 10000
84 #define sdbReplicaNode sdbNode
87 #define QUERY_FORCE_HINT 0x00000080
89 #define QUERY_PARALLED 0x00000100
91 #define QUERY_WITH_RETURNDATA 0x00000200
93 #define QUERY_PREPARE_MORE 0x00004000
95 #define QUERY_KEEP_SHARDINGKEY_IN_UPDATE 0x00008000
101 #define QUERY_FOR_UPDATE 0x00010000
105 #define UPDATE_KEEP_SHARDINGKEY QUERY_KEEP_SHARDINGKEY_IN_UPDATE
107 #define UPDATE_RETURNNUM 0x00000004
110 #define FLG_DELETE_RETURNNUM 0x00000004
112 #define SDB_INDEX_SORT_BUFFER_DEFAULT_SIZE 64
141 const static bson::BSONObj _sdbStaticObject ;
142 const static bson::OID _sdbStaticOid ;
143 const static std::vector<INT32> _sdbStaticVec ;
144 const static std::vector<UINT32> _sdbStaticUINT32Vec ;
146 class _sdbCollection ;
157 const CHAR *pDescription,
158 const CHAR *pDetail ) ;
166 class DLLEXPORT _sdbCursor
169 _sdbCursor (
const _sdbCursor& other ) ;
170 _sdbCursor& operator=(
const _sdbCursor& ) ;
173 virtual ~_sdbCursor () {}
174 virtual INT32 next ( bson::BSONObj &obj, BOOLEAN getOwned = TRUE ) = 0 ;
175 virtual INT32 current ( bson::BSONObj &obj, BOOLEAN getOwned = TRUE ) = 0 ;
176 virtual INT32 close () = 0 ;
231 INT32 next ( bson::BSONObj &obj, BOOLEAN getOwned = TRUE )
235 return SDB_NOT_CONNECTED ;
237 return pCursor->
next ( obj, getOwned ) ;
256 INT32 current ( bson::BSONObj &obj, BOOLEAN getOwned = TRUE )
260 return SDB_NOT_CONNECTED ;
262 return pCursor->current ( obj, getOwned ) ;
276 return pCursor->close () ;
280 class DLLEXPORT _sdbCollection
283 _sdbCollection (
const _sdbCollection& other ) ;
284 _sdbCollection& operator=(
const _sdbCollection& ) ;
287 virtual ~_sdbCollection () {}
290 virtual INT32 getCount ( SINT64 &count,
291 const bson::BSONObj &condition = _sdbStaticObject,
292 const bson::BSONObj &hint = _sdbStaticObject ) = 0 ;
297 virtual INT32 insert (
const bson::BSONObj &obj, bson::OID *
id = NULL ) = 0 ;
298 virtual INT32 insert (
const bson::BSONObj &obj,
300 bson::BSONObj *pResult = NULL ) = 0 ;
301 virtual INT32 insert ( std::vector<bson::BSONObj> &objs,
303 bson::BSONObj *pResult = NULL ) = 0 ;
304 virtual INT32 insert (
const bson::BSONObj objs[],
307 bson::BSONObj *pResult = NULL ) = 0 ;
308 virtual INT32 bulkInsert ( SINT32 flags,
309 std::vector<bson::BSONObj> &obj
318 virtual INT32 update (
const bson::BSONObj &rule,
319 const bson::BSONObj &condition = _sdbStaticObject,
320 const bson::BSONObj &hint = _sdbStaticObject,
322 bson::BSONObj *pResult = NULL
334 virtual INT32 upsert (
const bson::BSONObj &rule,
335 const bson::BSONObj &condition = _sdbStaticObject,
336 const bson::BSONObj &hint = _sdbStaticObject,
337 const bson::BSONObj &setOnInsert = _sdbStaticObject,
339 bson::BSONObj *pResult = NULL
348 virtual INT32 del (
const bson::BSONObj &condition = _sdbStaticObject,
349 const bson::BSONObj &hint = _sdbStaticObject,
351 bson::BSONObj *pResult = NULL
361 virtual INT32 query ( _sdbCursor **cursor,
362 const bson::BSONObj &condition = _sdbStaticObject,
363 const bson::BSONObj &selected = _sdbStaticObject,
364 const bson::BSONObj &orderBy = _sdbStaticObject,
365 const bson::BSONObj &hint = _sdbStaticObject,
367 INT64 numToReturn = -1,
371 virtual INT32 query ( sdbCursor &cursor,
372 const bson::BSONObj &condition = _sdbStaticObject,
373 const bson::BSONObj &selected = _sdbStaticObject,
374 const bson::BSONObj &orderBy = _sdbStaticObject,
375 const bson::BSONObj &hint = _sdbStaticObject,
377 INT64 numToReturn = -1,
381 virtual INT32 queryOne( bson::BSONObj &obj,
382 const bson::BSONObj &condition = _sdbStaticObject,
383 const bson::BSONObj &selected = _sdbStaticObject,
384 const bson::BSONObj &orderBy = _sdbStaticObject,
385 const bson::BSONObj &hint = _sdbStaticObject,
387 INT32 flags = 0 ) = 0 ;
399 virtual INT32 queryAndUpdate ( _sdbCursor **cursor,
400 const bson::BSONObj &update,
401 const bson::BSONObj &condition = _sdbStaticObject,
402 const bson::BSONObj &selected = _sdbStaticObject,
403 const bson::BSONObj &orderBy = _sdbStaticObject,
404 const bson::BSONObj &hint = _sdbStaticObject,
406 INT64 numToReturn = -1,
408 BOOLEAN returnNew = FALSE
419 virtual INT32 queryAndRemove ( _sdbCursor **cursor,
420 const bson::BSONObj &condition = _sdbStaticObject,
421 const bson::BSONObj &selected = _sdbStaticObject,
422 const bson::BSONObj &orderBy = _sdbStaticObject,
423 const bson::BSONObj &hint = _sdbStaticObject,
425 INT64 numToReturn = -1,
436 virtual INT32 createIndex (
const bson::BSONObj &indexDef,
440 INT32 sortBufferSize ) = 0 ;
441 virtual INT32 createIndex (
const bson::BSONObj &indexDef,
443 const bson::BSONObj &options ) = 0 ;
444 virtual INT32 getIndexes ( _sdbCursor **cursor,
445 const CHAR *pName ) = 0 ;
446 virtual INT32 getIndexes ( sdbCursor &cursor,
447 const CHAR *pIndexName ) = 0 ;
448 virtual INT32 getIndexes ( std::vector<bson::BSONObj> &infos ) = 0 ;
449 virtual INT32 getIndex (
const CHAR *pIndexName, bson::BSONObj &info ) = 0 ;
450 virtual INT32 dropIndex (
const CHAR *pIndexName ) = 0 ;
451 virtual INT32 create () = 0 ;
452 virtual INT32 drop () = 0 ;
453 virtual const CHAR *getCollectionName () = 0 ;
454 virtual const CHAR *getCSName () = 0 ;
455 virtual const CHAR *getFullName () = 0 ;
456 virtual INT32 split (
const CHAR *pSourceGroupName,
457 const CHAR *pTargetGroupName,
458 const bson::BSONObj &splitConditon,
459 const bson::BSONObj &splitEndCondition = _sdbStaticObject) = 0 ;
460 virtual INT32 split (
const CHAR *pSourceGroupName,
461 const CHAR *pTargetGroupName,
462 FLOAT64 percent ) = 0 ;
463 virtual INT32 splitAsync ( SINT64 &taskID,
464 const CHAR *pSourceGroupName,
465 const CHAR *pTargetGroupName,
466 const bson::BSONObj &splitCondition,
467 const bson::BSONObj &splitEndCondition = _sdbStaticObject) = 0 ;
468 virtual INT32 splitAsync (
const CHAR *pSourceGroupName,
469 const CHAR *pTargetGroupName,
471 SINT64 &taskID ) = 0 ;
472 virtual INT32 aggregate ( _sdbCursor **cursor,
473 std::vector<bson::BSONObj> &obj
475 virtual INT32 aggregate ( sdbCursor &cursor,
476 std::vector<bson::BSONObj> &obj
478 virtual INT32 getQueryMeta ( _sdbCursor **cursor,
479 const bson::BSONObj &condition = _sdbStaticObject,
480 const bson::BSONObj &orderBy = _sdbStaticObject,
481 const bson::BSONObj &hint = _sdbStaticObject,
483 INT64 numToReturn = -1
485 virtual INT32 getQueryMeta ( sdbCursor &cursor,
486 const bson::BSONObj &condition = _sdbStaticObject,
487 const bson::BSONObj &orderBy = _sdbStaticObject,
488 const bson::BSONObj &hint = _sdbStaticObject,
490 INT64 numToReturn = -1
492 virtual INT32 attachCollection (
const CHAR *subClFullName,
493 const bson::BSONObj &options) = 0 ;
494 virtual INT32 detachCollection (
const CHAR *subClFullName) = 0 ;
496 virtual INT32 alterCollection (
const bson::BSONObj &options ) = 0 ;
498 virtual INT32 explain ( sdbCursor &cursor,
499 const bson::BSONObj &condition = _sdbStaticObject,
500 const bson::BSONObj &select = _sdbStaticObject,
501 const bson::BSONObj &orderBy = _sdbStaticObject,
502 const bson::BSONObj &hint = _sdbStaticObject,
504 INT64 numToReturn = -1,
506 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
508 virtual INT32 explain ( _sdbCursor **cursor,
509 const bson::BSONObj &condition = _sdbStaticObject,
510 const bson::BSONObj &select = _sdbStaticObject,
511 const bson::BSONObj &orderBy = _sdbStaticObject,
512 const bson::BSONObj &hint = _sdbStaticObject,
514 INT64 numToReturn = -1,
516 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
518 virtual INT32 createLob( sdbLob &lob,
const bson::OID *oid = NULL ) = 0 ;
520 virtual INT32 removeLob(
const bson::OID &oid ) = 0 ;
522 virtual INT32 truncateLob(
const bson::OID &oid, INT64 length ) = 0 ;
524 virtual INT32 openLob( sdbLob &lob,
const bson::OID &oid,
527 virtual INT32 listLobs( sdbCursor &cursor,
528 const bson::BSONObj &condition = _sdbStaticObject,
529 const bson::BSONObj &selected = _sdbStaticObject,
530 const bson::BSONObj &orderBy = _sdbStaticObject,
531 const bson::BSONObj &hint = _sdbStaticObject,
533 INT64 numToReturn = -1 ) = 0 ;
535 virtual INT32 listLobs( _sdbCursor **cursor,
536 const bson::BSONObj &condition = _sdbStaticObject,
537 const bson::BSONObj &selected = _sdbStaticObject,
538 const bson::BSONObj &orderBy = _sdbStaticObject,
539 const bson::BSONObj &hint = _sdbStaticObject,
541 INT64 numToReturn = -1 ) = 0 ;
543 virtual INT32 createLobID( bson::OID &oid,
const CHAR *pTimeStamp = NULL ) = 0 ;
545 virtual INT32 listLobPieces(
547 const bson::BSONObj &condition = _sdbStaticObject,
548 const bson::BSONObj &selected = _sdbStaticObject,
549 const bson::BSONObj &orderBy = _sdbStaticObject,
550 const bson::BSONObj &hint = _sdbStaticObject,
552 INT64 numToReturn = -1 ) = 0 ;
554 virtual INT32 listLobPieces(
556 const bson::BSONObj &condition = _sdbStaticObject,
557 const bson::BSONObj &selected = _sdbStaticObject,
558 const bson::BSONObj &orderBy = _sdbStaticObject,
559 const bson::BSONObj &hint = _sdbStaticObject,
561 INT64 numToReturn = -1 ) = 0 ;
564 virtual INT32 truncate() = 0 ;
567 virtual INT32 createIdIndex(
const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
569 virtual INT32 dropIdIndex() = 0 ;
571 virtual INT32 createAutoIncrement(
const bson::BSONObj &options ) = 0;
573 virtual INT32 createAutoIncrement(
const std::vector<bson::BSONObj> &options ) = 0;
575 virtual INT32 dropAutoIncrement(
const CHAR* fieldName ) = 0;
577 virtual INT32 dropAutoIncrement(
const std::vector<const CHAR*> &fieldNames ) = 0;
579 virtual INT32 pop (
const bson::BSONObj &option = _sdbStaticObject ) = 0 ;
581 virtual INT32 enableSharding (
const bson::BSONObj & options ) = 0 ;
583 virtual INT32 disableSharding () = 0 ;
585 virtual INT32 enableCompression (
const bson::BSONObj & options = _sdbStaticObject ) = 0 ;
587 virtual INT32 disableCompression () = 0 ;
589 virtual INT32 setAttributes (
const bson::BSONObj & options ) = 0 ;
591 virtual INT32 getDetail ( _sdbCursor **cursor ) = 0 ;
593 virtual INT32 getDetail ( sdbCursor &cursor ) = 0 ;
655 INT32 getCount ( SINT64 &count,
656 const bson::BSONObj &condition = _sdbStaticObject,
657 const bson::BSONObj &hint = _sdbStaticObject )
661 return SDB_NOT_CONNECTED ;
663 return pCollection->
getCount ( count, condition, hint ) ;
683 INT32 split (
const CHAR *pSourceGroupName,
684 const CHAR *pTargetGroupName,
685 const bson::BSONObj &splitCondition,
686 const bson::BSONObj &splitEndCondition = _sdbStaticObject)
690 return SDB_NOT_CONNECTED ;
692 return pCollection->split ( pSourceGroupName,
709 INT32 split (
const CHAR *pSourceGroupName,
710 const CHAR *pTargetGroupName,
715 return SDB_NOT_CONNECTED ;
717 return pCollection->split ( pSourceGroupName,
741 INT32 splitAsync ( SINT64 &taskID,
742 const CHAR *pSourceGroupName,
743 const CHAR *pTargetGroupName,
744 const bson::BSONObj &splitCondition,
745 const bson::BSONObj &splitEndCondition = _sdbStaticObject )
749 return SDB_NOT_CONNECTED ;
751 return pCollection->splitAsync ( taskID,
755 splitEndCondition ) ;
771 INT32 splitAsync (
const CHAR *pSourceGroupName,
772 const CHAR *pTargetGroupName,
778 return SDB_NOT_CONNECTED ;
780 return pCollection->splitAsync ( pSourceGroupName,
805 INT32 alterCollection (
const bson::BSONObj &options )
809 return SDB_NOT_CONNECTED ;
811 return pCollection->alterCollection ( options ) ;
836 INT32 insert (
const bson::BSONObj &obj, bson::OID *pId = NULL )
840 return SDB_NOT_CONNECTED ;
842 return pCollection->insert ( obj, pId ) ;
886 INT32 insert (
const bson::BSONObj &obj,
888 bson::BSONObj *pResult = NULL )
892 return SDB_NOT_CONNECTED ;
894 return pCollection->insert ( obj, flags, pResult ) ;
941 INT32 insert ( std::vector<bson::BSONObj> &objs,
943 bson::BSONObj *pResult = NULL )
947 return SDB_NOT_CONNECTED ;
949 return pCollection->insert( objs, flags, pResult ) ;
999 INT32 insert (
const bson::BSONObj objs[],
1002 bson::BSONObj *pResult = NULL )
1006 return SDB_NOT_CONNECTED ;
1008 return pCollection->insert ( objs, size, flags, pResult ) ;
1038 INT32 bulkInsert ( SINT32 flags,
1039 std::vector<bson::BSONObj> &objs )
1043 return SDB_NOT_CONNECTED ;
1045 return pCollection->bulkInsert ( flags, objs ) ;
1070 INT32 update (
const bson::BSONObj &rule,
1071 const bson::BSONObj &condition = _sdbStaticObject,
1072 const bson::BSONObj &hint = _sdbStaticObject,
1074 bson::BSONObj *pResult = NULL
1079 return SDB_NOT_CONNECTED ;
1081 return pCollection->update ( rule, condition, hint, flag, pResult ) ;
1107 INT32 upsert (
const bson::BSONObj &rule,
1108 const bson::BSONObj &condition = _sdbStaticObject,
1109 const bson::BSONObj &hint = _sdbStaticObject,
1110 const bson::BSONObj &setOnInsert = _sdbStaticObject,
1112 bson::BSONObj *pResult = NULL
1117 return SDB_NOT_CONNECTED ;
1119 return pCollection->upsert ( rule, condition, hint, setOnInsert,
1137 INT32 del (
const bson::BSONObj &condition = _sdbStaticObject,
1138 const bson::BSONObj &hint = _sdbStaticObject,
1140 bson::BSONObj *pResult = NULL
1145 return SDB_NOT_CONNECTED ;
1147 return pCollection->del ( condition, hint, flag, pResult ) ;
1180 INT32 query ( _sdbCursor **cursor,
1181 const bson::BSONObj &condition = _sdbStaticObject,
1182 const bson::BSONObj &selected = _sdbStaticObject,
1183 const bson::BSONObj &orderBy = _sdbStaticObject,
1184 const bson::BSONObj &hint = _sdbStaticObject,
1185 INT64 numToSkip = 0,
1186 INT64 numToReturn = -1,
1192 return SDB_NOT_CONNECTED ;
1194 return pCollection->query ( cursor, condition, selected, orderBy,
1195 hint, numToSkip, numToReturn, flags ) ;
1229 const bson::BSONObj &condition = _sdbStaticObject,
1230 const bson::BSONObj &selected = _sdbStaticObject,
1231 const bson::BSONObj &orderBy = _sdbStaticObject,
1232 const bson::BSONObj &hint = _sdbStaticObject,
1233 INT64 numToSkip = 0,
1234 INT64 numToReturn = -1,
1240 return SDB_NOT_CONNECTED ;
1243 return pCollection->query ( cursor, condition, selected, orderBy,
1244 hint, numToSkip, numToReturn, flags ) ;
1275 INT32 queryOne( bson::BSONObj &obj,
1276 const bson::BSONObj &condition = _sdbStaticObject,
1277 const bson::BSONObj &selected = _sdbStaticObject,
1278 const bson::BSONObj &orderBy = _sdbStaticObject,
1279 const bson::BSONObj &hint = _sdbStaticObject,
1280 INT64 numToSkip = 0,
1285 return SDB_NOT_CONNECTED ;
1287 return pCollection->queryOne( obj, condition, selected, orderBy,
1288 hint, numToSkip, flag ) ;
1327 const bson::BSONObj &update,
1328 const bson::BSONObj &condition = _sdbStaticObject,
1329 const bson::BSONObj &selected = _sdbStaticObject,
1330 const bson::BSONObj &orderBy = _sdbStaticObject,
1331 const bson::BSONObj &hint = _sdbStaticObject,
1332 INT64 numToSkip = 0,
1333 INT64 numToReturn = -1,
1335 BOOLEAN returnNew = FALSE
1340 return SDB_NOT_CONNECTED ;
1343 return pCollection->queryAndUpdate( &cursor.
pCursor , update, condition,
1344 selected, orderBy, hint,
1345 numToSkip, numToReturn, flag, returnNew ) ;
1379 const bson::BSONObj &condition = _sdbStaticObject,
1380 const bson::BSONObj &selected = _sdbStaticObject,
1381 const bson::BSONObj &orderBy = _sdbStaticObject,
1382 const bson::BSONObj &hint = _sdbStaticObject,
1383 INT64 numToSkip = 0,
1384 INT64 numToReturn = -1,
1390 return SDB_NOT_CONNECTED ;
1393 return pCollection->queryAndRemove( &cursor.
pCursor , condition,
1394 selected, orderBy, hint,
1395 numToSkip, numToReturn, flag ) ;
1414 INT32 createIndex (
const bson::BSONObj &indexDef,
1415 const CHAR *pIndexName,
1418 INT32 sortBufferSize =
1419 SDB_INDEX_SORT_BUFFER_DEFAULT_SIZE )
1423 return SDB_NOT_CONNECTED ;
1425 return pCollection->createIndex ( indexDef, pIndexName, isUnique,
1426 isEnforced, sortBufferSize ) ;
1447 INT32 createIndex (
const bson::BSONObj &indexDef,
1448 const CHAR *pIndexName,
1449 const bson::BSONObj &options )
1453 return SDB_NOT_CONNECTED ;
1455 return pCollection->createIndex ( indexDef, pIndexName, options ) ;
1466 INT32 getIndexes ( _sdbCursor **cursor,
1467 const CHAR *pIndexName )
1471 return SDB_NOT_CONNECTED ;
1473 return pCollection->getIndexes ( cursor, pIndexName ) ;
1486 const CHAR *pIndexName )
1490 return SDB_NOT_CONNECTED ;
1493 return pCollection->getIndexes ( cursor, pIndexName ) ;
1502 INT32 getIndexes ( std::vector<bson::BSONObj> &infos )
1506 return SDB_NOT_CONNECTED ;
1508 return pCollection->getIndexes ( infos ) ;
1518 INT32 getIndex (
const CHAR *pIndexName, bson::BSONObj &info )
1522 return SDB_NOT_CONNECTED ;
1524 return pCollection->getIndex ( pIndexName, info ) ;
1533 INT32 dropIndex (
const CHAR *pIndexName )
1537 return SDB_NOT_CONNECTED ;
1539 return pCollection->dropIndex ( pIndexName ) ;
1552 return SDB_NOT_CONNECTED ;
1554 return pCollection->create () ;
1567 return SDB_NOT_CONNECTED ;
1569 return pCollection->drop () ;
1576 const CHAR *getCollectionName ()
1582 return pCollection->getCollectionName () ;
1589 const CHAR *getCSName ()
1595 return pCollection->getCSName () ;
1602 const CHAR *getFullName ()
1608 return pCollection->getFullName () ;
1620 INT32 aggregate ( _sdbCursor **cursor,
1621 std::vector<bson::BSONObj> &obj
1626 return SDB_NOT_CONNECTED ;
1628 return pCollection->aggregate ( cursor, obj ) ;
1641 std::vector<bson::BSONObj> &obj
1646 return SDB_NOT_CONNECTED ;
1649 return pCollection->aggregate ( cursor, obj ) ;
1671 INT32 getQueryMeta ( _sdbCursor **cursor,
1672 const bson::BSONObj &condition = _sdbStaticObject,
1673 const bson::BSONObj &orderBy = _sdbStaticObject,
1674 const bson::BSONObj &hint = _sdbStaticObject,
1675 INT64 numToSkip = 0,
1676 INT64 numToReturn = -1 )
1680 return SDB_NOT_CONNECTED ;
1682 return pCollection->getQueryMeta ( cursor, condition, orderBy,
1683 hint, numToSkip, numToReturn ) ;
1707 const bson::BSONObj &condition = _sdbStaticObject,
1708 const bson::BSONObj &orderBy = _sdbStaticObject,
1709 const bson::BSONObj &hint = _sdbStaticObject,
1710 INT64 numToSkip = 0,
1711 INT64 numToReturn = -1 )
1715 return SDB_NOT_CONNECTED ;
1718 return pCollection->getQueryMeta ( cursor, condition, orderBy,
1719 hint, numToSkip, numToReturn ) ;
1735 INT32 attachCollection (
const CHAR *subClFullName,
1736 const bson::BSONObj &options)
1740 return SDB_NOT_CONNECTED ;
1742 return pCollection->attachCollection ( subClFullName, options ) ;
1751 INT32 detachCollection (
const CHAR *subClFullName)
1755 return SDB_NOT_CONNECTED ;
1757 return pCollection->detachCollection ( subClFullName ) ;
1796 const bson::BSONObj &condition = _sdbStaticObject,
1797 const bson::BSONObj &select = _sdbStaticObject,
1798 const bson::BSONObj &orderBy = _sdbStaticObject,
1799 const bson::BSONObj &hint = _sdbStaticObject,
1800 INT64 numToSkip = 0,
1801 INT64 numToReturn = -1,
1803 const bson::BSONObj &options = _sdbStaticObject )
1807 return SDB_NOT_CONNECTED ;
1810 return pCollection->explain( cursor, condition, select, orderBy, hint,
1811 numToSkip, numToReturn, flag, options ) ;
1814 INT32 explain ( _sdbCursor **cursor,
1815 const bson::BSONObj &condition = _sdbStaticObject,
1816 const bson::BSONObj &select = _sdbStaticObject,
1817 const bson::BSONObj &orderBy = _sdbStaticObject,
1818 const bson::BSONObj &hint = _sdbStaticObject,
1819 INT64 numToSkip = 0,
1820 INT64 numToReturn = -1,
1822 const bson::BSONObj &options = _sdbStaticObject )
1826 return SDB_NOT_CONNECTED ;
1828 return pCollection->explain( cursor, condition, select, orderBy, hint,
1829 numToSkip, numToReturn, flag, options ) ;
1840 INT32 createLob(
sdbLob &lob,
const bson::OID *oid = NULL )
1844 return SDB_NOT_CONNECTED ;
1846 return pCollection->createLob( lob, oid ) ;
1855 INT32 removeLob(
const bson::OID &oid )
1859 return SDB_NOT_CONNECTED ;
1861 return pCollection->removeLob( oid ) ;
1871 INT32 truncateLob(
const bson::OID &oid, INT64 length )
1875 return SDB_NOT_CONNECTED ;
1877 return pCollection->truncateLob( oid, length ) ;
1889 INT32 openLob(
sdbLob &lob,
const bson::OID &oid,
1894 return SDB_NOT_CONNECTED ;
1896 return pCollection->openLob( lob, oid, mode ) ;
1917 const bson::BSONObj &condition = _sdbStaticObject,
1918 const bson::BSONObj &selected = _sdbStaticObject,
1919 const bson::BSONObj &orderBy = _sdbStaticObject,
1920 const bson::BSONObj &hint = _sdbStaticObject,
1921 INT64 numToSkip = 0,
1922 INT64 numToReturn = -1 )
1926 return SDB_NOT_CONNECTED ;
1929 return pCollection->listLobs( cursor, condition, selected, orderBy,
1930 hint, numToSkip, numToReturn ) ;
1933 INT32 listLobs( _sdbCursor **cursor,
1934 const bson::BSONObj &condition = _sdbStaticObject,
1935 const bson::BSONObj &selected = _sdbStaticObject,
1936 const bson::BSONObj &orderBy = _sdbStaticObject,
1937 const bson::BSONObj &hint = _sdbStaticObject,
1938 INT64 numToSkip = 0,
1939 INT64 numToReturn = -1 )
1943 return SDB_NOT_CONNECTED ;
1945 return pCollection->listLobs( cursor, condition, selected, orderBy,
1946 hint, numToSkip, numToReturn ) ;
1957 INT32 createLobID( bson::OID &oid,
const CHAR *pTimeStamp = NULL )
1961 return SDB_NOT_CONNECTED ;
1963 return pCollection->createLobID( oid, pTimeStamp ) ;
1975 return SDB_NOT_CONNECTED ;
1977 return pCollection->truncate() ;
1989 INT32 createIdIndex(
const bson::BSONObj &options = _sdbStaticObject )
1993 return SDB_NOT_CONNECTED ;
1995 return pCollection->createIdIndex( options ) ;
2008 return SDB_NOT_CONNECTED ;
2010 return pCollection->dropIdIndex() ;
2030 INT32 createAutoIncrement (
const bson::BSONObj &options )
2034 return SDB_NOT_CONNECTED ;
2036 return pCollection->createAutoIncrement( options ) ;
2045 INT32 createAutoIncrement (
const std::vector<bson::BSONObj> &options )
2049 return SDB_NOT_CONNECTED ;
2051 return pCollection->createAutoIncrement( options ) ;
2060 INT32 dropAutoIncrement (
const CHAR * fieldName )
2064 return SDB_NOT_CONNECTED ;
2066 return pCollection->dropAutoIncrement( fieldName ) ;
2075 INT32 dropAutoIncrement (
const std::vector<const CHAR*> &fieldNames )
2079 return SDB_NOT_CONNECTED ;
2081 return pCollection->dropAutoIncrement( fieldNames ) ;
2097 INT32 enableSharding (
const bson::BSONObj & options = _sdbStaticObject )
2101 return SDB_NOT_CONNECTED ;
2103 return pCollection->enableSharding( options ) ;
2111 INT32 disableSharding ()
2115 return SDB_NOT_CONNECTED ;
2117 return pCollection->disableSharding() ;
2128 INT32 enableCompression (
const bson::BSONObj & options = _sdbStaticObject )
2132 return SDB_NOT_CONNECTED ;
2134 return pCollection->enableCompression( options ) ;
2142 INT32 disableCompression ()
2146 return SDB_NOT_CONNECTED ;
2148 return pCollection->disableCompression() ;
2171 INT32 setAttributes (
const bson::BSONObj &options )
2175 return SDB_NOT_CONNECTED ;
2177 return pCollection->setAttributes( options ) ;
2189 INT32 pop (
const bson::BSONObj &option = _sdbStaticObject )
2193 return SDB_NOT_CONNECTED ;
2195 return pCollection->pop( option ) ;
2198 INT32 listLobPieces( _sdbCursor **cursor,
2199 const bson::BSONObj &condition = _sdbStaticObject,
2200 const bson::BSONObj &selected = _sdbStaticObject,
2201 const bson::BSONObj &orderBy = _sdbStaticObject,
2202 const bson::BSONObj &hint = _sdbStaticObject,
2203 INT64 numToSkip = 0,
2204 INT64 numToReturn = -1 )
2208 return SDB_NOT_CONNECTED ;
2210 return pCollection->listLobPieces( cursor, condition, selected,
2211 orderBy, hint, numToSkip,
2228 INT32 listLobPieces( sdbCursor &cursor,
2229 const bson::BSONObj &condition = _sdbStaticObject,
2230 const bson::BSONObj &selected = _sdbStaticObject,
2231 const bson::BSONObj &orderBy = _sdbStaticObject,
2232 const bson::BSONObj &hint = _sdbStaticObject,
2233 INT64 numToSkip = 0,
2234 INT64 numToReturn = -1 )
2238 return SDB_NOT_CONNECTED ;
2241 return pCollection->listLobPieces( cursor, condition, selected,
2242 orderBy, hint, numToSkip,
2252 INT32 getDetail ( _sdbCursor **cursor )
2256 return SDB_NOT_CONNECTED ;
2258 return pCollection->getDetail ( cursor ) ;
2271 return SDB_NOT_CONNECTED ;
2273 return pCollection->getDetail( cursor ) ;
2293 class DLLEXPORT _sdbNode
2296 _sdbNode (
const _sdbNode& other ) ;
2297 _sdbNode& operator=(
const _sdbNode& ) ;
2300 virtual ~_sdbNode () {}
2302 virtual INT32 connect ( _sdb **dbConn ) = 0 ;
2303 virtual INT32 connect (
sdb &dbConn ) = 0 ;
2309 virtual const CHAR *getHostName () = 0 ;
2312 virtual const CHAR *getServiceName () = 0 ;
2315 virtual const CHAR *getNodeName () = 0 ;
2318 virtual INT32 getNodeID( INT32 &nodeID )
const = 0 ;
2321 virtual INT32 stop () = 0 ;
2324 virtual INT32 start () = 0 ;
2385 INT32 connect ( _sdb **dbConn )
2389 return SDB_NOT_CONNECTED ;
2391 return pNode->connect ( dbConn ) ;
2404 return SDB_NOT_CONNECTED ;
2409 return pNode->connect ( dbConn ) ;
2422 return SDB_NODE_UNKNOWN ;
2424 return pNode->getStatus () ;
2431 const CHAR *getHostName ()
2437 return pNode->getHostName () ;
2444 const CHAR *getServiceName ()
2450 return pNode->getServiceName () ;
2457 const CHAR *getNodeName ()
2463 return pNode->getNodeName () ;
2470 INT32 getNodeID( INT32 &nodeID )
const
2474 return SDB_NOT_CONNECTED ;
2476 return pNode->getNodeID( nodeID ) ;
2488 return SDB_NOT_CONNECTED ;
2490 return pNode->stop () ;
2502 return SDB_NOT_CONNECTED ;
2504 return pNode->start () ;
2516 class DLLEXPORT _sdbReplicaGroup
2519 _sdbReplicaGroup (
const _sdbReplicaGroup& other ) ;
2520 _sdbReplicaGroup& operator=(
const _sdbReplicaGroup& ) ;
2522 _sdbReplicaGroup () {}
2523 virtual ~_sdbReplicaGroup () {}
2525 virtual INT32 getNodeNum (
sdbNodeStatus status, INT32 *num ) = 0 ;
2528 virtual INT32 getDetail ( bson::BSONObj &result ) = 0 ;
2531 virtual INT32 getMaster ( _sdbNode **node ) = 0 ;
2532 virtual INT32 getMaster ( sdbNode &node ) = 0 ;
2535 virtual INT32 getSlave ( _sdbNode **node,
2536 const vector<INT32>& positions = _sdbStaticVec ) = 0 ;
2537 virtual INT32 getSlave ( sdbNode &node,
2538 const vector<INT32>& positions = _sdbStaticVec ) = 0 ;
2541 virtual INT32 getNode (
const CHAR *pNodeName,
2542 _sdbNode **node ) = 0 ;
2543 virtual INT32 getNode (
const CHAR *pNodeName,
2544 sdbNode &node ) = 0 ;
2547 virtual INT32 getNode (
const CHAR *pHostName,
2548 const CHAR *pServiceName,
2549 _sdbNode **node ) = 0 ;
2550 virtual INT32 getNode (
const CHAR *pHostName,
2551 const CHAR *pServiceName,
2552 sdbNode &node ) = 0 ;
2555 virtual INT32 createNode (
const CHAR *pHostName,
2556 const CHAR *pServiceName,
2557 const CHAR *pDatabasePath,
2558 std::map<std::string,std::string> &config )= 0;
2560 virtual INT32 createNode (
const CHAR *pHostName,
2561 const CHAR *pServiceName,
2562 const CHAR *pDatabasePath,
2563 const bson::BSONObj &options = _sdbStaticObject )= 0;
2566 virtual INT32 removeNode (
const CHAR *pHostName,
2567 const CHAR *pServiceName,
2568 const bson::BSONObj &configure = _sdbStaticObject ) = 0 ;
2570 virtual INT32 stop () = 0 ;
2573 virtual INT32 start () = 0 ;
2576 virtual const CHAR *getName () = 0 ;
2579 virtual BOOLEAN isCatalog () = 0 ;
2582 virtual INT32 attachNode(
const CHAR *pHostName,
2583 const CHAR *pSvcName,
2584 const bson::BSONObj &options ) = 0 ;
2587 virtual INT32 detachNode(
const CHAR *pHostName,
2588 const CHAR *pSvcName,
2589 const bson::BSONObj &options ) = 0 ;
2592 virtual INT32 reelect(
const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
2617 pReplicaGroup = NULL ;
2625 if ( pReplicaGroup )
2627 delete pReplicaGroup ;
2647 if ( !pReplicaGroup )
2649 return SDB_NOT_CONNECTED ;
2651 return pReplicaGroup->
getNodeNum ( status, num ) ;
2660 INT32 getDetail ( bson::BSONObj &result )
2662 if ( !pReplicaGroup )
2664 return SDB_NOT_CONNECTED ;
2666 return pReplicaGroup->getDetail ( result ) ;
2675 INT32 getMaster ( _sdbNode **node )
2677 if ( !pReplicaGroup )
2679 return SDB_NOT_CONNECTED ;
2681 return pReplicaGroup->getMaster ( node ) ;
2692 if ( !pReplicaGroup )
2694 return SDB_NOT_CONNECTED ;
2697 return pReplicaGroup->getMaster ( node ) ;
2708 INT32 getSlave ( _sdbNode **node,
2709 const vector<INT32>& positions = _sdbStaticVec )
2711 if ( !pReplicaGroup )
2713 return SDB_NOT_CONNECTED ;
2715 return pReplicaGroup->getSlave ( node, positions ) ;
2727 const vector<INT32>& positions = _sdbStaticVec )
2729 if ( !pReplicaGroup )
2731 return SDB_NOT_CONNECTED ;
2734 return pReplicaGroup->getSlave ( node, positions ) ;
2745 INT32 getNode (
const CHAR *pNodeName,
2748 if ( !pReplicaGroup )
2750 return SDB_NOT_CONNECTED ;
2752 return pReplicaGroup->getNode ( pNodeName, node ) ;
2763 INT32 getNode (
const CHAR *pNodeName,
2766 if ( !pReplicaGroup )
2768 return SDB_NOT_CONNECTED ;
2771 return pReplicaGroup->getNode ( pNodeName, node ) ;
2774 INT32 getNode (
const CHAR *pHostName,
2775 const CHAR *pServiceName,
2778 if ( !pReplicaGroup )
2780 return SDB_NOT_CONNECTED ;
2782 return pReplicaGroup->getNode ( pHostName, pServiceName, node ) ;
2795 INT32 getNode (
const CHAR *pHostName,
2796 const CHAR *pServiceName,
2799 if ( !pReplicaGroup )
2801 return SDB_NOT_CONNECTED ;
2804 return pReplicaGroup->getNode ( pHostName, pServiceName, node ) ;
2820 INT32 createNode (
const CHAR *pHostName,
2821 const CHAR *pServiceName,
2822 const CHAR *pDatabasePath,
2823 std::map<std::string,std::string> &config )
2825 if ( !pReplicaGroup )
2827 return SDB_NOT_CONNECTED ;
2829 return pReplicaGroup->createNode ( pHostName, pServiceName,
2830 pDatabasePath, config ) ;
2845 INT32 createNode (
const CHAR *pHostName,
2846 const CHAR *pServiceName,
2847 const CHAR *pDatabasePath,
2848 const bson::BSONObj &options = _sdbStaticObject )
2850 if ( !pReplicaGroup )
2852 return SDB_NOT_CONNECTED ;
2854 return pReplicaGroup->createNode ( pHostName, pServiceName,
2855 pDatabasePath, options ) ;
2868 INT32 removeNode (
const CHAR *pHostName,
2869 const CHAR *pServiceName,
2870 const bson::BSONObj &configure = _sdbStaticObject )
2872 if ( !pReplicaGroup )
2874 return SDB_NOT_CONNECTED ;
2876 return pReplicaGroup->removeNode ( pHostName, pServiceName,
2886 if ( !pReplicaGroup )
2888 return SDB_NOT_CONNECTED ;
2890 return pReplicaGroup->stop () ;
2900 if ( !pReplicaGroup )
2902 return SDB_NOT_CONNECTED ;
2904 return pReplicaGroup->start () ;
2911 const CHAR *getName ()
2913 if ( !pReplicaGroup )
2917 return pReplicaGroup->getName() ;
2925 BOOLEAN isCatalog ()
2927 if ( !pReplicaGroup )
2931 return pReplicaGroup->isCatalog() ;
2948 INT32 attachNode(
const CHAR *pHostName,
2949 const CHAR *pSvcName,
2950 const bson::BSONObj &options )
2952 if ( !pReplicaGroup )
2954 return SDB_NOT_CONNECTED ;
2956 return pReplicaGroup->attachNode( pHostName, pSvcName, options ) ;
2974 INT32 detachNode(
const CHAR *pHostName,
2975 const CHAR *pSvcName,
2976 const bson::BSONObj &options )
2978 if ( !pReplicaGroup )
2980 return SDB_NOT_CONNECTED ;
2982 return pReplicaGroup->detachNode( pHostName, pSvcName, options ) ;
2993 INT32 reelect(
const bson::BSONObj &options = _sdbStaticObject )
2995 if( !pReplicaGroup )
2997 return SDB_NOT_CONNECTED ;
2999 return pReplicaGroup->reelect( options ) ;
3003 class DLLEXPORT _sdbCollectionSpace
3006 _sdbCollectionSpace (
const _sdbCollectionSpace& other ) ;
3007 _sdbCollectionSpace& operator=(
const _sdbCollectionSpace& ) ;
3009 _sdbCollectionSpace () {}
3010 virtual ~_sdbCollectionSpace () {}
3012 virtual INT32 getCollection (
const CHAR *pCollectionName,
3013 _sdbCollection **collection,
3014 BOOLEAN checkExist = TRUE ) = 0 ;
3016 virtual INT32 getCollection (
const CHAR *pCollectionName,
3017 sdbCollection &collection,
3018 BOOLEAN checkExist = TRUE ) = 0 ;
3021 virtual INT32 createCollection (
const CHAR *pCollection,
3022 const bson::BSONObj &options,
3023 _sdbCollection **collection ) = 0 ;
3025 virtual INT32 createCollection (
const CHAR *pCollection,
3026 const bson::BSONObj &options,
3027 sdbCollection &collection ) = 0 ;
3030 virtual INT32 createCollection (
const CHAR *pCollection,
3031 _sdbCollection **collection ) = 0 ;
3033 virtual INT32 createCollection (
const CHAR *pCollection,
3034 sdbCollection &collection ) = 0 ;
3037 virtual INT32 dropCollection (
const CHAR *pCollection ) = 0 ;
3040 virtual INT32 create () = 0 ;
3042 virtual INT32 drop () = 0 ;
3045 virtual const CHAR *getCSName () = 0 ;
3048 virtual INT32 renameCollection(
const CHAR* oldName,
const CHAR* newName,
3049 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
3051 virtual INT32 alterCollectionSpace (
const bson::BSONObj & options ) = 0 ;
3053 virtual INT32 setDomain (
const bson::BSONObj & options ) = 0 ;
3055 virtual INT32 removeDomain () = 0 ;
3057 virtual INT32 enableCapped () = 0 ;
3059 virtual INT32 disableCapped () = 0 ;
3061 virtual INT32 setAttributes (
const bson::BSONObj & options ) = 0 ;
3095 pCollectionSpace = NULL ;
3103 if ( pCollectionSpace )
3105 delete pCollectionSpace ;
3109 INT32 getCollection (
const CHAR *pCollectionName,
3110 _sdbCollection **collection,
3111 BOOLEAN checkExist = TRUE )
3113 if ( !pCollectionSpace )
3115 return SDB_NOT_CONNECTED ;
3117 return pCollectionSpace->getCollection ( pCollectionName,
3118 collection, checkExist ) ;
3131 INT32 getCollection (
const CHAR *pCollectionName,
3133 BOOLEAN checkExist = TRUE )
3135 if ( !pCollectionSpace )
3137 return SDB_NOT_CONNECTED ;
3140 return pCollectionSpace->getCollection ( pCollectionName,
3145 INT32 createCollection (
const CHAR *pCollection,
3146 const bson::BSONObj &options,
3147 _sdbCollection **collection )
3149 if ( !pCollectionSpace )
3151 return SDB_NOT_CONNECTED ;
3153 return pCollectionSpace->createCollection ( pCollection,
3170 INT32 createCollection (
const CHAR *pCollection,
3171 const bson::BSONObj &options,
3174 if ( !pCollectionSpace )
3176 return SDB_NOT_CONNECTED ;
3179 return pCollectionSpace->createCollection ( pCollection,
3184 INT32 createCollection (
const CHAR *pCollection,
3185 _sdbCollection **collection )
3187 if ( !pCollectionSpace )
3189 return SDB_NOT_CONNECTED ;
3191 return pCollectionSpace->createCollection ( pCollection,
3204 INT32 createCollection (
const CHAR *pCollection,
3207 if ( !pCollectionSpace )
3209 return SDB_NOT_CONNECTED ;
3212 return pCollectionSpace->createCollection ( pCollection,
3222 INT32 dropCollection (
const CHAR *pCollection )
3224 if ( !pCollectionSpace )
3226 return SDB_NOT_CONNECTED ;
3228 return pCollectionSpace->dropCollection ( pCollection ) ;
3239 if ( !pCollectionSpace )
3241 return SDB_NOT_CONNECTED ;
3243 return pCollectionSpace->create () ;
3254 if ( !pCollectionSpace )
3256 return SDB_NOT_CONNECTED ;
3258 return pCollectionSpace->drop () ;
3265 const CHAR *getCSName ()
3267 if ( !pCollectionSpace )
3271 return pCollectionSpace->getCSName () ;
3284 INT32 renameCollection(
const CHAR* oldName,
const CHAR* newName,
3285 const bson::BSONObj &options = _sdbStaticObject )
3287 if( !pCollectionSpace )
3289 return SDB_NOT_CONNECTED ;
3291 return pCollectionSpace->renameCollection( oldName, newName, options ) ;
3305 INT32 alterCollectionSpace (
const bson::BSONObj & options )
3307 if ( NULL == pCollectionSpace )
3309 return SDB_NOT_CONNECTED ;
3311 return pCollectionSpace->alterCollectionSpace( options ) ;
3323 INT32 setDomain (
const bson::BSONObj & options )
3325 if ( NULL == pCollectionSpace )
3327 return SDB_NOT_CONNECTED ;
3329 return pCollectionSpace->setDomain( options ) ;
3337 INT32 removeDomain ()
3339 if ( NULL == pCollectionSpace )
3341 return SDB_NOT_CONNECTED ;
3343 return pCollectionSpace->removeDomain() ;
3351 INT32 enableCapped ()
3353 if ( NULL == pCollectionSpace )
3355 return SDB_NOT_CONNECTED ;
3357 return pCollectionSpace->enableCapped() ;
3365 INT32 disableCapped ()
3367 if ( NULL == pCollectionSpace )
3369 return SDB_NOT_CONNECTED ;
3371 return pCollectionSpace->disableCapped() ;
3385 INT32 setAttributes (
const bson::BSONObj & options )
3387 if ( NULL == pCollectionSpace )
3389 return SDB_NOT_CONNECTED ;
3391 return pCollectionSpace->setAttributes( options ) ;
3395 class DLLEXPORT _sdbDomain
3398 _sdbDomain (
const _sdbDomain& other ) ;
3399 _sdbDomain& operator= (
const _sdbDomain& ) ;
3402 virtual ~_sdbDomain () {}
3404 virtual const CHAR* getName () = 0 ;
3406 virtual INT32 alterDomain (
const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
3408 virtual INT32 listCollectionSpacesInDomain ( _sdbCursor **cursor ) = 0 ;
3410 virtual INT32 listCollectionSpacesInDomain ( sdbCursor &cursor ) = 0 ;
3412 virtual INT32 listCollectionsInDomain ( _sdbCursor **cursor ) = 0 ;
3414 virtual INT32 listCollectionsInDomain ( sdbCursor &cursor ) = 0 ;
3416 virtual INT32 listReplicaGroupInDomain( _sdbCursor **cursor ) = 0 ;
3418 virtual INT32 listReplicaGroupInDomain( sdbCursor &cursor ) = 0 ;
3420 virtual INT32 addGroups (
const bson::BSONObj & options ) = 0 ;
3422 virtual INT32 setGroups (
const bson::BSONObj & options ) = 0 ;
3424 virtual INT32 removeGroups (
const bson::BSONObj & options ) = 0 ;
3426 virtual INT32 setAttributes (
const bson::BSONObj & options ) = 0 ;
3467 const CHAR *getName ()
3493 INT32 alterDomain (
const bson::BSONObj &options )
3497 return SDB_NOT_CONNECTED ;
3499 return pDomain->alterDomain ( options ) ;
3512 INT32 addGroups (
const bson::BSONObj & options )
3514 if ( NULL == pDomain )
3516 return SDB_NOT_CONNECTED ;
3518 return pDomain->addGroups( options ) ;
3533 INT32 setGroups (
const bson::BSONObj & options )
3535 if ( NULL == pDomain )
3537 return SDB_NOT_CONNECTED ;
3539 return pDomain->setGroups( options ) ;
3553 INT32 removeGroups (
const bson::BSONObj & options )
3555 if ( NULL == pDomain )
3557 return SDB_NOT_CONNECTED ;
3559 return pDomain->removeGroups( options ) ;
3579 INT32 setAttributes (
const bson::BSONObj &options )
3583 return SDB_NOT_CONNECTED ;
3585 return pDomain->setAttributes( options ) ;
3599 return SDB_NOT_CONNECTED ;
3602 return pDomain->listCollectionSpacesInDomain ( cursor ) ;
3605 INT32 listCollectionSpacesInDomain ( _sdbCursor **cursor )
3609 return SDB_NOT_CONNECTED ;
3611 return pDomain->listCollectionSpacesInDomain ( cursor ) ;
3625 return SDB_NOT_CONNECTED ;
3628 return pDomain->listCollectionsInDomain ( cursor ) ;
3638 INT32 listCollectionsInDomain ( _sdbCursor **cursor )
3642 return SDB_NOT_CONNECTED ;
3644 return pDomain->listCollectionsInDomain ( cursor ) ;
3647 INT32 listReplicaGroupInDomain( _sdbCursor **cursor )
3651 return SDB_NOT_CONNECTED ;
3653 return pDomain->listReplicaGroupInDomain( cursor ) ;
3666 return SDB_NOT_CONNECTED ;
3669 return pDomain->listReplicaGroupInDomain( cursor ) ;
3673 class DLLEXPORT _sdbDataCenter
3676 _sdbDataCenter (
const _sdbDataCenter& other ) ;
3677 _sdbDataCenter& operator= (
const _sdbDataCenter& ) ;
3680 _sdbDataCenter () {}
3681 virtual ~_sdbDataCenter () {}
3684 virtual const CHAR *getName () = 0 ;
3685 virtual INT32 getDetail( bson::BSONObj &retInfo ) = 0 ;
3686 virtual INT32 activateDC() = 0 ;
3687 virtual INT32 deactivateDC() = 0 ;
3688 virtual INT32 enableReadOnly( BOOLEAN isReadOnly ) = 0 ;
3689 virtual INT32 createImage(
const CHAR *pCataAddrList ) = 0 ;
3690 virtual INT32 removeImage() = 0 ;
3691 virtual INT32 enableImage() = 0 ;
3692 virtual INT32 disableImage() = 0 ;
3693 virtual INT32 attachGroups(
const bson::BSONObj &info ) = 0 ;
3694 virtual INT32 detachGroups(
const bson::BSONObj &info ) = 0 ;
3701 class DLLEXPORT sdbDataCenter
3704 sdbDataCenter (
const sdbDataCenter& ) ;
3705 sdbDataCenter& operator= (
const sdbDataCenter& ) ;
3715 _sdbDataCenter *pDC ;
3720 sdbDataCenter() { pDC = NULL ; }
3739 const CHAR *getName ()
3745 return pDC->getName() ;
3754 INT32 getDetail( bson::BSONObj &retInfo )
3758 return SDB_NOT_CONNECTED ;
3760 return pDC->getDetail( retInfo ) ;
3772 return SDB_NOT_CONNECTED ;
3774 return pDC->activateDC() ;
3782 INT32 deactivateDC()
3786 return SDB_NOT_CONNECTED ;
3788 return pDC->deactivateDC() ;
3797 INT32 enableReadOnly( BOOLEAN isReadOnly )
3801 return SDB_NOT_CONNECTED ;
3803 return pDC->enableReadOnly( isReadOnly ) ;
3813 INT32 createImage(
const CHAR *pCataAddrList )
3817 return SDB_NOT_CONNECTED ;
3819 return pDC->createImage( pCataAddrList ) ;
3831 return SDB_NOT_CONNECTED ;
3833 return pDC->removeImage() ;
3845 return SDB_NOT_CONNECTED ;
3847 return pDC->enableImage() ;
3855 INT32 disableImage()
3859 return SDB_NOT_CONNECTED ;
3861 return pDC->disableImage() ;
3870 INT32 attachGroups(
const bson::BSONObj &info )
3874 return SDB_NOT_CONNECTED ;
3876 return pDC->attachGroups( info ) ;
3885 INT32 detachGroups(
const bson::BSONObj &info )
3889 return SDB_NOT_CONNECTED ;
3891 return pDC->detachGroups( info ) ;
3896 class DLLEXPORT _sdbLob
3899 _sdbLob (
const _sdbLob& other ) ;
3900 _sdbLob& operator= (
const _sdbLob& ) ;
3905 virtual ~_sdbLob () {}
3907 virtual INT32 close () = 0 ;
3909 virtual INT32 read ( UINT32 len, CHAR *buf, UINT32 *read ) = 0 ;
3911 virtual INT32 write (
const CHAR *buf, UINT32 len ) = 0 ;
3913 virtual INT32 seek ( SINT64 size,
SDB_LOB_SEEK whence ) = 0 ;
3915 virtual INT32 lock( INT64 offset, INT64 length ) = 0 ;
3917 virtual INT32 lockAndSeek( INT64 offset, INT64 length ) = 0 ;
3919 virtual INT32 isClosed( BOOLEAN &flag ) = 0 ;
3921 virtual INT32 getOid( bson::OID &oid ) = 0 ;
3923 virtual INT32 getSize( SINT64 *size ) = 0 ;
3925 virtual INT32 getCreateTime ( UINT64 *millis ) = 0 ;
3927 virtual BOOLEAN isClosed() = 0 ;
3929 virtual bson::OID getOid() = 0 ;
3931 virtual SINT64 getSize() = 0 ;
3933 virtual UINT64 getCreateTime () = 0 ;
3935 virtual UINT64 getModificationTime() = 0 ;
3937 virtual INT32 getPiecesInfoNum() = 0 ;
3939 virtual bson::BSONArray getPiecesInfo() = 0 ;
3941 virtual BOOLEAN isEof() = 0 ;
3990 return pLob->
close() ;
4001 INT32 read ( UINT32 len, CHAR *buf, UINT32 *read )
4005 return SDB_NOT_CONNECTED ;
4007 return pLob->read( len, buf, read ) ;
4017 INT32 write (
const CHAR *buf, UINT32 len )
4021 return SDB_NOT_CONNECTED ;
4023 return pLob->write( buf, len ) ;
4037 return SDB_NOT_CONNECTED ;
4039 return pLob->seek( size, whence ) ;
4049 INT32 lock ( INT64 offset, INT64 length )
4053 return SDB_NOT_CONNECTED ;
4055 return pLob->lock( offset, length ) ;
4065 INT32 lockAndSeek ( INT64 offset, INT64 length )
4069 return SDB_NOT_CONNECTED ;
4071 return pLob->lockAndSeek( offset, length ) ;
4081 INT32 isClosed( BOOLEAN &flag )
4085 return SDB_NOT_CONNECTED ;
4087 return pLob->isClosed ( flag ) ;
4100 return pLob->isClosed () ;
4110 INT32 getOid ( bson::OID &oid )
4114 return SDB_NOT_CONNECTED ;
4116 return pLob->getOid( oid ) ;
4129 return pLob->getOid() ;
4139 INT32 getSize ( SINT64 *size )
4143 return SDB_NOT_CONNECTED ;
4145 return pLob->getSize( size ) ;
4158 return pLob->getSize();
4168 INT32 getCreateTime ( UINT64 *millis )
4172 return SDB_NOT_CONNECTED ;
4174 return pLob->getCreateTime( millis ) ;
4181 UINT64 getCreateTime ()
4187 return pLob->getCreateTime() ;
4194 UINT64 getModificationTime ()
4200 return pLob->getModificationTime() ;
4207 INT32 getPiecesInfoNum()
4213 return pLob->getPiecesInfoNum() ;
4220 bson::BSONArray getPiecesInfo()
4224 return bson::BSONArray() ;
4226 return pLob->getPiecesInfo() ;
4239 return pLob->isEof() ;
4244 class DLLEXPORT _sdbDataSource
4247 _sdbDataSource(
const _sdbDataSource& other ) ;
4248 _sdbDataSource& operator=(
const _sdbDataSource& ) ;
4251 virtual ~_sdbDataSource() {}
4253 virtual INT32 alterDataSource(
const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4254 virtual const CHAR *getDSName() = 0 ;
4257 class DLLEXPORT sdbDataSource
4260 sdbDataSource(
const sdbDataSource& ) ;
4261 sdbDataSource& operator=(
const sdbDataSource& ) ;
4263 _sdbDataSource *pDataSource ;
4267 pDataSource = NULL ;
4274 delete pDataSource ;
4278 INT32 alterDataSource(
const bson::BSONObj &options )
4282 return SDB_NOT_CONNECTED ;
4284 return pDataSource->alterDataSource( options ) ;
4287 const CHAR *getDSName()
4293 return pDataSource->getDSName() ;
4297 class DLLEXPORT _sdb
4300 _sdb (
const _sdb& other ) ;
4301 _sdb& operator=(
const _sdb& ) ;
4305 virtual INT32 connect (
const CHAR *pHostName,
4308 virtual INT32 connect (
const CHAR *pHostName,
4310 const CHAR *pUsrName,
4311 const CHAR *pPasswd ) = 0 ;
4312 virtual INT32 connect (
const CHAR *pHostName,
4313 const CHAR *pServiceName ) = 0 ;
4314 virtual INT32 connect (
const CHAR *pHostName,
4315 const CHAR *pServiceName,
4316 const CHAR *pUsrName,
4317 const CHAR *pPasswd ) = 0 ;
4318 virtual INT32 connect (
const CHAR **pConnAddrs,
4320 const CHAR *pUsrName,
4321 const CHAR *pPasswd ) = 0 ;
4322 virtual INT32 connect (
const CHAR **pConnAddrs,
4324 const CHAR *pUsrName,
4326 const CHAR *pCipherFile ) = 0 ;
4328 virtual void disconnect () = 0 ;
4330 virtual UINT64 getDbStartTime() = 0 ;
4332 virtual void getVersion( UINT8 &version, UINT8 &subVersion,
4333 UINT8 &fixVersion ) = 0 ;
4335 virtual INT32 createUsr(
const CHAR *pUsrName,
4336 const CHAR *pPasswd,
4337 const bson::BSONObj &options = _sdbStaticObject
4340 virtual INT32 removeUsr(
const CHAR *pUsrName,
4341 const CHAR *pPasswd ) = 0 ;
4343 virtual INT32 alterUsr(
const CHAR *pUsrName,
4344 const CHAR *pAction,
4345 const bson::BSONObj &options ) = 0 ;
4347 virtual INT32 changeUsrPasswd(
const CHAR *pUsrName,
4348 const CHAR *pOldPasswd,
4349 const CHAR *pNewPasswd ) = 0 ;
4351 virtual INT32 getSnapshot ( _sdbCursor **cursor,
4353 const bson::BSONObj &condition = _sdbStaticObject,
4354 const bson::BSONObj &selector = _sdbStaticObject,
4355 const bson::BSONObj &orderBy = _sdbStaticObject,
4356 const bson::BSONObj &hint = _sdbStaticObject,
4357 INT64 numToSkip = 0,
4358 INT64 numToReturn = -1
4361 virtual INT32 getSnapshot ( sdbCursor &cursor,
4363 const bson::BSONObj &condition = _sdbStaticObject,
4364 const bson::BSONObj &selector = _sdbStaticObject,
4365 const bson::BSONObj &orderBy = _sdbStaticObject,
4366 const bson::BSONObj &hint = _sdbStaticObject,
4367 INT64 numToSkip = 0,
4368 INT64 numToReturn = -1
4371 virtual INT32 resetSnapshot (
const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4373 virtual INT32 getList ( _sdbCursor **cursor,
4375 const bson::BSONObj &condition = _sdbStaticObject,
4376 const bson::BSONObj &selector = _sdbStaticObject,
4377 const bson::BSONObj &orderBy = _sdbStaticObject,
4378 const bson::BSONObj &hint = _sdbStaticObject,
4379 INT64 numToSkip = 0,
4380 INT64 numToReturn = -1
4382 virtual INT32 getList ( sdbCursor &cursor,
4384 const bson::BSONObj &condition = _sdbStaticObject,
4385 const bson::BSONObj &selector = _sdbStaticObject,
4386 const bson::BSONObj &orderBy = _sdbStaticObject,
4387 const bson::BSONObj &hint = _sdbStaticObject,
4388 INT64 numToSkip = 0,
4389 INT64 numToReturn = -1
4392 virtual INT32 getCollection (
const CHAR *pCollectionFullName,
4393 _sdbCollection **collection,
4394 BOOLEAN checkExist = TRUE
4397 virtual INT32 getCollection (
const CHAR *pCollectionFullName,
4398 sdbCollection &collection,
4399 BOOLEAN checkExist = TRUE
4402 virtual INT32 getCollectionSpace (
const CHAR *pCollectionSpaceName,
4403 _sdbCollectionSpace **cs,
4404 BOOLEAN checkExist = TRUE
4407 virtual INT32 getCollectionSpace (
const CHAR *pCollectionSpaceName,
4408 sdbCollectionSpace &cs,
4409 BOOLEAN checkExist = TRUE
4412 virtual INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
4414 _sdbCollectionSpace **cs
4417 virtual INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
4419 sdbCollectionSpace &cs
4422 virtual INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
4423 const bson::BSONObj &options,
4424 _sdbCollectionSpace **cs
4427 virtual INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
4428 const bson::BSONObj &options,
4429 sdbCollectionSpace &cs
4432 virtual INT32 dropCollectionSpace (
const CHAR *pCollectionSpaceName )
4435 virtual INT32 listCollectionSpaces ( _sdbCursor **result ) = 0 ;
4437 virtual INT32 listCollectionSpaces ( sdbCursor &result ) = 0 ;
4440 virtual INT32 listCollections ( _sdbCursor **result ) = 0 ;
4442 virtual INT32 listCollections ( sdbCursor &result ) = 0 ;
4445 virtual INT32 listReplicaGroups ( _sdbCursor **result ) = 0 ;
4447 virtual INT32 listReplicaGroups ( sdbCursor &result ) = 0 ;
4449 virtual INT32 getReplicaGroup (
const CHAR *pName,
4450 _sdbReplicaGroup **result ) = 0 ;
4452 virtual INT32 getReplicaGroup (
const CHAR *pName,
4453 sdbReplicaGroup &result ) = 0 ;
4455 virtual INT32 getReplicaGroup ( INT32
id,
4456 _sdbReplicaGroup **result ) = 0 ;
4458 virtual INT32 getReplicaGroup ( INT32
id,
4459 sdbReplicaGroup &result ) = 0 ;
4461 virtual INT32 createReplicaGroup (
const CHAR *pName,
4462 _sdbReplicaGroup **replicaGroup ) = 0 ;
4464 virtual INT32 createReplicaGroup (
const CHAR *pName,
4465 sdbReplicaGroup &replicaGroup ) = 0 ;
4467 virtual INT32 removeReplicaGroup (
const CHAR *pName ) = 0 ;
4469 virtual INT32 createReplicaCataGroup (
const CHAR *pHostName,
4470 const CHAR *pServiceName,
4471 const CHAR *pDatabasePath,
4472 const bson::BSONObj &configure ) =0 ;
4474 virtual INT32 activateReplicaGroup (
const CHAR *pName,
4475 _sdbReplicaGroup **replicaGroup ) = 0 ;
4476 virtual INT32 activateReplicaGroup (
const CHAR *pName,
4477 sdbReplicaGroup &replicaGroup ) = 0 ;
4479 virtual INT32 execUpdate(
const CHAR *sql,
4480 bson::BSONObj *pResult = NULL ) = 0 ;
4482 virtual INT32 exec(
const CHAR *sql,
4483 _sdbCursor **result ) = 0 ;
4485 virtual INT32 exec(
const CHAR *sql,
4486 sdbCursor &result ) = 0 ;
4488 virtual INT32 transactionBegin() = 0 ;
4490 virtual INT32 transactionCommit() = 0 ;
4492 virtual INT32 transactionRollback() = 0 ;
4494 virtual INT32 flushConfigure(
const bson::BSONObj &options ) = 0 ;
4496 virtual INT32 crtJSProcedure (
const CHAR *code ) = 0 ;
4497 virtual INT32 rmProcedure(
const CHAR *spName ) = 0 ;
4498 virtual INT32 listProcedures( _sdbCursor **cursor,
const bson::BSONObj &condition ) = 0 ;
4499 virtual INT32 listProcedures( sdbCursor &cursor,
const bson::BSONObj &condition ) = 0 ;
4500 virtual INT32 evalJS(
const CHAR *code,
4502 _sdbCursor **cursor,
4503 bson::BSONObj &errmsg ) = 0 ;
4504 virtual INT32 evalJS(
const CHAR *code,
4507 bson::BSONObj &errmsg ) = 0 ;
4510 virtual INT32 backup (
const bson::BSONObj &options) = 0 ;
4511 virtual INT32 listBackup ( _sdbCursor **cursor,
4512 const bson::BSONObj &options,
4513 const bson::BSONObj &condition = _sdbStaticObject,
4514 const bson::BSONObj &selector = _sdbStaticObject,
4515 const bson::BSONObj &orderBy = _sdbStaticObject) = 0 ;
4516 virtual INT32 listBackup ( sdbCursor &cursor,
4517 const bson::BSONObj &options,
4518 const bson::BSONObj &condition = _sdbStaticObject,
4519 const bson::BSONObj &selector = _sdbStaticObject,
4520 const bson::BSONObj &orderBy = _sdbStaticObject) = 0 ;
4521 virtual INT32 removeBackup (
const bson::BSONObj &options ) = 0 ;
4524 virtual INT32 listTasks ( _sdbCursor **cursor,
4525 const bson::BSONObj &condition = _sdbStaticObject,
4526 const bson::BSONObj &selector = _sdbStaticObject,
4527 const bson::BSONObj &orderBy = _sdbStaticObject,
4528 const bson::BSONObj &hint = _sdbStaticObject) = 0 ;
4531 virtual INT32 listTasks ( sdbCursor &cursor,
4532 const bson::BSONObj &condition = _sdbStaticObject,
4533 const bson::BSONObj &selector = _sdbStaticObject,
4534 const bson::BSONObj &orderBy = _sdbStaticObject,
4535 const bson::BSONObj &hint = _sdbStaticObject) = 0 ;
4537 virtual INT32 waitTasks (
const SINT64 *taskIDs,
4540 virtual INT32 cancelTask ( SINT64 taskID,
4541 BOOLEAN isAsync ) = 0 ;
4543 virtual INT32 setSessionAttr (
const bson::BSONObj &options =
4544 _sdbStaticObject ) = 0 ;
4546 virtual INT32 getSessionAttr ( bson::BSONObj &result,
4547 BOOLEAN useCache = TRUE ) = 0 ;
4550 virtual INT32 closeAllCursors () = 0 ;
4553 virtual INT32 interrupt() = 0 ;
4554 virtual INT32 interruptOperation() = 0 ;
4557 virtual INT32 isValid( BOOLEAN *result ) = 0 ;
4558 virtual BOOLEAN isValid() = 0 ;
4560 virtual BOOLEAN isClosed() = 0 ;
4563 virtual INT32 createDomain (
const CHAR *pDomainName,
4564 const bson::BSONObj &options,
4565 _sdbDomain **domain ) = 0 ;
4567 virtual INT32 createDomain (
const CHAR *pDomainName,
4568 const bson::BSONObj &options,
4569 sdbDomain &domain ) = 0 ;
4571 virtual INT32 dropDomain (
const CHAR *pDomainName ) = 0 ;
4573 virtual INT32 getDomain (
const CHAR *pDomainName,
4574 _sdbDomain **domain ) = 0 ;
4576 virtual INT32 getDomain (
const CHAR *pDomainName,
4577 sdbDomain &domain ) = 0 ;
4579 virtual INT32 listDomains ( _sdbCursor **cursor,
4580 const bson::BSONObj &condition = _sdbStaticObject,
4581 const bson::BSONObj &selector = _sdbStaticObject,
4582 const bson::BSONObj &orderBy = _sdbStaticObject,
4583 const bson::BSONObj &hint = _sdbStaticObject
4586 virtual INT32 listDomains ( sdbCursor &cursor,
4587 const bson::BSONObj &condition = _sdbStaticObject,
4588 const bson::BSONObj &selector = _sdbStaticObject,
4589 const bson::BSONObj &orderBy = _sdbStaticObject,
4590 const bson::BSONObj &hint = _sdbStaticObject
4592 virtual INT32 getDC( _sdbDataCenter **dc ) = 0 ;
4593 virtual INT32 getDC( sdbDataCenter &dc ) = 0 ;
4595 static _sdb *getObj ( BOOLEAN useSSL = FALSE ) ;
4598 virtual UINT64 getLastAliveTime()
const = 0 ;
4600 virtual INT32 syncDB(
4601 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4603 virtual INT32 analyze(
4604 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4606 virtual INT32 forceSession(
4608 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4610 virtual INT32 forceStepUp(
4611 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4613 virtual INT32 invalidateCache(
4614 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4616 virtual INT32 reloadConfig(
4617 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4619 virtual INT32 updateConfig (
const bson::BSONObj &configs = _sdbStaticObject,
4620 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4622 virtual INT32 deleteConfig (
const bson::BSONObj &configs = _sdbStaticObject,
4623 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4625 virtual INT32 setPDLevel( INT32 level,
4626 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4628 virtual INT32 msg(
const CHAR* msg ) = 0 ;
4630 virtual INT32 loadCS(
const CHAR* csName,
4631 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4633 virtual INT32 unloadCS(
const CHAR* csName,
4634 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4636 virtual INT32 traceStart( UINT32 traceBufferSize,
4637 const CHAR* component = NULL,
4638 const CHAR* breakpoint = NULL,
4639 const vector<UINT32> &tidVec = _sdbStaticUINT32Vec ) = 0 ;
4641 virtual INT32 traceStart( UINT32 traceBufferSize,
4642 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4644 virtual INT32 traceStop(
const CHAR* dumpFileName ) = 0 ;
4646 virtual INT32 traceResume() = 0 ;
4648 virtual INT32 traceStatus( _sdbCursor** cursor ) = 0 ;
4650 virtual INT32 traceStatus( sdbCursor& cursor ) = 0 ;
4653 virtual INT32 renameCollectionSpace(
const CHAR* oldName,
4654 const CHAR* newName,
4655 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4657 virtual INT32 getLastErrorObj( bson::BSONObj &result ) = 0 ;
4658 virtual void cleanLastErrorObj() = 0 ;
4660 virtual INT32 getLastResultObj( bson::BSONObj &result,
4661 BOOLEAN getOwned = FALSE )
const = 0 ;
4663 virtual INT32 createDataSource(
const CHAR *pDataSourceName,
4664 const CHAR *addresses,
4665 const CHAR *user = NULL,
4666 const CHAR *password = NULL,
4667 const CHAR *type = NULL,
4668 const bson::BSONObj *options = NULL,
4669 _sdbDataSource **dataSource = NULL
4672 virtual INT32 dropDataSource(
const CHAR *pDataSourceName ) = 0 ;
4674 virtual INT32 getDataSource(
const CHAR *pDataSourceName,
4675 _sdbDataSource **dataSource ) = 0 ;
4677 virtual INT32 getDataSource(
const CHAR *pDataSourceName,
4678 sdbDataSource &dataSource ) = 0 ;
4680 virtual INT32 listDataSources( _sdbCursor** cursor,
4681 const bson::BSONObj &condition = _sdbStaticObject,
4682 const bson::BSONObj &selector = _sdbStaticObject,
4683 const bson::BSONObj &orderBy = _sdbStaticObject,
4684 const bson::BSONObj &hint = _sdbStaticObject ) = 0 ;
4685 virtual INT32 listDataSources( sdbCursor& cursor,
4686 const bson::BSONObj &condition = _sdbStaticObject,
4687 const bson::BSONObj &selector = _sdbStaticObject,
4688 const bson::BSONObj &orderBy = _sdbStaticObject,
4689 const bson::BSONObj &hint = _sdbStaticObject ) = 0 ;
4693 typedef class _sdb _sdb ;
4700 sdb (
const sdb& other ) ;
4701 sdb& operator=(
const sdb& ) ;
4715 sdb ( BOOLEAN useSSL = FALSE ) :
4716 pSDB ( _sdb::getObj( useSSL ) )
4740 INT32 connect (
const CHAR *pHostName,
4746 return SDB_NOT_CONNECTED ;
4748 return pSDB->
connect ( pHostName, port ) ;
4764 INT32 connect (
const CHAR *pHostName,
4766 const CHAR *pUsrName,
4772 return SDB_NOT_CONNECTED ;
4774 return pSDB->connect ( pHostName, port,
4775 pUsrName, pPasswd ) ;
4787 INT32 connect (
const CHAR *pHostName,
4788 const CHAR *pServiceName
4793 return SDB_NOT_CONNECTED ;
4795 return pSDB->connect ( pHostName, pServiceName ) ;
4811 INT32 connect (
const CHAR *pHostName,
4812 const CHAR *pServiceName,
4813 const CHAR *pUsrName,
4814 const CHAR *pPasswd )
4818 return SDB_NOT_CONNECTED ;
4820 return pSDB->connect ( pHostName, pServiceName,
4821 pUsrName, pPasswd ) ;
4837 INT32 connect (
const CHAR **pConnAddrs,
4839 const CHAR *pUsrName,
4840 const CHAR *pPasswd )
4844 return SDB_NOT_CONNECTED ;
4846 return pSDB->connect ( pConnAddrs, arrSize,
4847 pUsrName, pPasswd ) ;
4865 INT32 connect (
const CHAR **pConnAddrs,
4867 const CHAR *pUsrName,
4869 const CHAR *pCipherFile )
4873 return SDB_NOT_CONNECTED ;
4875 return pSDB->connect ( pConnAddrs, arrSize,
4876 pUsrName, pToken, pCipherFile ) ;
4883 UINT64 getDbStartTime ()
4889 return pSDB->getDbStartTime() ;
4901 void getVersion ( UINT8 &version, UINT8 &subVersion, UINT8 &fixVersion )
4907 pSDB->getVersion( version, subVersion, fixVersion ) ;
4932 INT32 createUsr(
const CHAR *pUsrName,
4933 const CHAR *pPasswd,
4934 const bson::BSONObj &options = _sdbStaticObject )
4938 return SDB_NOT_CONNECTED ;
4940 return pSDB->createUsr( pUsrName, pPasswd, options ) ;
4951 INT32 removeUsr(
const CHAR *pUsrName,
4952 const CHAR *pPasswd )
4956 return SDB_NOT_CONNECTED ;
4958 return pSDB->removeUsr( pUsrName, pPasswd ) ;
4973 INT32 alterUsr(
const CHAR *pUsrName,
4974 const CHAR *pAction,
4975 const bson::BSONObj &options )
4979 return SDB_NOT_CONNECTED ;
4981 return pSDB->alterUsr( pUsrName, pAction, options ) ;
4994 INT32 changeUsrPasswd(
const CHAR *pUsrName,
4995 const CHAR *pOldPasswd,
4996 const CHAR *pNewPasswd )
5000 return SDB_NOT_CONNECTED ;
5002 return pSDB->changeUsrPasswd( pUsrName, pOldPasswd, pNewPasswd ) ;
5014 pSDB->disconnect () ;
5058 const bson::BSONObj &condition = _sdbStaticObject,
5059 const bson::BSONObj &selector = _sdbStaticObject,
5060 const bson::BSONObj &orderBy = _sdbStaticObject,
5061 const bson::BSONObj &hint = _sdbStaticObject,
5062 INT64 numToSkip = 0,
5063 INT64 numToReturn = -1 )
5067 return SDB_NOT_CONNECTED ;
5070 return pSDB->getSnapshot ( cursor, snapType, condition,
5071 selector, orderBy, hint,
5072 numToSkip, numToReturn ) ;
5115 INT32 getSnapshot ( _sdbCursor **cursor,
5117 const bson::BSONObj &condition = _sdbStaticObject,
5118 const bson::BSONObj &selector = _sdbStaticObject,
5119 const bson::BSONObj &orderBy = _sdbStaticObject,
5120 const bson::BSONObj &hint = _sdbStaticObject,
5121 INT64 numToSkip = 0,
5122 INT64 numToReturn = -1 )
5126 return SDB_NOT_CONNECTED ;
5128 return pSDB->getSnapshot ( cursor, snapType, condition,
5129 selector, orderBy, hint,
5130 numToSkip, numToReturn ) ;
5155 INT32 resetSnapshot (
const bson::BSONObj &options = _sdbStaticObject )
5159 return SDB_NOT_CONNECTED ;
5161 return pSDB->resetSnapshot ( options ) ;
5204 INT32 getList ( _sdbCursor **cursor,
5206 const bson::BSONObj &condition = _sdbStaticObject,
5207 const bson::BSONObj &selector = _sdbStaticObject,
5208 const bson::BSONObj &orderBy = _sdbStaticObject,
5209 const bson::BSONObj &hint = _sdbStaticObject,
5210 INT64 numToSkip = 0,
5211 INT64 numToReturn = -1
5216 return SDB_NOT_CONNECTED ;
5218 return pSDB->getList ( cursor, listType,
5219 condition, selector, orderBy, hint,
5220 numToSkip, numToReturn ) ;
5265 const bson::BSONObj &condition = _sdbStaticObject,
5266 const bson::BSONObj &selector = _sdbStaticObject,
5267 const bson::BSONObj &orderBy = _sdbStaticObject,
5268 const bson::BSONObj &hint = _sdbStaticObject,
5269 INT64 numToSkip = 0,
5270 INT64 numToReturn = -1
5275 return SDB_NOT_CONNECTED ;
5278 return pSDB->getList ( cursor, listType,
5279 condition, selector, orderBy, hint,
5280 numToSkip, numToReturn ) ;
5283 INT32 getCollection (
const CHAR *pCollectionFullName,
5284 _sdbCollection **collection,
5285 BOOLEAN checkExist = TRUE
5290 return SDB_NOT_CONNECTED ;
5292 return pSDB->getCollection ( pCollectionFullName,
5293 collection, checkExist ) ;
5306 INT32 getCollection (
const CHAR *pCollectionFullName,
5308 BOOLEAN checkExist = TRUE
5313 return SDB_NOT_CONNECTED ;
5316 return pSDB->getCollection ( pCollectionFullName,
5321 INT32 getCollectionSpace (
const CHAR *pCollectionSpaceName,
5322 _sdbCollectionSpace **cs,
5323 BOOLEAN checkExist = TRUE
5328 return SDB_NOT_CONNECTED ;
5330 return pSDB->getCollectionSpace ( pCollectionSpaceName,
5344 INT32 getCollectionSpace (
const CHAR *pCollectionSpaceName,
5346 BOOLEAN checkExist = TRUE
5351 return SDB_NOT_CONNECTED ;
5354 return pSDB->getCollectionSpace ( pCollectionSpaceName,
5376 INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
5378 _sdbCollectionSpace **cs
5383 return SDB_NOT_CONNECTED ;
5385 return pSDB->createCollectionSpace ( pCollectionSpaceName,
5408 INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
5415 return SDB_NOT_CONNECTED ;
5418 return pSDB->createCollectionSpace ( pCollectionSpaceName,
5422 INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
5423 const bson::BSONObj &options,
5424 _sdbCollectionSpace **cs
5429 return SDB_NOT_CONNECTED ;
5431 return pSDB->createCollectionSpace ( pCollectionSpaceName,
5449 INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
5450 const bson::BSONObj &options,
5456 return SDB_NOT_CONNECTED ;
5459 return pSDB->createCollectionSpace ( pCollectionSpaceName,
5469 INT32 dropCollectionSpace (
const CHAR *pCollectionSpaceName )
5473 return SDB_NOT_CONNECTED ;
5475 return pSDB->dropCollectionSpace ( pCollectionSpaceName ) ;
5478 INT32 listCollectionSpaces ( _sdbCursor **result )
5482 return SDB_NOT_CONNECTED ;
5484 return pSDB->listCollectionSpaces ( result ) ;
5497 return SDB_NOT_CONNECTED ;
5500 return pSDB->listCollectionSpaces ( cursor ) ;
5509 INT32 listCollections ( _sdbCursor **result )
5513 return SDB_NOT_CONNECTED ;
5515 return pSDB->listCollections ( result ) ;
5528 return SDB_NOT_CONNECTED ;
5531 return pSDB->listCollections ( cursor ) ;
5540 INT32 listReplicaGroups ( _sdbCursor **result )
5544 return SDB_NOT_CONNECTED ;
5546 return pSDB->listReplicaGroups ( result ) ;
5560 return SDB_NOT_CONNECTED ;
5563 return pSDB->listReplicaGroups ( cursor ) ;
5573 INT32 getReplicaGroup (
const CHAR *pName, _sdbReplicaGroup **result )
5577 return SDB_NOT_CONNECTED ;
5579 return pSDB->getReplicaGroup ( pName, result ) ;
5594 return SDB_NOT_CONNECTED ;
5597 return pSDB->getReplicaGroup ( pName, group ) ;
5607 INT32 getReplicaGroup ( INT32
id, _sdbReplicaGroup **result )
5611 return SDB_NOT_CONNECTED ;
5613 return pSDB->getReplicaGroup (
id, result ) ;
5627 return SDB_NOT_CONNECTED ;
5630 return pSDB->getReplicaGroup (
id, group ) ;
5640 INT32 createReplicaGroup (
const CHAR *pName, _sdbReplicaGroup **replicaGroup )
5644 return SDB_NOT_CONNECTED ;
5646 return pSDB->createReplicaGroup ( pName, replicaGroup ) ;
5660 return SDB_NOT_CONNECTED ;
5663 return pSDB->createReplicaGroup ( pName, group ) ;
5672 INT32 removeReplicaGroup (
const CHAR *pName )
5676 return SDB_NOT_CONNECTED ;
5678 return pSDB->removeReplicaGroup ( pName ) ;
5693 INT32 createReplicaCataGroup (
const CHAR *pHostName,
5694 const CHAR *pServiceName,
5695 const CHAR *pDatabasePath,
5696 const bson::BSONObj &configure )
5700 return SDB_NOT_CONNECTED ;
5702 return pSDB->createReplicaCataGroup ( pHostName, pServiceName,
5703 pDatabasePath, configure ) ;
5706 INT32 activateReplicaGroup (
const CHAR *pName, _sdbReplicaGroup **replicaGroup )
5710 return SDB_NOT_CONNECTED ;
5712 return pSDB->activateReplicaGroup ( pName, replicaGroup ) ;
5726 return SDB_NOT_CONNECTED ;
5729 return pSDB->activateReplicaGroup ( pName, replicaGroup ) ;
5739 INT32 execUpdate(
const CHAR *sql, bson::BSONObj *pResult = NULL )
5743 return SDB_NOT_CONNECTED ;
5745 return pSDB->execUpdate( sql, pResult ) ;
5756 INT32 exec(
const CHAR *sql,
5757 _sdbCursor **result )
5761 return SDB_NOT_CONNECTED ;
5763 return pSDB->exec( sql, result ) ;
5774 INT32 exec(
const CHAR *sql,
5779 return SDB_NOT_CONNECTED ;
5782 return pSDB->exec( sql, cursor ) ;
5790 INT32 transactionBegin()
5794 return SDB_NOT_CONNECTED ;
5796 return pSDB->transactionBegin() ;
5804 INT32 transactionCommit()
5808 return SDB_NOT_CONNECTED ;
5810 return pSDB->transactionCommit() ;
5818 INT32 transactionRollback()
5822 return SDB_NOT_CONNECTED ;
5824 return pSDB->transactionRollback() ;
5835 INT32 flushConfigure(
const bson::BSONObj &options )
5839 return SDB_NOT_CONNECTED ;
5841 return pSDB->flushConfigure( options ) ;
5850 INT32 crtJSProcedure (
const CHAR *code )
5854 return SDB_NOT_CONNECTED ;
5856 return pSDB->crtJSProcedure( code ) ;
5865 INT32 rmProcedure(
const CHAR *spName )
5869 return SDB_NOT_CONNECTED ;
5871 return pSDB->rmProcedure( spName ) ;
5874 INT32 listProcedures( _sdbCursor **cursor,
const bson::BSONObj &condition )
5878 return SDB_NOT_CONNECTED ;
5880 return pSDB->listProcedures( cursor, condition ) ;
5890 INT32 listProcedures(
sdbCursor &cursor,
const bson::BSONObj &condition )
5894 return SDB_NOT_CONNECTED ;
5897 return pSDB->listProcedures( cursor, condition ) ;
5900 INT32 evalJS(
const CHAR *code,
5902 _sdbCursor **cursor,
5903 bson::BSONObj &errmsg )
5907 return SDB_NOT_CONNECTED ;
5909 return pSDB->evalJS( code, type, cursor, errmsg ) ;
5926 bson::BSONObj &errmsg )
5930 return SDB_NOT_CONNECTED ;
5933 return pSDB->evalJS( code, type, cursor, errmsg ) ;
5955 INT32 backupOffline (
const bson::BSONObj &options)
5957 return backup( options ) ;
5978 INT32 backup (
const bson::BSONObj &options)
5982 return SDB_NOT_CONNECTED ;
5984 return pSDB->backup( options ) ;
5988 INT32 listBackup ( _sdbCursor **cursor,
5989 const bson::BSONObj &options,
5990 const bson::BSONObj &condition = _sdbStaticObject,
5991 const bson::BSONObj &selector = _sdbStaticObject,
5992 const bson::BSONObj &orderBy = _sdbStaticObject)
5996 return SDB_NOT_CONNECTED ;
5998 return pSDB->listBackup( cursor, options, condition, selector, orderBy ) ;
6024 const bson::BSONObj &options,
6025 const bson::BSONObj &condition = _sdbStaticObject,
6026 const bson::BSONObj &selector = _sdbStaticObject,
6027 const bson::BSONObj &orderBy = _sdbStaticObject)
6031 return SDB_NOT_CONNECTED ;
6034 return pSDB->listBackup( cursor, options, condition, selector, orderBy ) ;
6051 INT32 removeBackup (
const bson::BSONObj &options)
6055 return SDB_NOT_CONNECTED ;
6057 return pSDB->removeBackup( options ) ;
6060 INT32 listTasks ( _sdbCursor **cursor,
6061 const bson::BSONObj &condition = _sdbStaticObject,
6062 const bson::BSONObj &selector = _sdbStaticObject,
6063 const bson::BSONObj &orderBy = _sdbStaticObject,
6064 const bson::BSONObj &hint = _sdbStaticObject)
6068 return SDB_NOT_CONNECTED ;
6070 return pSDB->listTasks ( cursor,
6094 const bson::BSONObj &condition = _sdbStaticObject,
6095 const bson::BSONObj &selector = _sdbStaticObject,
6096 const bson::BSONObj &orderBy = _sdbStaticObject,
6097 const bson::BSONObj &hint = _sdbStaticObject)
6101 return SDB_NOT_CONNECTED ;
6104 return pSDB->listTasks ( cursor,
6119 INT32 waitTasks (
const SINT64 *taskIDs,
6124 return SDB_NOT_CONNECTED ;
6126 return pSDB->waitTasks ( taskIDs,
6139 INT32 cancelTask ( SINT64 taskID,
6144 return SDB_NOT_CONNECTED ;
6146 return pSDB->cancelTask ( taskID,
6160 INT32 setSessionAttr (
const bson::BSONObj &options = _sdbStaticObject )
6164 return SDB_NOT_CONNECTED ;
6166 return pSDB->setSessionAttr ( options ) ;
6177 INT32 getSessionAttr ( bson::BSONObj & result,
6178 BOOLEAN useCache = TRUE )
6182 return SDB_NOT_CONNECTED ;
6184 return pSDB->getSessionAttr( result, useCache ) ;
6193 INT32 closeAllCursors ()
6195 return interrupt() ;
6208 return SDB_NOT_CONNECTED ;
6210 return pSDB->interrupt () ;
6221 INT32 interruptOperation()
6225 return SDB_NOT_CONNECTED ;
6227 return pSDB->interruptOperation () ;
6237 INT32 isValid ( BOOLEAN *result )
6241 return SDB_NOT_CONNECTED ;
6243 return pSDB->isValid ( result ) ;
6256 return pSDB->isValid () ;
6269 return pSDB->isClosed() ;
6290 INT32 createDomain (
const CHAR *pDomainName,
6291 const bson::BSONObj &options,
6296 return SDB_NOT_CONNECTED ;
6299 return pSDB->createDomain ( pDomainName, options, domain ) ;
6302 INT32 createDomain (
const CHAR *pDomainName,
6303 const bson::BSONObj &options,
6304 _sdbDomain **domain )
6308 return SDB_NOT_CONNECTED ;
6310 return pSDB->createDomain ( pDomainName, options, domain ) ;
6319 INT32 dropDomain (
const CHAR *pDomainName )
6323 return SDB_NOT_CONNECTED ;
6325 return pSDB->dropDomain ( pDomainName ) ;
6328 INT32 getDomain (
const CHAR *pDomainName,
6329 _sdbDomain **domain )
6333 return SDB_NOT_CONNECTED ;
6335 return pSDB->getDomain ( pDomainName, domain ) ;
6346 INT32 getDomain (
const CHAR *pDomainName,
6351 return SDB_NOT_CONNECTED ;
6354 return pSDB->getDomain ( pDomainName, domain ) ;
6357 INT32 listDomains ( _sdbCursor **cursor,
6358 const bson::BSONObj &condition = _sdbStaticObject,
6359 const bson::BSONObj &selector = _sdbStaticObject,
6360 const bson::BSONObj &orderBy = _sdbStaticObject,
6361 const bson::BSONObj &hint = _sdbStaticObject )
6365 return SDB_NOT_CONNECTED ;
6367 return pSDB->listDomains ( cursor, condition, selector, orderBy, hint ) ;
6388 const bson::BSONObj &condition = _sdbStaticObject,
6389 const bson::BSONObj &selector = _sdbStaticObject,
6390 const bson::BSONObj &orderBy = _sdbStaticObject,
6391 const bson::BSONObj &hint = _sdbStaticObject )
6395 return SDB_NOT_CONNECTED ;
6398 return pSDB->listDomains ( cursor, condition, selector, orderBy, hint ) ;
6406 INT32 getDC( sdbDataCenter &dc )
6410 return SDB_NOT_CONNECTED ;
6413 return pSDB->getDC ( dc ) ;
6421 INT32 getDC( _sdbDataCenter **dc )
6425 return SDB_NOT_CONNECTED ;
6427 return pSDB->getDC ( dc ) ;
6459 INT32 syncDB(
const bson::BSONObj &options = _sdbStaticObject )
6463 return SDB_NOT_CONNECTED ;
6465 return pSDB->syncDB ( options ) ;
6494 INT32 analyze (
const bson::BSONObj &options = _sdbStaticObject )
6498 return SDB_NOT_CONNECTED ;
6500 return pSDB->analyze ( options ) ;
6518 INT32 forceSession( SINT64 sessionID,
6519 const bson::BSONObj &options = _sdbStaticObject )
6523 return SDB_NOT_CONNECTED ;
6525 return pSDB->forceSession( sessionID, options ) ;
6542 INT32 forceStepUp(
const bson::BSONObj &options = _sdbStaticObject )
6546 return SDB_NOT_CONNECTED ;
6548 return pSDB->forceStepUp( options ) ;
6563 INT32 invalidateCache(
const bson::BSONObj &options = _sdbStaticObject )
6567 return SDB_NOT_CONNECTED ;
6569 return pSDB->invalidateCache( options ) ;
6585 INT32 reloadConfig(
const bson::BSONObj &options = _sdbStaticObject )
6589 return SDB_NOT_CONNECTED ;
6591 return pSDB->reloadConfig( options ) ;
6610 INT32 updateConfig(
const bson::BSONObj &configs = _sdbStaticObject,
6611 const bson::BSONObj &options = _sdbStaticObject )
6615 return SDB_NOT_CONNECTED ;
6617 return pSDB->updateConfig( configs, options ) ;
6636 INT32 deleteConfig(
const bson::BSONObj &configs = _sdbStaticObject,
6637 const bson::BSONObj &options = _sdbStaticObject )
6641 return SDB_NOT_CONNECTED ;
6643 return pSDB->deleteConfig( configs, options ) ;
6668 INT32 setPDLevel( INT32 level,
6669 const bson::BSONObj &options = _sdbStaticObject )
6673 return SDB_NOT_CONNECTED ;
6675 return pSDB->setPDLevel( level, options ) ;
6678 INT32 msg(
const CHAR* msg )
6682 return SDB_NOT_CONNECTED ;
6684 return pSDB->msg( msg ) ;
6702 INT32 loadCS(
const CHAR* csName,
6703 const bson::BSONObj &options = _sdbStaticObject )
6707 return SDB_NOT_CONNECTED ;
6709 return pSDB->loadCS( csName, options ) ;
6727 INT32 unloadCS(
const CHAR* csName,
6728 const bson::BSONObj &options = _sdbStaticObject )
6732 return SDB_NOT_CONNECTED ;
6734 return pSDB->unloadCS( csName, options ) ;
6749 INT32 traceStart( UINT32 traceBufferSize,
6750 const CHAR* component = NULL,
6751 const CHAR* breakpoint = NULL,
6752 const vector<UINT32> &tidVec = _sdbStaticUINT32Vec )
6756 return SDB_NOT_CONNECTED ;
6758 return pSDB->traceStart( traceBufferSize, component,
6759 breakpoint, tidVec ) ;
6781 INT32 traceStart( UINT32 traceBufferSize,
6782 const bson::BSONObj &options )
6786 return SDB_NOT_CONNECTED ;
6788 return pSDB->traceStart( traceBufferSize, options ) ;
6799 INT32 traceStop(
const CHAR* dumpFileName )
6803 return SDB_NOT_CONNECTED ;
6805 return pSDB->traceStop( dumpFileName ) ;
6817 return SDB_NOT_CONNECTED ;
6819 return pSDB->traceResume() ;
6832 return SDB_NOT_CONNECTED ;
6835 return pSDB->traceStatus( cursor ) ;
6838 INT32 traceStatus( _sdbCursor** cursor )
6842 return SDB_NOT_CONNECTED ;
6844 return pSDB->traceStatus( cursor ) ;
6857 INT32 renameCollectionSpace(
const CHAR* oldName,
6858 const CHAR* newName,
6859 const bson::BSONObj &options = _sdbStaticObject )
6863 return SDB_NOT_CONNECTED ;
6865 return pSDB->renameCollectionSpace( oldName, newName, options ) ;
6879 INT32 getLastErrorObj( bson::BSONObj &errObj )
6883 return SDB_NOT_CONNECTED ;
6885 return pSDB->getLastErrorObj( errObj ) ;
6891 void cleanLastErrorObj()
6897 return pSDB->cleanLastErrorObj() ;
6910 INT32 getLastResultObj( bson::BSONObj &result,
6911 BOOLEAN getOwned = FALSE )
const
6915 return SDB_NOT_CONNECTED ;
6917 return pSDB->getLastResultObj( result, getOwned ) ;
6920 INT32 createDataSource(
const CHAR *pDataSourceName,
6921 const CHAR *addresses,
6922 const CHAR *user = NULL,
6923 const CHAR *password = NULL,
6924 const CHAR *type = NULL,
6925 const bson::BSONObj *options = NULL,
6926 _sdbDataSource **dataSource = NULL )
6930 return SDB_NOT_CONNECTED ;
6932 return pSDB->createDataSource( pDataSourceName, addresses, user,
6933 password, type, options, dataSource ) ;
6936 INT32 dropDataSource(
const CHAR *pDataSourceName )
6940 return SDB_NOT_CONNECTED ;
6942 return pSDB->dropDataSource( pDataSourceName ) ;
6945 INT32 getDataSource(
const CHAR *pDataSourceName,
6946 _sdbDataSource **dataSource )
6950 return SDB_NOT_CONNECTED ;
6952 return pSDB->getDataSource( pDataSourceName, dataSource ) ;
6955 INT32 getDataSource(
const CHAR *pDataSourceName,
6956 sdbDataSource &dataSource )
6960 return SDB_NOT_CONNECTED ;
6963 return pSDB->getDataSource( pDataSourceName, dataSource ) ;
6967 INT32 listDataSources( _sdbCursor** cursor,
6968 const bson::BSONObj &condition = _sdbStaticObject,
6969 const bson::BSONObj &selector = _sdbStaticObject,
6970 const bson::BSONObj &orderBy = _sdbStaticObject,
6971 const bson::BSONObj &hint = _sdbStaticObject )
6975 return SDB_NOT_CONNECTED ;
6977 return pSDB->listDataSources( cursor, condition, selector, orderBy, hint ) ;
6980 INT32 listDataSources( sdbCursor& cursor,
6981 const bson::BSONObj &condition = _sdbStaticObject,
6982 const bson::BSONObj &selector = _sdbStaticObject,
6983 const bson::BSONObj &orderBy = _sdbStaticObject,
6984 const bson::BSONObj &hint = _sdbStaticObject )
6988 return SDB_NOT_CONNECTED ;
6991 return pSDB->listDataSources( cursor, condition, selector, orderBy, hint ) ;