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_ONE 0x00000002
109 #define UPDATE_RETURNNUM 0x00000004
112 #define FLG_DELETE_ONE 0x00000002
114 #define FLG_DELETE_RETURNNUM 0x00000004
116 #define SDB_INDEX_SORT_BUFFER_DEFAULT_SIZE 64
146 const static bson::BSONObj _sdbStaticObject ;
147 const static bson::OID _sdbStaticOid ;
148 const static std::vector<INT32> _sdbStaticVec ;
149 const static std::vector<UINT32> _sdbStaticUINT32Vec ;
151 class _sdbCollection ;
162 const CHAR *pDescription,
163 const CHAR *pDetail ) ;
171 class DLLEXPORT _sdbCursor
174 _sdbCursor (
const _sdbCursor& other ) ;
175 _sdbCursor& operator=(
const _sdbCursor& ) ;
178 virtual ~_sdbCursor () {}
179 virtual INT32 next ( bson::BSONObj &obj, BOOLEAN getOwned = TRUE ) = 0 ;
180 virtual INT32 current ( bson::BSONObj &obj, BOOLEAN getOwned = TRUE ) = 0 ;
181 virtual INT32 close () = 0 ;
236 INT32 next ( bson::BSONObj &obj, BOOLEAN getOwned = TRUE )
240 return SDB_NOT_CONNECTED ;
242 return pCursor->
next ( obj, getOwned ) ;
261 INT32 current ( bson::BSONObj &obj, BOOLEAN getOwned = TRUE )
265 return SDB_NOT_CONNECTED ;
267 return pCursor->current ( obj, getOwned ) ;
281 return pCursor->close () ;
285 class DLLEXPORT _sdbCollection
288 _sdbCollection (
const _sdbCollection& other ) ;
289 _sdbCollection& operator=(
const _sdbCollection& ) ;
292 virtual ~_sdbCollection () {}
295 virtual INT32 getCount ( SINT64 &count,
296 const bson::BSONObj &condition = _sdbStaticObject,
297 const bson::BSONObj &hint = _sdbStaticObject ) = 0 ;
302 virtual INT32 insert (
const bson::BSONObj &obj, bson::OID *
id = NULL ) = 0 ;
303 virtual INT32 insert (
const bson::BSONObj &obj,
305 bson::BSONObj *pResult = NULL ) = 0 ;
306 virtual INT32 insert (
const bson::BSONObj &obj,
307 const bson::BSONObj &hint,
309 bson::BSONObj *pResult = NULL ) = 0 ;
310 virtual INT32 insert ( std::vector<bson::BSONObj> &objs,
312 bson::BSONObj *pResult = NULL ) = 0 ;
313 virtual INT32 insert ( std::vector<bson::BSONObj> &objs,
314 const bson::BSONObj &hint,
316 bson::BSONObj *pResult = NULL ) = 0 ;
317 virtual INT32 insert (
const bson::BSONObj objs[],
320 bson::BSONObj *pResult = NULL ) = 0 ;
321 virtual INT32 bulkInsert ( SINT32 flags,
322 std::vector<bson::BSONObj> &obj
331 virtual INT32 update (
const bson::BSONObj &rule,
332 const bson::BSONObj &condition = _sdbStaticObject,
333 const bson::BSONObj &hint = _sdbStaticObject,
335 bson::BSONObj *pResult = NULL
347 virtual INT32 upsert (
const bson::BSONObj &rule,
348 const bson::BSONObj &condition = _sdbStaticObject,
349 const bson::BSONObj &hint = _sdbStaticObject,
350 const bson::BSONObj &setOnInsert = _sdbStaticObject,
352 bson::BSONObj *pResult = NULL
361 virtual INT32 del (
const bson::BSONObj &condition = _sdbStaticObject,
362 const bson::BSONObj &hint = _sdbStaticObject,
364 bson::BSONObj *pResult = NULL
374 virtual INT32 query ( _sdbCursor **cursor,
375 const bson::BSONObj &condition = _sdbStaticObject,
376 const bson::BSONObj &selected = _sdbStaticObject,
377 const bson::BSONObj &orderBy = _sdbStaticObject,
378 const bson::BSONObj &hint = _sdbStaticObject,
380 INT64 numToReturn = -1,
384 virtual INT32 query ( sdbCursor &cursor,
385 const bson::BSONObj &condition = _sdbStaticObject,
386 const bson::BSONObj &selected = _sdbStaticObject,
387 const bson::BSONObj &orderBy = _sdbStaticObject,
388 const bson::BSONObj &hint = _sdbStaticObject,
390 INT64 numToReturn = -1,
394 virtual INT32 queryOne( bson::BSONObj &obj,
395 const bson::BSONObj &condition = _sdbStaticObject,
396 const bson::BSONObj &selected = _sdbStaticObject,
397 const bson::BSONObj &orderBy = _sdbStaticObject,
398 const bson::BSONObj &hint = _sdbStaticObject,
400 INT32 flags = 0 ) = 0 ;
412 virtual INT32 queryAndUpdate ( _sdbCursor **cursor,
413 const bson::BSONObj &update,
414 const bson::BSONObj &condition = _sdbStaticObject,
415 const bson::BSONObj &selected = _sdbStaticObject,
416 const bson::BSONObj &orderBy = _sdbStaticObject,
417 const bson::BSONObj &hint = _sdbStaticObject,
419 INT64 numToReturn = -1,
421 BOOLEAN returnNew = FALSE
432 virtual INT32 queryAndRemove ( _sdbCursor **cursor,
433 const bson::BSONObj &condition = _sdbStaticObject,
434 const bson::BSONObj &selected = _sdbStaticObject,
435 const bson::BSONObj &orderBy = _sdbStaticObject,
436 const bson::BSONObj &hint = _sdbStaticObject,
438 INT64 numToReturn = -1,
449 virtual INT32 createIndex (
const bson::BSONObj &indexDef,
453 INT32 sortBufferSize ) = 0 ;
454 virtual INT32 createIndex (
const bson::BSONObj &indexDef,
456 const bson::BSONObj &options ) = 0 ;
457 virtual INT32 getIndexes ( _sdbCursor **cursor,
458 const CHAR *pName ) = 0 ;
459 virtual INT32 getIndexes ( sdbCursor &cursor,
460 const CHAR *pIndexName ) = 0 ;
461 virtual INT32 getIndexes ( std::vector<bson::BSONObj> &infos ) = 0 ;
462 virtual INT32 getIndex (
const CHAR *pIndexName, bson::BSONObj &info ) = 0 ;
463 virtual INT32 dropIndex (
const CHAR *pIndexName ) = 0 ;
464 virtual INT32 create () = 0 ;
465 virtual INT32 drop () = 0 ;
466 virtual const CHAR *getCollectionName () = 0 ;
467 virtual const CHAR *getCSName () = 0 ;
468 virtual const CHAR *getFullName () = 0 ;
469 virtual INT32 split (
const CHAR *pSourceGroupName,
470 const CHAR *pTargetGroupName,
471 const bson::BSONObj &splitConditon,
472 const bson::BSONObj &splitEndCondition = _sdbStaticObject) = 0 ;
473 virtual INT32 split (
const CHAR *pSourceGroupName,
474 const CHAR *pTargetGroupName,
475 FLOAT64 percent ) = 0 ;
476 virtual INT32 splitAsync ( SINT64 &taskID,
477 const CHAR *pSourceGroupName,
478 const CHAR *pTargetGroupName,
479 const bson::BSONObj &splitCondition,
480 const bson::BSONObj &splitEndCondition = _sdbStaticObject) = 0 ;
481 virtual INT32 splitAsync (
const CHAR *pSourceGroupName,
482 const CHAR *pTargetGroupName,
484 SINT64 &taskID ) = 0 ;
485 virtual INT32 aggregate ( _sdbCursor **cursor,
486 std::vector<bson::BSONObj> &obj
488 virtual INT32 aggregate ( sdbCursor &cursor,
489 std::vector<bson::BSONObj> &obj
491 virtual INT32 getQueryMeta ( _sdbCursor **cursor,
492 const bson::BSONObj &condition = _sdbStaticObject,
493 const bson::BSONObj &orderBy = _sdbStaticObject,
494 const bson::BSONObj &hint = _sdbStaticObject,
496 INT64 numToReturn = -1
498 virtual INT32 getQueryMeta ( sdbCursor &cursor,
499 const bson::BSONObj &condition = _sdbStaticObject,
500 const bson::BSONObj &orderBy = _sdbStaticObject,
501 const bson::BSONObj &hint = _sdbStaticObject,
503 INT64 numToReturn = -1
505 virtual INT32 attachCollection (
const CHAR *subClFullName,
506 const bson::BSONObj &options) = 0 ;
507 virtual INT32 detachCollection (
const CHAR *subClFullName) = 0 ;
509 virtual INT32 alterCollection (
const bson::BSONObj &options ) = 0 ;
511 virtual INT32 explain ( sdbCursor &cursor,
512 const bson::BSONObj &condition = _sdbStaticObject,
513 const bson::BSONObj &select = _sdbStaticObject,
514 const bson::BSONObj &orderBy = _sdbStaticObject,
515 const bson::BSONObj &hint = _sdbStaticObject,
517 INT64 numToReturn = -1,
519 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
521 virtual INT32 explain ( _sdbCursor **cursor,
522 const bson::BSONObj &condition = _sdbStaticObject,
523 const bson::BSONObj &select = _sdbStaticObject,
524 const bson::BSONObj &orderBy = _sdbStaticObject,
525 const bson::BSONObj &hint = _sdbStaticObject,
527 INT64 numToReturn = -1,
529 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
531 virtual INT32 createLob( sdbLob &lob,
const bson::OID *oid = NULL ) = 0 ;
533 virtual INT32 removeLob(
const bson::OID &oid ) = 0 ;
535 virtual INT32 truncateLob(
const bson::OID &oid, INT64 length ) = 0 ;
537 virtual INT32 openLob( sdbLob &lob,
const bson::OID &oid,
540 virtual INT32 openLob( sdbLob &lob,
const bson::OID &oid,
543 virtual INT32 listLobs( sdbCursor &cursor,
544 const bson::BSONObj &condition = _sdbStaticObject,
545 const bson::BSONObj &selected = _sdbStaticObject,
546 const bson::BSONObj &orderBy = _sdbStaticObject,
547 const bson::BSONObj &hint = _sdbStaticObject,
549 INT64 numToReturn = -1 ) = 0 ;
551 virtual INT32 listLobs( _sdbCursor **cursor,
552 const bson::BSONObj &condition = _sdbStaticObject,
553 const bson::BSONObj &selected = _sdbStaticObject,
554 const bson::BSONObj &orderBy = _sdbStaticObject,
555 const bson::BSONObj &hint = _sdbStaticObject,
557 INT64 numToReturn = -1 ) = 0 ;
559 virtual INT32 createLobID( bson::OID &oid,
const CHAR *pTimeStamp = NULL ) = 0 ;
561 virtual INT32 listLobPieces(
563 const bson::BSONObj &condition = _sdbStaticObject,
564 const bson::BSONObj &selected = _sdbStaticObject,
565 const bson::BSONObj &orderBy = _sdbStaticObject,
566 const bson::BSONObj &hint = _sdbStaticObject,
568 INT64 numToReturn = -1 ) = 0 ;
570 virtual INT32 listLobPieces(
572 const bson::BSONObj &condition = _sdbStaticObject,
573 const bson::BSONObj &selected = _sdbStaticObject,
574 const bson::BSONObj &orderBy = _sdbStaticObject,
575 const bson::BSONObj &hint = _sdbStaticObject,
577 INT64 numToReturn = -1 ) = 0 ;
580 virtual INT32 truncate() = 0 ;
583 virtual INT32 createIdIndex(
const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
585 virtual INT32 dropIdIndex() = 0 ;
587 virtual INT32 createAutoIncrement(
const bson::BSONObj &options ) = 0;
589 virtual INT32 createAutoIncrement(
const std::vector<bson::BSONObj> &options ) = 0;
591 virtual INT32 dropAutoIncrement(
const CHAR *fieldName ) = 0;
593 virtual INT32 dropAutoIncrement(
const std::vector<const CHAR*> &fieldNames ) = 0;
595 virtual INT32 pop (
const bson::BSONObj &option = _sdbStaticObject ) = 0 ;
597 virtual INT32 enableSharding (
const bson::BSONObj &options ) = 0 ;
599 virtual INT32 disableSharding () = 0 ;
601 virtual INT32 enableCompression (
const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
603 virtual INT32 disableCompression () = 0 ;
605 virtual INT32 setAttributes (
const bson::BSONObj &options ) = 0 ;
607 virtual INT32 getDetail ( _sdbCursor **cursor ) = 0 ;
609 virtual INT32 getDetail ( sdbCursor &cursor ) = 0 ;
611 virtual INT32 getIndexStat (
const CHAR *pIndexName, bson::BSONObj &result ) = 0 ;
613 virtual void setVersion( INT32 clVersion ) = 0;
614 virtual INT32 getVersion() = 0;
676 INT32 getCount ( SINT64 &count,
677 const bson::BSONObj &condition = _sdbStaticObject,
678 const bson::BSONObj &hint = _sdbStaticObject )
682 return SDB_NOT_CONNECTED ;
684 return pCollection->
getCount ( count, condition, hint ) ;
704 INT32 split (
const CHAR *pSourceGroupName,
705 const CHAR *pTargetGroupName,
706 const bson::BSONObj &splitCondition,
707 const bson::BSONObj &splitEndCondition = _sdbStaticObject)
711 return SDB_NOT_CONNECTED ;
713 return pCollection->split ( pSourceGroupName,
730 INT32 split (
const CHAR *pSourceGroupName,
731 const CHAR *pTargetGroupName,
736 return SDB_NOT_CONNECTED ;
738 return pCollection->split ( pSourceGroupName,
762 INT32 splitAsync ( SINT64 &taskID,
763 const CHAR *pSourceGroupName,
764 const CHAR *pTargetGroupName,
765 const bson::BSONObj &splitCondition,
766 const bson::BSONObj &splitEndCondition = _sdbStaticObject )
770 return SDB_NOT_CONNECTED ;
772 return pCollection->splitAsync ( taskID,
776 splitEndCondition ) ;
792 INT32 splitAsync (
const CHAR *pSourceGroupName,
793 const CHAR *pTargetGroupName,
799 return SDB_NOT_CONNECTED ;
801 return pCollection->splitAsync ( pSourceGroupName,
826 INT32 alterCollection (
const bson::BSONObj &options )
830 return SDB_NOT_CONNECTED ;
832 return pCollection->alterCollection ( options ) ;
857 INT32 insert (
const bson::BSONObj &obj, bson::OID *pId = NULL )
861 return SDB_NOT_CONNECTED ;
863 return pCollection->insert ( obj, pId ) ;
907 INT32 insert (
const bson::BSONObj &obj,
909 bson::BSONObj *pResult = NULL )
913 return SDB_NOT_CONNECTED ;
915 return pCollection->insert ( obj, flags, pResult ) ;
962 INT32 insert (
const bson::BSONObj &obj,
963 const bson::BSONObj &hint,
965 bson::BSONObj *pResult = NULL )
969 return SDB_NOT_CONNECTED ;
971 return pCollection->insert ( obj, hint, flags, pResult ) ;
1018 INT32 insert ( std::vector<bson::BSONObj> &objs,
1020 bson::BSONObj *pResult = NULL )
1024 return SDB_NOT_CONNECTED ;
1026 return pCollection->insert( objs, flags, pResult ) ;
1076 INT32 insert ( std::vector<bson::BSONObj> &objs,
1077 const bson::BSONObj &hint,
1079 bson::BSONObj *pResult = NULL )
1083 return SDB_NOT_CONNECTED ;
1085 return pCollection->insert( objs, hint, flags, pResult ) ;
1135 INT32 insert (
const bson::BSONObj objs[],
1138 bson::BSONObj *pResult = NULL )
1142 return SDB_NOT_CONNECTED ;
1144 return pCollection->insert ( objs, size, flags, pResult ) ;
1174 INT32 bulkInsert ( SINT32 flags,
1175 std::vector<bson::BSONObj> &objs )
1179 return SDB_NOT_CONNECTED ;
1181 return pCollection->bulkInsert ( flags, objs ) ;
1207 INT32 update (
const bson::BSONObj &rule,
1208 const bson::BSONObj &condition = _sdbStaticObject,
1209 const bson::BSONObj &hint = _sdbStaticObject,
1211 bson::BSONObj *pResult = NULL
1216 return SDB_NOT_CONNECTED ;
1218 return pCollection->update ( rule, condition, hint, flag, pResult ) ;
1245 INT32 upsert (
const bson::BSONObj &rule,
1246 const bson::BSONObj &condition = _sdbStaticObject,
1247 const bson::BSONObj &hint = _sdbStaticObject,
1248 const bson::BSONObj &setOnInsert = _sdbStaticObject,
1250 bson::BSONObj *pResult = NULL
1255 return SDB_NOT_CONNECTED ;
1257 return pCollection->upsert ( rule, condition, hint, setOnInsert,
1278 INT32 del (
const bson::BSONObj &condition = _sdbStaticObject,
1279 const bson::BSONObj &hint = _sdbStaticObject,
1281 bson::BSONObj *pResult = NULL
1286 return SDB_NOT_CONNECTED ;
1288 return pCollection->del ( condition, hint, flag, pResult ) ;
1321 INT32 query ( _sdbCursor **cursor,
1322 const bson::BSONObj &condition = _sdbStaticObject,
1323 const bson::BSONObj &selected = _sdbStaticObject,
1324 const bson::BSONObj &orderBy = _sdbStaticObject,
1325 const bson::BSONObj &hint = _sdbStaticObject,
1326 INT64 numToSkip = 0,
1327 INT64 numToReturn = -1,
1333 return SDB_NOT_CONNECTED ;
1335 return pCollection->query ( cursor, condition, selected, orderBy,
1336 hint, numToSkip, numToReturn, flags ) ;
1370 const bson::BSONObj &condition = _sdbStaticObject,
1371 const bson::BSONObj &selected = _sdbStaticObject,
1372 const bson::BSONObj &orderBy = _sdbStaticObject,
1373 const bson::BSONObj &hint = _sdbStaticObject,
1374 INT64 numToSkip = 0,
1375 INT64 numToReturn = -1,
1381 return SDB_NOT_CONNECTED ;
1384 return pCollection->query ( cursor, condition, selected, orderBy,
1385 hint, numToSkip, numToReturn, flags ) ;
1416 INT32 queryOne( bson::BSONObj &obj,
1417 const bson::BSONObj &condition = _sdbStaticObject,
1418 const bson::BSONObj &selected = _sdbStaticObject,
1419 const bson::BSONObj &orderBy = _sdbStaticObject,
1420 const bson::BSONObj &hint = _sdbStaticObject,
1421 INT64 numToSkip = 0,
1426 return SDB_NOT_CONNECTED ;
1428 return pCollection->queryOne( obj, condition, selected, orderBy,
1429 hint, numToSkip, flag ) ;
1468 const bson::BSONObj &update,
1469 const bson::BSONObj &condition = _sdbStaticObject,
1470 const bson::BSONObj &selected = _sdbStaticObject,
1471 const bson::BSONObj &orderBy = _sdbStaticObject,
1472 const bson::BSONObj &hint = _sdbStaticObject,
1473 INT64 numToSkip = 0,
1474 INT64 numToReturn = -1,
1476 BOOLEAN returnNew = FALSE
1481 return SDB_NOT_CONNECTED ;
1484 return pCollection->queryAndUpdate( &cursor.
pCursor , update, condition,
1485 selected, orderBy, hint,
1486 numToSkip, numToReturn, flag, returnNew ) ;
1520 const bson::BSONObj &condition = _sdbStaticObject,
1521 const bson::BSONObj &selected = _sdbStaticObject,
1522 const bson::BSONObj &orderBy = _sdbStaticObject,
1523 const bson::BSONObj &hint = _sdbStaticObject,
1524 INT64 numToSkip = 0,
1525 INT64 numToReturn = -1,
1531 return SDB_NOT_CONNECTED ;
1534 return pCollection->queryAndRemove( &cursor.
pCursor , condition,
1535 selected, orderBy, hint,
1536 numToSkip, numToReturn, flag ) ;
1555 INT32 createIndex (
const bson::BSONObj &indexDef,
1556 const CHAR *pIndexName,
1559 INT32 sortBufferSize =
1560 SDB_INDEX_SORT_BUFFER_DEFAULT_SIZE )
1564 return SDB_NOT_CONNECTED ;
1566 return pCollection->createIndex ( indexDef, pIndexName, isUnique,
1567 isEnforced, sortBufferSize ) ;
1588 INT32 createIndex (
const bson::BSONObj &indexDef,
1589 const CHAR *pIndexName,
1590 const bson::BSONObj &options )
1594 return SDB_NOT_CONNECTED ;
1596 return pCollection->createIndex ( indexDef, pIndexName, options ) ;
1607 INT32 getIndexes ( _sdbCursor **cursor,
1608 const CHAR *pIndexName )
1612 return SDB_NOT_CONNECTED ;
1614 return pCollection->getIndexes ( cursor, pIndexName ) ;
1627 const CHAR *pIndexName )
1631 return SDB_NOT_CONNECTED ;
1634 return pCollection->getIndexes ( cursor, pIndexName ) ;
1643 INT32 getIndexes ( std::vector<bson::BSONObj> &infos )
1647 return SDB_NOT_CONNECTED ;
1649 return pCollection->getIndexes ( infos ) ;
1659 INT32 getIndex (
const CHAR *pIndexName, bson::BSONObj &info )
1663 return SDB_NOT_CONNECTED ;
1665 return pCollection->getIndex ( pIndexName, info ) ;
1674 INT32 dropIndex (
const CHAR *pIndexName )
1678 return SDB_NOT_CONNECTED ;
1680 return pCollection->dropIndex ( pIndexName ) ;
1693 return SDB_NOT_CONNECTED ;
1695 return pCollection->create () ;
1708 return SDB_NOT_CONNECTED ;
1710 return pCollection->drop () ;
1717 const CHAR *getCollectionName ()
1723 return pCollection->getCollectionName () ;
1730 const CHAR *getCSName ()
1736 return pCollection->getCSName () ;
1743 const CHAR *getFullName ()
1749 return pCollection->getFullName () ;
1761 INT32 aggregate ( _sdbCursor **cursor,
1762 std::vector<bson::BSONObj> &obj
1767 return SDB_NOT_CONNECTED ;
1769 return pCollection->aggregate ( cursor, obj ) ;
1782 std::vector<bson::BSONObj> &obj
1787 return SDB_NOT_CONNECTED ;
1790 return pCollection->aggregate ( cursor, obj ) ;
1812 INT32 getQueryMeta ( _sdbCursor **cursor,
1813 const bson::BSONObj &condition = _sdbStaticObject,
1814 const bson::BSONObj &orderBy = _sdbStaticObject,
1815 const bson::BSONObj &hint = _sdbStaticObject,
1816 INT64 numToSkip = 0,
1817 INT64 numToReturn = -1 )
1821 return SDB_NOT_CONNECTED ;
1823 return pCollection->getQueryMeta ( cursor, condition, orderBy,
1824 hint, numToSkip, numToReturn ) ;
1848 const bson::BSONObj &condition = _sdbStaticObject,
1849 const bson::BSONObj &orderBy = _sdbStaticObject,
1850 const bson::BSONObj &hint = _sdbStaticObject,
1851 INT64 numToSkip = 0,
1852 INT64 numToReturn = -1 )
1856 return SDB_NOT_CONNECTED ;
1859 return pCollection->getQueryMeta ( cursor, condition, orderBy,
1860 hint, numToSkip, numToReturn ) ;
1876 INT32 attachCollection (
const CHAR *subClFullName,
1877 const bson::BSONObj &options)
1881 return SDB_NOT_CONNECTED ;
1883 return pCollection->attachCollection ( subClFullName, options ) ;
1892 INT32 detachCollection (
const CHAR *subClFullName)
1896 return SDB_NOT_CONNECTED ;
1898 return pCollection->detachCollection ( subClFullName ) ;
1937 const bson::BSONObj &condition = _sdbStaticObject,
1938 const bson::BSONObj &select = _sdbStaticObject,
1939 const bson::BSONObj &orderBy = _sdbStaticObject,
1940 const bson::BSONObj &hint = _sdbStaticObject,
1941 INT64 numToSkip = 0,
1942 INT64 numToReturn = -1,
1944 const bson::BSONObj &options = _sdbStaticObject )
1948 return SDB_NOT_CONNECTED ;
1951 return pCollection->explain( cursor, condition, select, orderBy, hint,
1952 numToSkip, numToReturn, flag, options ) ;
1955 INT32 explain ( _sdbCursor **cursor,
1956 const bson::BSONObj &condition = _sdbStaticObject,
1957 const bson::BSONObj &select = _sdbStaticObject,
1958 const bson::BSONObj &orderBy = _sdbStaticObject,
1959 const bson::BSONObj &hint = _sdbStaticObject,
1960 INT64 numToSkip = 0,
1961 INT64 numToReturn = -1,
1963 const bson::BSONObj &options = _sdbStaticObject )
1967 return SDB_NOT_CONNECTED ;
1969 return pCollection->explain( cursor, condition, select, orderBy, hint,
1970 numToSkip, numToReturn, flag, options ) ;
1981 INT32 createLob(
sdbLob &lob,
const bson::OID *oid = NULL )
1985 return SDB_NOT_CONNECTED ;
1987 return pCollection->createLob( lob, oid ) ;
1996 INT32 removeLob(
const bson::OID &oid )
2000 return SDB_NOT_CONNECTED ;
2002 return pCollection->removeLob( oid ) ;
2012 INT32 truncateLob(
const bson::OID &oid, INT64 length )
2016 return SDB_NOT_CONNECTED ;
2018 return pCollection->truncateLob( oid, length ) ;
2030 INT32 openLob(
sdbLob &lob,
const bson::OID &oid,
2035 return SDB_NOT_CONNECTED ;
2037 return pCollection->openLob( lob, oid, mode ) ;
2049 INT32 openLob(
sdbLob &lob,
const bson::OID &oid, INT32 mode )
2053 return SDB_NOT_CONNECTED ;
2055 return pCollection->openLob( lob, oid, mode ) ;
2076 const bson::BSONObj &condition = _sdbStaticObject,
2077 const bson::BSONObj &selected = _sdbStaticObject,
2078 const bson::BSONObj &orderBy = _sdbStaticObject,
2079 const bson::BSONObj &hint = _sdbStaticObject,
2080 INT64 numToSkip = 0,
2081 INT64 numToReturn = -1 )
2085 return SDB_NOT_CONNECTED ;
2088 return pCollection->listLobs( cursor, condition, selected, orderBy,
2089 hint, numToSkip, numToReturn ) ;
2092 INT32 listLobs( _sdbCursor **cursor,
2093 const bson::BSONObj &condition = _sdbStaticObject,
2094 const bson::BSONObj &selected = _sdbStaticObject,
2095 const bson::BSONObj &orderBy = _sdbStaticObject,
2096 const bson::BSONObj &hint = _sdbStaticObject,
2097 INT64 numToSkip = 0,
2098 INT64 numToReturn = -1 )
2102 return SDB_NOT_CONNECTED ;
2104 return pCollection->listLobs( cursor, condition, selected, orderBy,
2105 hint, numToSkip, numToReturn ) ;
2116 INT32 createLobID( bson::OID &oid,
const CHAR *pTimeStamp = NULL )
2120 return SDB_NOT_CONNECTED ;
2122 return pCollection->createLobID( oid, pTimeStamp ) ;
2134 return SDB_NOT_CONNECTED ;
2136 return pCollection->truncate() ;
2148 INT32 createIdIndex(
const bson::BSONObj &options = _sdbStaticObject )
2152 return SDB_NOT_CONNECTED ;
2154 return pCollection->createIdIndex( options ) ;
2167 return SDB_NOT_CONNECTED ;
2169 return pCollection->dropIdIndex() ;
2189 INT32 createAutoIncrement (
const bson::BSONObj &options )
2193 return SDB_NOT_CONNECTED ;
2195 return pCollection->createAutoIncrement( options ) ;
2204 INT32 createAutoIncrement (
const std::vector<bson::BSONObj> &options )
2208 return SDB_NOT_CONNECTED ;
2210 return pCollection->createAutoIncrement( options ) ;
2219 INT32 dropAutoIncrement (
const CHAR * fieldName )
2223 return SDB_NOT_CONNECTED ;
2225 return pCollection->dropAutoIncrement( fieldName ) ;
2234 INT32 dropAutoIncrement (
const std::vector<const CHAR*> &fieldNames )
2238 return SDB_NOT_CONNECTED ;
2240 return pCollection->dropAutoIncrement( fieldNames ) ;
2256 INT32 enableSharding (
const bson::BSONObj & options = _sdbStaticObject )
2260 return SDB_NOT_CONNECTED ;
2262 return pCollection->enableSharding( options ) ;
2270 INT32 disableSharding ()
2274 return SDB_NOT_CONNECTED ;
2276 return pCollection->disableSharding() ;
2287 INT32 enableCompression (
const bson::BSONObj & options = _sdbStaticObject )
2291 return SDB_NOT_CONNECTED ;
2293 return pCollection->enableCompression( options ) ;
2301 INT32 disableCompression ()
2305 return SDB_NOT_CONNECTED ;
2307 return pCollection->disableCompression() ;
2330 INT32 setAttributes (
const bson::BSONObj &options )
2334 return SDB_NOT_CONNECTED ;
2336 return pCollection->setAttributes( options ) ;
2348 INT32 pop (
const bson::BSONObj &option = _sdbStaticObject )
2352 return SDB_NOT_CONNECTED ;
2354 return pCollection->pop( option ) ;
2357 INT32 listLobPieces( _sdbCursor **cursor,
2358 const bson::BSONObj &condition = _sdbStaticObject,
2359 const bson::BSONObj &selected = _sdbStaticObject,
2360 const bson::BSONObj &orderBy = _sdbStaticObject,
2361 const bson::BSONObj &hint = _sdbStaticObject,
2362 INT64 numToSkip = 0,
2363 INT64 numToReturn = -1 )
2367 return SDB_NOT_CONNECTED ;
2369 return pCollection->listLobPieces( cursor, condition, selected,
2370 orderBy, hint, numToSkip,
2387 INT32 listLobPieces( sdbCursor &cursor,
2388 const bson::BSONObj &condition = _sdbStaticObject,
2389 const bson::BSONObj &selected = _sdbStaticObject,
2390 const bson::BSONObj &orderBy = _sdbStaticObject,
2391 const bson::BSONObj &hint = _sdbStaticObject,
2392 INT64 numToSkip = 0,
2393 INT64 numToReturn = -1 )
2397 return SDB_NOT_CONNECTED ;
2400 return pCollection->listLobPieces( cursor, condition, selected,
2401 orderBy, hint, numToSkip,
2411 INT32 getDetail ( _sdbCursor **cursor )
2415 return SDB_NOT_CONNECTED ;
2417 return pCollection->getDetail ( cursor ) ;
2430 return SDB_NOT_CONNECTED ;
2432 return pCollection->getDetail( cursor ) ;
2442 INT32 getIndexStat(
const CHAR *pIndexName, bson::BSONObj &result )
2446 return SDB_NOT_CONNECTED ;
2448 return pCollection->getIndexStat( pIndexName, result ) ;
2455 void setVersion( INT32 clVersion )
2457 pCollection->setVersion( clVersion ) ;
2465 return pCollection->getVersion() ;
2485 class DLLEXPORT _sdbNode
2488 _sdbNode (
const _sdbNode& other ) ;
2489 _sdbNode& operator=(
const _sdbNode& ) ;
2492 virtual ~_sdbNode () {}
2494 virtual INT32 connect ( _sdb **dbConn ) = 0 ;
2495 virtual INT32 connect (
sdb &dbConn ) = 0 ;
2501 virtual const CHAR *getHostName () = 0 ;
2504 virtual const CHAR *getServiceName () = 0 ;
2507 virtual const CHAR *getNodeName () = 0 ;
2510 virtual INT32 getNodeID( INT32 &nodeID )
const = 0 ;
2513 virtual INT32 stop () = 0 ;
2516 virtual INT32 start () = 0 ;
2577 INT32 connect ( _sdb **dbConn )
2581 return SDB_NOT_CONNECTED ;
2583 return pNode->connect ( dbConn ) ;
2596 return SDB_NOT_CONNECTED ;
2601 return pNode->connect ( dbConn ) ;
2614 return SDB_NODE_UNKNOWN ;
2616 return pNode->getStatus () ;
2623 const CHAR *getHostName ()
2629 return pNode->getHostName () ;
2636 const CHAR *getServiceName ()
2642 return pNode->getServiceName () ;
2649 const CHAR *getNodeName ()
2655 return pNode->getNodeName () ;
2662 INT32 getNodeID( INT32 &nodeID )
const
2666 return SDB_NOT_CONNECTED ;
2668 return pNode->getNodeID( nodeID ) ;
2680 return SDB_NOT_CONNECTED ;
2682 return pNode->stop () ;
2694 return SDB_NOT_CONNECTED ;
2696 return pNode->start () ;
2708 class DLLEXPORT _sdbReplicaGroup
2711 _sdbReplicaGroup (
const _sdbReplicaGroup& other ) ;
2712 _sdbReplicaGroup& operator=(
const _sdbReplicaGroup& ) ;
2714 _sdbReplicaGroup () {}
2715 virtual ~_sdbReplicaGroup () {}
2717 virtual INT32 getNodeNum (
sdbNodeStatus status, INT32 *num ) = 0 ;
2720 virtual INT32 getDetail ( bson::BSONObj &result ) = 0 ;
2723 virtual INT32 getMaster ( _sdbNode **node ) = 0 ;
2724 virtual INT32 getMaster ( sdbNode &node ) = 0 ;
2727 virtual INT32 getSlave ( _sdbNode **node,
2728 const vector<INT32>& positions = _sdbStaticVec ) = 0 ;
2729 virtual INT32 getSlave ( sdbNode &node,
2730 const vector<INT32>& positions = _sdbStaticVec ) = 0 ;
2733 virtual INT32 getNode (
const CHAR *pNodeName,
2734 _sdbNode **node ) = 0 ;
2735 virtual INT32 getNode (
const CHAR *pNodeName,
2736 sdbNode &node ) = 0 ;
2739 virtual INT32 getNode (
const CHAR *pHostName,
2740 const CHAR *pServiceName,
2741 _sdbNode **node ) = 0 ;
2742 virtual INT32 getNode (
const CHAR *pHostName,
2743 const CHAR *pServiceName,
2744 sdbNode &node ) = 0 ;
2747 virtual INT32 createNode (
const CHAR *pHostName,
2748 const CHAR *pServiceName,
2749 const CHAR *pDatabasePath,
2750 std::map<std::string,std::string> &config )= 0;
2752 virtual INT32 createNode (
const CHAR *pHostName,
2753 const CHAR *pServiceName,
2754 const CHAR *pDatabasePath,
2755 const bson::BSONObj &options = _sdbStaticObject )= 0;
2758 virtual INT32 removeNode (
const CHAR *pHostName,
2759 const CHAR *pServiceName,
2760 const bson::BSONObj &configure = _sdbStaticObject ) = 0 ;
2762 virtual INT32 stop () = 0 ;
2765 virtual INT32 start () = 0 ;
2768 virtual const CHAR *getName () = 0 ;
2771 virtual BOOLEAN isCatalog () = 0 ;
2774 virtual INT32 attachNode(
const CHAR *pHostName,
2775 const CHAR *pSvcName,
2776 const bson::BSONObj &options ) = 0 ;
2779 virtual INT32 detachNode(
const CHAR *pHostName,
2780 const CHAR *pSvcName,
2781 const bson::BSONObj &options ) = 0 ;
2784 virtual INT32 reelect(
const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
2809 pReplicaGroup = NULL ;
2817 if ( pReplicaGroup )
2819 delete pReplicaGroup ;
2839 if ( !pReplicaGroup )
2841 return SDB_NOT_CONNECTED ;
2843 return pReplicaGroup->
getNodeNum ( status, num ) ;
2852 INT32 getDetail ( bson::BSONObj &result )
2854 if ( !pReplicaGroup )
2856 return SDB_NOT_CONNECTED ;
2858 return pReplicaGroup->getDetail ( result ) ;
2867 INT32 getMaster ( _sdbNode **node )
2869 if ( !pReplicaGroup )
2871 return SDB_NOT_CONNECTED ;
2873 return pReplicaGroup->getMaster ( node ) ;
2884 if ( !pReplicaGroup )
2886 return SDB_NOT_CONNECTED ;
2889 return pReplicaGroup->getMaster ( node ) ;
2900 INT32 getSlave ( _sdbNode **node,
2901 const vector<INT32>& positions = _sdbStaticVec )
2903 if ( !pReplicaGroup )
2905 return SDB_NOT_CONNECTED ;
2907 return pReplicaGroup->getSlave ( node, positions ) ;
2919 const vector<INT32>& positions = _sdbStaticVec )
2921 if ( !pReplicaGroup )
2923 return SDB_NOT_CONNECTED ;
2926 return pReplicaGroup->getSlave ( node, positions ) ;
2937 INT32 getNode (
const CHAR *pNodeName,
2940 if ( !pReplicaGroup )
2942 return SDB_NOT_CONNECTED ;
2944 return pReplicaGroup->getNode ( pNodeName, node ) ;
2955 INT32 getNode (
const CHAR *pNodeName,
2958 if ( !pReplicaGroup )
2960 return SDB_NOT_CONNECTED ;
2963 return pReplicaGroup->getNode ( pNodeName, node ) ;
2966 INT32 getNode (
const CHAR *pHostName,
2967 const CHAR *pServiceName,
2970 if ( !pReplicaGroup )
2972 return SDB_NOT_CONNECTED ;
2974 return pReplicaGroup->getNode ( pHostName, pServiceName, node ) ;
2987 INT32 getNode (
const CHAR *pHostName,
2988 const CHAR *pServiceName,
2991 if ( !pReplicaGroup )
2993 return SDB_NOT_CONNECTED ;
2996 return pReplicaGroup->getNode ( pHostName, pServiceName, node ) ;
3012 INT32 createNode (
const CHAR *pHostName,
3013 const CHAR *pServiceName,
3014 const CHAR *pDatabasePath,
3015 std::map<std::string,std::string> &config )
3017 if ( !pReplicaGroup )
3019 return SDB_NOT_CONNECTED ;
3021 return pReplicaGroup->createNode ( pHostName, pServiceName,
3022 pDatabasePath, config ) ;
3037 INT32 createNode (
const CHAR *pHostName,
3038 const CHAR *pServiceName,
3039 const CHAR *pDatabasePath,
3040 const bson::BSONObj &options = _sdbStaticObject )
3042 if ( !pReplicaGroup )
3044 return SDB_NOT_CONNECTED ;
3046 return pReplicaGroup->createNode ( pHostName, pServiceName,
3047 pDatabasePath, options ) ;
3060 INT32 removeNode (
const CHAR *pHostName,
3061 const CHAR *pServiceName,
3062 const bson::BSONObj &configure = _sdbStaticObject )
3064 if ( !pReplicaGroup )
3066 return SDB_NOT_CONNECTED ;
3068 return pReplicaGroup->removeNode ( pHostName, pServiceName,
3078 if ( !pReplicaGroup )
3080 return SDB_NOT_CONNECTED ;
3082 return pReplicaGroup->stop () ;
3092 if ( !pReplicaGroup )
3094 return SDB_NOT_CONNECTED ;
3096 return pReplicaGroup->start () ;
3103 const CHAR *getName ()
3105 if ( !pReplicaGroup )
3109 return pReplicaGroup->getName() ;
3117 BOOLEAN isCatalog ()
3119 if ( !pReplicaGroup )
3123 return pReplicaGroup->isCatalog() ;
3140 INT32 attachNode(
const CHAR *pHostName,
3141 const CHAR *pSvcName,
3142 const bson::BSONObj &options )
3144 if ( !pReplicaGroup )
3146 return SDB_NOT_CONNECTED ;
3148 return pReplicaGroup->attachNode( pHostName, pSvcName, options ) ;
3166 INT32 detachNode(
const CHAR *pHostName,
3167 const CHAR *pSvcName,
3168 const bson::BSONObj &options )
3170 if ( !pReplicaGroup )
3172 return SDB_NOT_CONNECTED ;
3174 return pReplicaGroup->detachNode( pHostName, pSvcName, options ) ;
3185 INT32 reelect(
const bson::BSONObj &options = _sdbStaticObject )
3187 if( !pReplicaGroup )
3189 return SDB_NOT_CONNECTED ;
3191 return pReplicaGroup->reelect( options ) ;
3195 class DLLEXPORT _sdbCollectionSpace
3198 _sdbCollectionSpace (
const _sdbCollectionSpace& other ) ;
3199 _sdbCollectionSpace& operator=(
const _sdbCollectionSpace& ) ;
3201 _sdbCollectionSpace () {}
3202 virtual ~_sdbCollectionSpace () {}
3204 virtual INT32 getCollection (
const CHAR *pCollectionName,
3205 _sdbCollection **collection,
3206 BOOLEAN checkExist = TRUE ) = 0 ;
3208 virtual INT32 getCollection (
const CHAR *pCollectionName,
3209 sdbCollection &collection,
3210 BOOLEAN checkExist = TRUE ) = 0 ;
3213 virtual INT32 createCollection (
const CHAR *pCollection,
3214 const bson::BSONObj &options,
3215 _sdbCollection **collection ) = 0 ;
3217 virtual INT32 createCollection (
const CHAR *pCollection,
3218 const bson::BSONObj &options,
3219 sdbCollection &collection ) = 0 ;
3222 virtual INT32 createCollection (
const CHAR *pCollection,
3223 _sdbCollection **collection ) = 0 ;
3225 virtual INT32 createCollection (
const CHAR *pCollection,
3226 sdbCollection &collection ) = 0 ;
3229 virtual INT32 dropCollection (
const CHAR *pCollection ) = 0 ;
3232 virtual INT32 create () = 0 ;
3234 virtual INT32 drop () = 0 ;
3237 virtual const CHAR *getCSName () = 0 ;
3240 virtual INT32 renameCollection(
const CHAR* oldName,
const CHAR* newName,
3241 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
3243 virtual INT32 alterCollectionSpace (
const bson::BSONObj & options ) = 0 ;
3245 virtual INT32 setDomain (
const bson::BSONObj & options ) = 0 ;
3247 virtual INT32 removeDomain () = 0 ;
3249 virtual INT32 enableCapped () = 0 ;
3251 virtual INT32 disableCapped () = 0 ;
3253 virtual INT32 setAttributes (
const bson::BSONObj & options ) = 0 ;
3287 pCollectionSpace = NULL ;
3295 if ( pCollectionSpace )
3297 delete pCollectionSpace ;
3301 INT32 getCollection (
const CHAR *pCollectionName,
3302 _sdbCollection **collection,
3303 BOOLEAN checkExist = TRUE )
3305 if ( !pCollectionSpace )
3307 return SDB_NOT_CONNECTED ;
3309 return pCollectionSpace->getCollection ( pCollectionName,
3310 collection, checkExist ) ;
3323 INT32 getCollection (
const CHAR *pCollectionName,
3325 BOOLEAN checkExist = TRUE )
3327 if ( !pCollectionSpace )
3329 return SDB_NOT_CONNECTED ;
3332 return pCollectionSpace->getCollection ( pCollectionName,
3337 INT32 createCollection (
const CHAR *pCollection,
3338 const bson::BSONObj &options,
3339 _sdbCollection **collection )
3341 if ( !pCollectionSpace )
3343 return SDB_NOT_CONNECTED ;
3345 return pCollectionSpace->createCollection ( pCollection,
3362 INT32 createCollection (
const CHAR *pCollection,
3363 const bson::BSONObj &options,
3366 if ( !pCollectionSpace )
3368 return SDB_NOT_CONNECTED ;
3371 return pCollectionSpace->createCollection ( pCollection,
3376 INT32 createCollection (
const CHAR *pCollection,
3377 _sdbCollection **collection )
3379 if ( !pCollectionSpace )
3381 return SDB_NOT_CONNECTED ;
3383 return pCollectionSpace->createCollection ( pCollection,
3396 INT32 createCollection (
const CHAR *pCollection,
3399 if ( !pCollectionSpace )
3401 return SDB_NOT_CONNECTED ;
3404 return pCollectionSpace->createCollection ( pCollection,
3414 INT32 dropCollection (
const CHAR *pCollection )
3416 if ( !pCollectionSpace )
3418 return SDB_NOT_CONNECTED ;
3420 return pCollectionSpace->dropCollection ( pCollection ) ;
3431 if ( !pCollectionSpace )
3433 return SDB_NOT_CONNECTED ;
3435 return pCollectionSpace->create () ;
3446 if ( !pCollectionSpace )
3448 return SDB_NOT_CONNECTED ;
3450 return pCollectionSpace->drop () ;
3457 const CHAR *getCSName ()
3459 if ( !pCollectionSpace )
3463 return pCollectionSpace->getCSName () ;
3476 INT32 renameCollection(
const CHAR* oldName,
const CHAR* newName,
3477 const bson::BSONObj &options = _sdbStaticObject )
3479 if( !pCollectionSpace )
3481 return SDB_NOT_CONNECTED ;
3483 return pCollectionSpace->renameCollection( oldName, newName, options ) ;
3497 INT32 alterCollectionSpace (
const bson::BSONObj & options )
3499 if ( NULL == pCollectionSpace )
3501 return SDB_NOT_CONNECTED ;
3503 return pCollectionSpace->alterCollectionSpace( options ) ;
3515 INT32 setDomain (
const bson::BSONObj & options )
3517 if ( NULL == pCollectionSpace )
3519 return SDB_NOT_CONNECTED ;
3521 return pCollectionSpace->setDomain( options ) ;
3529 INT32 removeDomain ()
3531 if ( NULL == pCollectionSpace )
3533 return SDB_NOT_CONNECTED ;
3535 return pCollectionSpace->removeDomain() ;
3543 INT32 enableCapped ()
3545 if ( NULL == pCollectionSpace )
3547 return SDB_NOT_CONNECTED ;
3549 return pCollectionSpace->enableCapped() ;
3557 INT32 disableCapped ()
3559 if ( NULL == pCollectionSpace )
3561 return SDB_NOT_CONNECTED ;
3563 return pCollectionSpace->disableCapped() ;
3577 INT32 setAttributes (
const bson::BSONObj & options )
3579 if ( NULL == pCollectionSpace )
3581 return SDB_NOT_CONNECTED ;
3583 return pCollectionSpace->setAttributes( options ) ;
3587 class DLLEXPORT _sdbDomain
3590 _sdbDomain (
const _sdbDomain& other ) ;
3591 _sdbDomain& operator= (
const _sdbDomain& ) ;
3594 virtual ~_sdbDomain () {}
3596 virtual const CHAR* getName () = 0 ;
3598 virtual INT32 alterDomain (
const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
3600 virtual INT32 listCollectionSpacesInDomain ( _sdbCursor **cursor ) = 0 ;
3602 virtual INT32 listCollectionSpacesInDomain ( sdbCursor &cursor ) = 0 ;
3604 virtual INT32 listCollectionsInDomain ( _sdbCursor **cursor ) = 0 ;
3606 virtual INT32 listCollectionsInDomain ( sdbCursor &cursor ) = 0 ;
3608 virtual INT32 listReplicaGroupInDomain( _sdbCursor **cursor ) = 0 ;
3610 virtual INT32 listReplicaGroupInDomain( sdbCursor &cursor ) = 0 ;
3612 virtual INT32 addGroups (
const bson::BSONObj & options ) = 0 ;
3614 virtual INT32 setGroups (
const bson::BSONObj & options ) = 0 ;
3616 virtual INT32 removeGroups (
const bson::BSONObj & options ) = 0 ;
3618 virtual INT32 setAttributes (
const bson::BSONObj & options ) = 0 ;
3659 const CHAR *getName ()
3685 INT32 alterDomain (
const bson::BSONObj &options )
3689 return SDB_NOT_CONNECTED ;
3691 return pDomain->alterDomain ( options ) ;
3704 INT32 addGroups (
const bson::BSONObj & options )
3706 if ( NULL == pDomain )
3708 return SDB_NOT_CONNECTED ;
3710 return pDomain->addGroups( options ) ;
3725 INT32 setGroups (
const bson::BSONObj & options )
3727 if ( NULL == pDomain )
3729 return SDB_NOT_CONNECTED ;
3731 return pDomain->setGroups( options ) ;
3745 INT32 removeGroups (
const bson::BSONObj & options )
3747 if ( NULL == pDomain )
3749 return SDB_NOT_CONNECTED ;
3751 return pDomain->removeGroups( options ) ;
3771 INT32 setAttributes (
const bson::BSONObj &options )
3775 return SDB_NOT_CONNECTED ;
3777 return pDomain->setAttributes( options ) ;
3791 return SDB_NOT_CONNECTED ;
3794 return pDomain->listCollectionSpacesInDomain ( cursor ) ;
3797 INT32 listCollectionSpacesInDomain ( _sdbCursor **cursor )
3801 return SDB_NOT_CONNECTED ;
3803 return pDomain->listCollectionSpacesInDomain ( cursor ) ;
3817 return SDB_NOT_CONNECTED ;
3820 return pDomain->listCollectionsInDomain ( cursor ) ;
3830 INT32 listCollectionsInDomain ( _sdbCursor **cursor )
3834 return SDB_NOT_CONNECTED ;
3836 return pDomain->listCollectionsInDomain ( cursor ) ;
3839 INT32 listReplicaGroupInDomain( _sdbCursor **cursor )
3843 return SDB_NOT_CONNECTED ;
3845 return pDomain->listReplicaGroupInDomain( cursor ) ;
3858 return SDB_NOT_CONNECTED ;
3861 return pDomain->listReplicaGroupInDomain( cursor ) ;
3865 class DLLEXPORT _sdbDataCenter
3868 _sdbDataCenter (
const _sdbDataCenter& other ) ;
3869 _sdbDataCenter& operator= (
const _sdbDataCenter& ) ;
3872 _sdbDataCenter () {}
3873 virtual ~_sdbDataCenter () {}
3876 virtual const CHAR *getName () = 0 ;
3877 virtual INT32 getDetail( bson::BSONObj &retInfo ) = 0 ;
3878 virtual INT32 activateDC() = 0 ;
3879 virtual INT32 deactivateDC() = 0 ;
3880 virtual INT32 enableReadOnly( BOOLEAN isReadOnly ) = 0 ;
3881 virtual INT32 createImage(
const CHAR *pCataAddrList ) = 0 ;
3882 virtual INT32 removeImage() = 0 ;
3883 virtual INT32 enableImage() = 0 ;
3884 virtual INT32 disableImage() = 0 ;
3885 virtual INT32 attachGroups(
const bson::BSONObj &info ) = 0 ;
3886 virtual INT32 detachGroups(
const bson::BSONObj &info ) = 0 ;
3893 class DLLEXPORT sdbDataCenter
3896 sdbDataCenter (
const sdbDataCenter& ) ;
3897 sdbDataCenter& operator= (
const sdbDataCenter& ) ;
3907 _sdbDataCenter *pDC ;
3912 sdbDataCenter() { pDC = NULL ; }
3931 const CHAR *getName ()
3937 return pDC->getName() ;
3946 INT32 getDetail( bson::BSONObj &retInfo )
3950 return SDB_NOT_CONNECTED ;
3952 return pDC->getDetail( retInfo ) ;
3964 return SDB_NOT_CONNECTED ;
3966 return pDC->activateDC() ;
3974 INT32 deactivateDC()
3978 return SDB_NOT_CONNECTED ;
3980 return pDC->deactivateDC() ;
3989 INT32 enableReadOnly( BOOLEAN isReadOnly )
3993 return SDB_NOT_CONNECTED ;
3995 return pDC->enableReadOnly( isReadOnly ) ;
4005 INT32 createImage(
const CHAR *pCataAddrList )
4009 return SDB_NOT_CONNECTED ;
4011 return pDC->createImage( pCataAddrList ) ;
4023 return SDB_NOT_CONNECTED ;
4025 return pDC->removeImage() ;
4037 return SDB_NOT_CONNECTED ;
4039 return pDC->enableImage() ;
4047 INT32 disableImage()
4051 return SDB_NOT_CONNECTED ;
4053 return pDC->disableImage() ;
4062 INT32 attachGroups(
const bson::BSONObj &info )
4066 return SDB_NOT_CONNECTED ;
4068 return pDC->attachGroups( info ) ;
4077 INT32 detachGroups(
const bson::BSONObj &info )
4081 return SDB_NOT_CONNECTED ;
4083 return pDC->detachGroups( info ) ;
4088 class DLLEXPORT _sdbLob
4091 _sdbLob (
const _sdbLob& other ) ;
4092 _sdbLob& operator= (
const _sdbLob& ) ;
4097 virtual ~_sdbLob () {}
4099 virtual INT32 close () = 0 ;
4101 virtual INT32 read ( UINT32 len, CHAR *buf, UINT32 *read ) = 0 ;
4103 virtual INT32 write (
const CHAR *buf, UINT32 len ) = 0 ;
4105 virtual INT32 seek ( SINT64 size,
SDB_LOB_SEEK whence ) = 0 ;
4107 virtual INT32 lock( INT64 offset, INT64 length ) = 0 ;
4109 virtual INT32 lockAndSeek( INT64 offset, INT64 length ) = 0 ;
4111 virtual INT32 isClosed( BOOLEAN &flag ) = 0 ;
4113 virtual INT32 getOid( bson::OID &oid ) = 0 ;
4115 virtual INT32 getSize( SINT64 *size ) = 0 ;
4117 virtual INT32 getCreateTime ( UINT64 *millis ) = 0 ;
4119 virtual BOOLEAN isClosed() = 0 ;
4121 virtual bson::OID getOid() = 0 ;
4123 virtual SINT64 getSize() = 0 ;
4125 virtual UINT64 getCreateTime () = 0 ;
4127 virtual UINT64 getModificationTime() = 0 ;
4129 virtual INT32 getPiecesInfoNum() = 0 ;
4131 virtual bson::BSONArray getPiecesInfo() = 0 ;
4133 virtual BOOLEAN isEof() = 0 ;
4135 virtual INT32 getRunTimeDetail( bson::BSONObj &detail ) = 0 ;
4184 return pLob->
close() ;
4195 INT32 read ( UINT32 len, CHAR *buf, UINT32 *read )
4199 return SDB_NOT_CONNECTED ;
4201 return pLob->read( len, buf, read ) ;
4211 INT32 write (
const CHAR *buf, UINT32 len )
4215 return SDB_NOT_CONNECTED ;
4217 return pLob->write( buf, len ) ;
4231 return SDB_NOT_CONNECTED ;
4233 return pLob->seek( size, whence ) ;
4243 INT32 lock ( INT64 offset, INT64 length )
4247 return SDB_NOT_CONNECTED ;
4249 return pLob->lock( offset, length ) ;
4259 INT32 lockAndSeek ( INT64 offset, INT64 length )
4263 return SDB_NOT_CONNECTED ;
4265 return pLob->lockAndSeek( offset, length ) ;
4275 INT32 isClosed( BOOLEAN &flag )
4279 return SDB_NOT_CONNECTED ;
4281 return pLob->isClosed ( flag ) ;
4294 return pLob->isClosed () ;
4304 INT32 getOid ( bson::OID &oid )
4308 return SDB_NOT_CONNECTED ;
4310 return pLob->getOid( oid ) ;
4323 return pLob->getOid() ;
4333 INT32 getSize ( SINT64 *size )
4337 return SDB_NOT_CONNECTED ;
4339 return pLob->getSize( size ) ;
4352 return pLob->getSize();
4362 INT32 getCreateTime ( UINT64 *millis )
4366 return SDB_NOT_CONNECTED ;
4368 return pLob->getCreateTime( millis ) ;
4375 UINT64 getCreateTime ()
4381 return pLob->getCreateTime() ;
4388 UINT64 getModificationTime ()
4394 return pLob->getModificationTime() ;
4401 INT32 getPiecesInfoNum()
4407 return pLob->getPiecesInfoNum() ;
4414 bson::BSONArray getPiecesInfo()
4418 return bson::BSONArray() ;
4420 return pLob->getPiecesInfo() ;
4433 return pLob->isEof() ;
4441 INT32 getRunTimeDetail( bson::BSONObj &detail )
4447 return pLob->getRunTimeDetail( detail ) ;
4452 class DLLEXPORT _sdbSequence
4455 _sdbSequence (
const _sdbSequence& other ) ;
4456 _sdbSequence& operator=(
const _sdbSequence& ) ;
4459 virtual ~_sdbSequence () {}
4461 virtual INT32 setAttributes (
const bson::BSONObj &options ) = 0 ;
4463 virtual INT32 getNextValue ( INT64 &value ) = 0 ;
4465 virtual INT32 getCurrentValue ( INT64 &value ) = 0 ;
4467 virtual INT32 setCurrentValue (
const INT64 value ) = 0 ;
4469 virtual INT32 fetch(
const INT32 fetchNum,
4472 INT32 &Increment ) = 0 ;
4474 virtual INT32 restart(
const INT64 startValue ) = 0 ;
4539 INT32 setAttributes (
const bson::BSONObj & options )
4541 if ( NULL == pSequence )
4543 return SDB_NOT_CONNECTED ;
4554 INT32 getNextValue( INT64 &value )
4556 if ( NULL == pSequence )
4558 return SDB_NOT_CONNECTED ;
4560 return pSequence->getNextValue( value ) ;
4569 INT32 getCurrentValue( INT64 &value )
4571 if ( NULL == pSequence )
4573 return SDB_NOT_CONNECTED ;
4575 return pSequence->getCurrentValue( value ) ;
4584 INT32 setCurrentValue(
const INT64 value )
4586 if ( NULL == pSequence )
4588 return SDB_NOT_CONNECTED ;
4590 return pSequence->setCurrentValue( value ) ;
4603 INT32 fetch(
const INT32 fetchNum, INT64 &nextValue,
4604 INT32 &returnNum, INT32 &increment )
4606 if ( NULL == pSequence )
4608 return SDB_NOT_CONNECTED ;
4610 return pSequence->fetch( fetchNum, nextValue, returnNum, increment ) ;
4619 INT32 restart(
const INT64 startValue )
4621 if ( NULL == pSequence )
4623 return SDB_NOT_CONNECTED ;
4625 return pSequence->restart( startValue ) ;
4629 class DLLEXPORT _sdb
4632 _sdb (
const _sdb& other ) ;
4633 _sdb& operator=(
const _sdb& ) ;
4637 virtual INT32 connect (
const CHAR *pHostName,
4640 virtual INT32 connect (
const CHAR *pHostName,
4642 const CHAR *pUsrName,
4643 const CHAR *pPasswd ) = 0 ;
4644 virtual INT32 connect (
const CHAR *pHostName,
4645 const CHAR *pServiceName ) = 0 ;
4646 virtual INT32 connect (
const CHAR *pHostName,
4647 const CHAR *pServiceName,
4648 const CHAR *pUsrName,
4649 const CHAR *pPasswd ) = 0 ;
4650 virtual INT32 connect (
const CHAR **pConnAddrs,
4652 const CHAR *pUsrName,
4653 const CHAR *pPasswd ) = 0 ;
4654 virtual INT32 connect (
const CHAR **pConnAddrs,
4656 const CHAR *pUsrName,
4658 const CHAR *pCipherFile ) = 0 ;
4660 virtual void disconnect () = 0 ;
4662 virtual UINT64 getDbStartTime() = 0 ;
4664 virtual void getVersion( UINT8 &version, UINT8 &subVersion,
4665 UINT8 &fixVersion ) = 0 ;
4667 virtual INT32 createUsr(
const CHAR *pUsrName,
4668 const CHAR *pPasswd,
4669 const bson::BSONObj &options = _sdbStaticObject
4672 virtual INT32 removeUsr(
const CHAR *pUsrName,
4673 const CHAR *pPasswd ) = 0 ;
4675 virtual INT32 alterUsr(
const CHAR *pUsrName,
4676 const CHAR *pAction,
4677 const bson::BSONObj &options ) = 0 ;
4679 virtual INT32 changeUsrPasswd(
const CHAR *pUsrName,
4680 const CHAR *pOldPasswd,
4681 const CHAR *pNewPasswd ) = 0 ;
4683 virtual INT32 getSnapshot ( _sdbCursor **cursor,
4685 const bson::BSONObj &condition = _sdbStaticObject,
4686 const bson::BSONObj &selector = _sdbStaticObject,
4687 const bson::BSONObj &orderBy = _sdbStaticObject,
4688 const bson::BSONObj &hint = _sdbStaticObject,
4689 INT64 numToSkip = 0,
4690 INT64 numToReturn = -1
4693 virtual INT32 getSnapshot ( sdbCursor &cursor,
4695 const bson::BSONObj &condition = _sdbStaticObject,
4696 const bson::BSONObj &selector = _sdbStaticObject,
4697 const bson::BSONObj &orderBy = _sdbStaticObject,
4698 const bson::BSONObj &hint = _sdbStaticObject,
4699 INT64 numToSkip = 0,
4700 INT64 numToReturn = -1
4703 virtual INT32 resetSnapshot (
const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4705 virtual INT32 getList ( _sdbCursor **cursor,
4707 const bson::BSONObj &condition = _sdbStaticObject,
4708 const bson::BSONObj &selector = _sdbStaticObject,
4709 const bson::BSONObj &orderBy = _sdbStaticObject,
4710 const bson::BSONObj &hint = _sdbStaticObject,
4711 INT64 numToSkip = 0,
4712 INT64 numToReturn = -1
4714 virtual INT32 getList ( sdbCursor &cursor,
4716 const bson::BSONObj &condition = _sdbStaticObject,
4717 const bson::BSONObj &selector = _sdbStaticObject,
4718 const bson::BSONObj &orderBy = _sdbStaticObject,
4719 const bson::BSONObj &hint = _sdbStaticObject,
4720 INT64 numToSkip = 0,
4721 INT64 numToReturn = -1
4724 virtual INT32 getCollection (
const CHAR *pCollectionFullName,
4725 _sdbCollection **collection,
4726 BOOLEAN checkExist = TRUE
4729 virtual INT32 getCollection (
const CHAR *pCollectionFullName,
4730 sdbCollection &collection,
4731 BOOLEAN checkExist = TRUE
4734 virtual INT32 getCollectionSpace (
const CHAR *pCollectionSpaceName,
4735 _sdbCollectionSpace **cs,
4736 BOOLEAN checkExist = TRUE
4739 virtual INT32 getCollectionSpace (
const CHAR *pCollectionSpaceName,
4740 sdbCollectionSpace &cs,
4741 BOOLEAN checkExist = TRUE
4744 virtual INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
4746 _sdbCollectionSpace **cs
4749 virtual INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
4751 sdbCollectionSpace &cs
4754 virtual INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
4755 const bson::BSONObj &options,
4756 _sdbCollectionSpace **cs
4759 virtual INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
4760 const bson::BSONObj &options,
4761 sdbCollectionSpace &cs
4764 virtual INT32 dropCollectionSpace (
4765 const CHAR *pCollectionSpaceName,
4766 const bson::BSONObj &options = _sdbStaticObject
4769 virtual INT32 listCollectionSpaces ( _sdbCursor **result ) = 0 ;
4771 virtual INT32 listCollectionSpaces ( sdbCursor &result ) = 0 ;
4774 virtual INT32 listCollections ( _sdbCursor **result ) = 0 ;
4776 virtual INT32 listCollections ( sdbCursor &result ) = 0 ;
4779 virtual INT32 listReplicaGroups ( _sdbCursor **result ) = 0 ;
4781 virtual INT32 listReplicaGroups ( sdbCursor &result ) = 0 ;
4783 virtual INT32 getReplicaGroup (
const CHAR *pName,
4784 _sdbReplicaGroup **result ) = 0 ;
4786 virtual INT32 getReplicaGroup (
const CHAR *pName,
4787 sdbReplicaGroup &result ) = 0 ;
4789 virtual INT32 getReplicaGroup ( INT32
id,
4790 _sdbReplicaGroup **result ) = 0 ;
4792 virtual INT32 getReplicaGroup ( INT32
id,
4793 sdbReplicaGroup &result ) = 0 ;
4795 virtual INT32 createReplicaGroup (
const CHAR *pName,
4796 _sdbReplicaGroup **replicaGroup ) = 0 ;
4798 virtual INT32 createReplicaGroup (
const CHAR *pName,
4799 sdbReplicaGroup &replicaGroup ) = 0 ;
4801 virtual INT32 removeReplicaGroup (
const CHAR *pName ) = 0 ;
4803 virtual INT32 createReplicaCataGroup (
const CHAR *pHostName,
4804 const CHAR *pServiceName,
4805 const CHAR *pDatabasePath,
4806 const bson::BSONObj &configure ) =0 ;
4808 virtual INT32 activateReplicaGroup (
const CHAR *pName,
4809 _sdbReplicaGroup **replicaGroup ) = 0 ;
4810 virtual INT32 activateReplicaGroup (
const CHAR *pName,
4811 sdbReplicaGroup &replicaGroup ) = 0 ;
4813 virtual INT32 execUpdate(
const CHAR *sql,
4814 bson::BSONObj *pResult = NULL ) = 0 ;
4816 virtual INT32 exec(
const CHAR *sql,
4817 _sdbCursor **result ) = 0 ;
4819 virtual INT32 exec(
const CHAR *sql,
4820 sdbCursor &result ) = 0 ;
4822 virtual INT32 transactionBegin() = 0 ;
4824 virtual INT32 transactionCommit(
const bson::BSONObj &hint = _sdbStaticObject ) = 0 ;
4826 virtual INT32 transactionRollback() = 0 ;
4828 virtual INT32 flushConfigure(
const bson::BSONObj &options ) = 0 ;
4830 virtual INT32 crtJSProcedure (
const CHAR *code ) = 0 ;
4831 virtual INT32 rmProcedure(
const CHAR *spName ) = 0 ;
4832 virtual INT32 listProcedures( _sdbCursor **cursor,
const bson::BSONObj &condition ) = 0 ;
4833 virtual INT32 listProcedures( sdbCursor &cursor,
const bson::BSONObj &condition ) = 0 ;
4834 virtual INT32 evalJS(
const CHAR *code,
4836 _sdbCursor **cursor,
4837 bson::BSONObj &errmsg ) = 0 ;
4838 virtual INT32 evalJS(
const CHAR *code,
4841 bson::BSONObj &errmsg ) = 0 ;
4844 virtual INT32 backup (
const bson::BSONObj &options) = 0 ;
4845 virtual INT32 listBackup ( _sdbCursor **cursor,
4846 const bson::BSONObj &options,
4847 const bson::BSONObj &condition = _sdbStaticObject,
4848 const bson::BSONObj &selector = _sdbStaticObject,
4849 const bson::BSONObj &orderBy = _sdbStaticObject) = 0 ;
4850 virtual INT32 listBackup ( sdbCursor &cursor,
4851 const bson::BSONObj &options,
4852 const bson::BSONObj &condition = _sdbStaticObject,
4853 const bson::BSONObj &selector = _sdbStaticObject,
4854 const bson::BSONObj &orderBy = _sdbStaticObject) = 0 ;
4855 virtual INT32 removeBackup (
const bson::BSONObj &options ) = 0 ;
4858 virtual INT32 listTasks ( _sdbCursor **cursor,
4859 const bson::BSONObj &condition = _sdbStaticObject,
4860 const bson::BSONObj &selector = _sdbStaticObject,
4861 const bson::BSONObj &orderBy = _sdbStaticObject,
4862 const bson::BSONObj &hint = _sdbStaticObject) = 0 ;
4865 virtual INT32 listTasks ( sdbCursor &cursor,
4866 const bson::BSONObj &condition = _sdbStaticObject,
4867 const bson::BSONObj &selector = _sdbStaticObject,
4868 const bson::BSONObj &orderBy = _sdbStaticObject,
4869 const bson::BSONObj &hint = _sdbStaticObject) = 0 ;
4871 virtual INT32 waitTasks (
const SINT64 *taskIDs,
4874 virtual INT32 cancelTask ( SINT64 taskID,
4875 BOOLEAN isAsync ) = 0 ;
4877 virtual INT32 setSessionAttr (
const bson::BSONObj &options =
4878 _sdbStaticObject ) = 0 ;
4880 virtual INT32 getSessionAttr ( bson::BSONObj &result,
4881 BOOLEAN useCache = TRUE ) = 0 ;
4884 virtual INT32 closeAllCursors () = 0 ;
4887 virtual INT32 interrupt() = 0 ;
4888 virtual INT32 interruptOperation() = 0 ;
4891 virtual INT32 isValid( BOOLEAN *result ) = 0 ;
4892 virtual BOOLEAN isValid() = 0 ;
4894 virtual BOOLEAN isClosed() = 0 ;
4897 virtual INT32 createDomain (
const CHAR *pDomainName,
4898 const bson::BSONObj &options,
4899 _sdbDomain **domain ) = 0 ;
4901 virtual INT32 createDomain (
const CHAR *pDomainName,
4902 const bson::BSONObj &options,
4903 sdbDomain &domain ) = 0 ;
4905 virtual INT32 dropDomain (
const CHAR *pDomainName ) = 0 ;
4907 virtual INT32 getDomain (
const CHAR *pDomainName,
4908 _sdbDomain **domain ) = 0 ;
4910 virtual INT32 getDomain (
const CHAR *pDomainName,
4911 sdbDomain &domain ) = 0 ;
4913 virtual INT32 listDomains ( _sdbCursor **cursor,
4914 const bson::BSONObj &condition = _sdbStaticObject,
4915 const bson::BSONObj &selector = _sdbStaticObject,
4916 const bson::BSONObj &orderBy = _sdbStaticObject,
4917 const bson::BSONObj &hint = _sdbStaticObject
4920 virtual INT32 listDomains ( sdbCursor &cursor,
4921 const bson::BSONObj &condition = _sdbStaticObject,
4922 const bson::BSONObj &selector = _sdbStaticObject,
4923 const bson::BSONObj &orderBy = _sdbStaticObject,
4924 const bson::BSONObj &hint = _sdbStaticObject
4926 virtual INT32 getDC( _sdbDataCenter **dc ) = 0 ;
4927 virtual INT32 getDC( sdbDataCenter &dc ) = 0 ;
4929 static _sdb *getObj ( BOOLEAN useSSL = FALSE ) ;
4932 virtual UINT64 getLastAliveTime()
const = 0 ;
4934 virtual INT32 syncDB(
4935 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4937 virtual INT32 analyze(
4938 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4940 virtual INT32 forceSession(
4942 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4944 virtual INT32 forceStepUp(
4945 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4947 virtual INT32 invalidateCache(
4948 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4950 virtual INT32 reloadConfig(
4951 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4953 virtual INT32 updateConfig (
const bson::BSONObj &configs = _sdbStaticObject,
4954 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4956 virtual INT32 deleteConfig (
const bson::BSONObj &configs = _sdbStaticObject,
4957 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4959 virtual INT32 setPDLevel( INT32 level,
4960 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4962 virtual INT32 msg(
const CHAR* msg ) = 0 ;
4964 virtual INT32 loadCS(
const CHAR* csName,
4965 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4967 virtual INT32 unloadCS(
const CHAR* csName,
4968 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4970 virtual INT32 traceStart( UINT32 traceBufferSize,
4971 const CHAR* component = NULL,
4972 const CHAR* breakpoint = NULL,
4973 const vector<UINT32> &tidVec = _sdbStaticUINT32Vec ) = 0 ;
4975 virtual INT32 traceStart( UINT32 traceBufferSize,
4976 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4978 virtual INT32 traceStop(
const CHAR* dumpFileName ) = 0 ;
4980 virtual INT32 traceResume() = 0 ;
4982 virtual INT32 traceStatus( _sdbCursor** cursor ) = 0 ;
4984 virtual INT32 traceStatus( sdbCursor& cursor ) = 0 ;
4987 virtual INT32 renameCollectionSpace(
const CHAR* oldName,
4988 const CHAR* newName,
4989 const bson::BSONObj &options = _sdbStaticObject ) = 0 ;
4991 virtual INT32 getLastErrorObj( bson::BSONObj &result ) = 0 ;
4992 virtual void cleanLastErrorObj() = 0 ;
4994 virtual INT32 getLastResultObj( bson::BSONObj &result,
4995 BOOLEAN getOwned = FALSE )
const = 0 ;
4998 virtual INT32 createSequence(
const CHAR *pSequenceName,
4999 const bson::BSONObj &options,
5000 _sdbSequence **sequence ) = 0 ;
5002 virtual INT32 createSequence(
const CHAR *pSequenceName,
5003 const bson::BSONObj &options,
5004 sdbSequence &sequence ) = 0 ;
5006 virtual INT32 createSequence(
const CHAR *pSequenceName,
5007 sdbSequence &sequence ) = 0 ;
5010 virtual INT32 getSequence(
const CHAR *pSequenceName,
5011 _sdbSequence **sequence ) = 0 ;
5013 virtual INT32 getSequence(
const CHAR *pSequenceName,
5014 sdbSequence &sequence ) = 0 ;
5016 virtual INT32 renameSequence(
const CHAR *pOldName,
5017 const CHAR *pNewName ) = 0 ;
5019 virtual INT32 dropSequence(
const CHAR *pSequenceName ) = 0 ;
5023 typedef class _sdb _sdb ;
5030 sdb (
const sdb& other ) ;
5031 sdb& operator=(
const sdb& ) ;
5045 sdb ( BOOLEAN useSSL = FALSE ) :
5046 pSDB ( _sdb::getObj( useSSL ) )
5070 INT32 connect (
const CHAR *pHostName,
5076 return SDB_NOT_CONNECTED ;
5078 return pSDB->
connect ( pHostName, port ) ;
5094 INT32 connect (
const CHAR *pHostName,
5096 const CHAR *pUsrName,
5102 return SDB_NOT_CONNECTED ;
5104 return pSDB->connect ( pHostName, port,
5105 pUsrName, pPasswd ) ;
5117 INT32 connect (
const CHAR *pHostName,
5118 const CHAR *pServiceName
5123 return SDB_NOT_CONNECTED ;
5125 return pSDB->connect ( pHostName, pServiceName ) ;
5141 INT32 connect (
const CHAR *pHostName,
5142 const CHAR *pServiceName,
5143 const CHAR *pUsrName,
5144 const CHAR *pPasswd )
5148 return SDB_NOT_CONNECTED ;
5150 return pSDB->connect ( pHostName, pServiceName,
5151 pUsrName, pPasswd ) ;
5167 INT32 connect (
const CHAR **pConnAddrs,
5169 const CHAR *pUsrName,
5170 const CHAR *pPasswd )
5174 return SDB_NOT_CONNECTED ;
5176 return pSDB->connect ( pConnAddrs, arrSize,
5177 pUsrName, pPasswd ) ;
5195 INT32 connect (
const CHAR **pConnAddrs,
5197 const CHAR *pUsrName,
5199 const CHAR *pCipherFile )
5203 return SDB_NOT_CONNECTED ;
5205 return pSDB->connect ( pConnAddrs, arrSize,
5206 pUsrName, pToken, pCipherFile ) ;
5213 UINT64 getDbStartTime ()
5219 return pSDB->getDbStartTime() ;
5231 void getVersion ( UINT8 &version, UINT8 &subVersion, UINT8 &fixVersion )
5237 pSDB->getVersion( version, subVersion, fixVersion ) ;
5262 INT32 createUsr(
const CHAR *pUsrName,
5263 const CHAR *pPasswd,
5264 const bson::BSONObj &options = _sdbStaticObject )
5268 return SDB_NOT_CONNECTED ;
5270 return pSDB->createUsr( pUsrName, pPasswd, options ) ;
5281 INT32 removeUsr(
const CHAR *pUsrName,
5282 const CHAR *pPasswd )
5286 return SDB_NOT_CONNECTED ;
5288 return pSDB->removeUsr( pUsrName, pPasswd ) ;
5303 INT32 alterUsr(
const CHAR *pUsrName,
5304 const CHAR *pAction,
5305 const bson::BSONObj &options )
5309 return SDB_NOT_CONNECTED ;
5311 return pSDB->alterUsr( pUsrName, pAction, options ) ;
5324 INT32 changeUsrPasswd(
const CHAR *pUsrName,
5325 const CHAR *pOldPasswd,
5326 const CHAR *pNewPasswd )
5330 return SDB_NOT_CONNECTED ;
5332 return pSDB->changeUsrPasswd( pUsrName, pOldPasswd, pNewPasswd ) ;
5344 pSDB->disconnect () ;
5389 const bson::BSONObj &condition = _sdbStaticObject,
5390 const bson::BSONObj &selector = _sdbStaticObject,
5391 const bson::BSONObj &orderBy = _sdbStaticObject,
5392 const bson::BSONObj &hint = _sdbStaticObject,
5393 INT64 numToSkip = 0,
5394 INT64 numToReturn = -1 )
5398 return SDB_NOT_CONNECTED ;
5401 return pSDB->getSnapshot ( cursor, snapType, condition,
5402 selector, orderBy, hint,
5403 numToSkip, numToReturn ) ;
5447 INT32 getSnapshot ( _sdbCursor **cursor,
5449 const bson::BSONObj &condition = _sdbStaticObject,
5450 const bson::BSONObj &selector = _sdbStaticObject,
5451 const bson::BSONObj &orderBy = _sdbStaticObject,
5452 const bson::BSONObj &hint = _sdbStaticObject,
5453 INT64 numToSkip = 0,
5454 INT64 numToReturn = -1 )
5458 return SDB_NOT_CONNECTED ;
5460 return pSDB->getSnapshot ( cursor, snapType, condition,
5461 selector, orderBy, hint,
5462 numToSkip, numToReturn ) ;
5487 INT32 resetSnapshot (
const bson::BSONObj &options = _sdbStaticObject )
5491 return SDB_NOT_CONNECTED ;
5493 return pSDB->resetSnapshot ( options ) ;
5536 INT32 getList ( _sdbCursor **cursor,
5538 const bson::BSONObj &condition = _sdbStaticObject,
5539 const bson::BSONObj &selector = _sdbStaticObject,
5540 const bson::BSONObj &orderBy = _sdbStaticObject,
5541 const bson::BSONObj &hint = _sdbStaticObject,
5542 INT64 numToSkip = 0,
5543 INT64 numToReturn = -1
5548 return SDB_NOT_CONNECTED ;
5550 return pSDB->getList ( cursor, listType,
5551 condition, selector, orderBy, hint,
5552 numToSkip, numToReturn ) ;
5597 const bson::BSONObj &condition = _sdbStaticObject,
5598 const bson::BSONObj &selector = _sdbStaticObject,
5599 const bson::BSONObj &orderBy = _sdbStaticObject,
5600 const bson::BSONObj &hint = _sdbStaticObject,
5601 INT64 numToSkip = 0,
5602 INT64 numToReturn = -1
5607 return SDB_NOT_CONNECTED ;
5610 return pSDB->getList ( cursor, listType,
5611 condition, selector, orderBy, hint,
5612 numToSkip, numToReturn ) ;
5615 INT32 getCollection (
const CHAR *pCollectionFullName,
5616 _sdbCollection **collection,
5617 BOOLEAN checkExist = TRUE
5622 return SDB_NOT_CONNECTED ;
5624 return pSDB->getCollection ( pCollectionFullName,
5625 collection, checkExist ) ;
5638 INT32 getCollection (
const CHAR *pCollectionFullName,
5640 BOOLEAN checkExist = TRUE
5645 return SDB_NOT_CONNECTED ;
5648 return pSDB->getCollection ( pCollectionFullName,
5653 INT32 getCollectionSpace (
const CHAR *pCollectionSpaceName,
5654 _sdbCollectionSpace **cs,
5655 BOOLEAN checkExist = TRUE
5660 return SDB_NOT_CONNECTED ;
5662 return pSDB->getCollectionSpace ( pCollectionSpaceName,
5676 INT32 getCollectionSpace (
const CHAR *pCollectionSpaceName,
5678 BOOLEAN checkExist = TRUE
5683 return SDB_NOT_CONNECTED ;
5686 return pSDB->getCollectionSpace ( pCollectionSpaceName,
5708 INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
5710 _sdbCollectionSpace **cs
5715 return SDB_NOT_CONNECTED ;
5717 return pSDB->createCollectionSpace ( pCollectionSpaceName,
5740 INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
5747 return SDB_NOT_CONNECTED ;
5750 return pSDB->createCollectionSpace ( pCollectionSpaceName,
5754 INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
5755 const bson::BSONObj &options,
5756 _sdbCollectionSpace **cs
5761 return SDB_NOT_CONNECTED ;
5763 return pSDB->createCollectionSpace ( pCollectionSpaceName,
5781 INT32 createCollectionSpace (
const CHAR *pCollectionSpaceName,
5782 const bson::BSONObj &options,
5788 return SDB_NOT_CONNECTED ;
5791 return pSDB->createCollectionSpace ( pCollectionSpaceName,
5804 INT32 dropCollectionSpace (
5805 const CHAR *pCollectionSpaceName,
5806 const bson::BSONObj &options = _sdbStaticObject )
5810 return SDB_NOT_CONNECTED ;
5813 return pSDB->dropCollectionSpace ( pCollectionSpaceName, options ) ;
5816 INT32 listCollectionSpaces ( _sdbCursor **result )
5820 return SDB_NOT_CONNECTED ;
5822 return pSDB->listCollectionSpaces ( result ) ;
5835 return SDB_NOT_CONNECTED ;
5838 return pSDB->listCollectionSpaces ( cursor ) ;
5847 INT32 listCollections ( _sdbCursor **result )
5851 return SDB_NOT_CONNECTED ;
5853 return pSDB->listCollections ( result ) ;
5866 return SDB_NOT_CONNECTED ;
5869 return pSDB->listCollections ( cursor ) ;
5878 INT32 listReplicaGroups ( _sdbCursor **result )
5882 return SDB_NOT_CONNECTED ;
5884 return pSDB->listReplicaGroups ( result ) ;
5898 return SDB_NOT_CONNECTED ;
5901 return pSDB->listReplicaGroups ( cursor ) ;
5911 INT32 getReplicaGroup (
const CHAR *pName, _sdbReplicaGroup **result )
5915 return SDB_NOT_CONNECTED ;
5917 return pSDB->getReplicaGroup ( pName, result ) ;
5932 return SDB_NOT_CONNECTED ;
5935 return pSDB->getReplicaGroup ( pName, group ) ;
5945 INT32 getReplicaGroup ( INT32
id, _sdbReplicaGroup **result )
5949 return SDB_NOT_CONNECTED ;
5951 return pSDB->getReplicaGroup (
id, result ) ;
5965 return SDB_NOT_CONNECTED ;
5968 return pSDB->getReplicaGroup (
id, group ) ;
5978 INT32 createReplicaGroup (
const CHAR *pName, _sdbReplicaGroup **replicaGroup )
5982 return SDB_NOT_CONNECTED ;
5984 return pSDB->createReplicaGroup ( pName, replicaGroup ) ;
5998 return SDB_NOT_CONNECTED ;
6001 return pSDB->createReplicaGroup ( pName, group ) ;
6010 INT32 removeReplicaGroup (
const CHAR *pName )
6014 return SDB_NOT_CONNECTED ;
6016 return pSDB->removeReplicaGroup ( pName ) ;
6031 INT32 createReplicaCataGroup (
const CHAR *pHostName,
6032 const CHAR *pServiceName,
6033 const CHAR *pDatabasePath,
6034 const bson::BSONObj &configure )
6038 return SDB_NOT_CONNECTED ;
6040 return pSDB->createReplicaCataGroup ( pHostName, pServiceName,
6041 pDatabasePath, configure ) ;
6044 INT32 activateReplicaGroup (
const CHAR *pName, _sdbReplicaGroup **replicaGroup )
6048 return SDB_NOT_CONNECTED ;
6050 return pSDB->activateReplicaGroup ( pName, replicaGroup ) ;
6064 return SDB_NOT_CONNECTED ;
6067 return pSDB->activateReplicaGroup ( pName, replicaGroup ) ;
6077 INT32 execUpdate(
const CHAR *sql, bson::BSONObj *pResult = NULL )
6081 return SDB_NOT_CONNECTED ;
6083 return pSDB->execUpdate( sql, pResult ) ;
6094 INT32 exec(
const CHAR *sql,
6095 _sdbCursor **result )
6099 return SDB_NOT_CONNECTED ;
6101 return pSDB->exec( sql, result ) ;
6112 INT32 exec(
const CHAR *sql,
6117 return SDB_NOT_CONNECTED ;
6120 return pSDB->exec( sql, cursor ) ;
6128 INT32 transactionBegin()
6132 return SDB_NOT_CONNECTED ;
6134 return pSDB->transactionBegin() ;
6144 INT32 transactionCommit(
const bson::BSONObj &hint = _sdbStaticObject )
6148 return SDB_NOT_CONNECTED ;
6150 return pSDB->transactionCommit( hint ) ;
6158 INT32 transactionRollback()
6162 return SDB_NOT_CONNECTED ;
6164 return pSDB->transactionRollback() ;
6175 INT32 flushConfigure(
const bson::BSONObj &options )
6179 return SDB_NOT_CONNECTED ;
6181 return pSDB->flushConfigure( options ) ;
6190 INT32 crtJSProcedure (
const CHAR *code )
6194 return SDB_NOT_CONNECTED ;
6196 return pSDB->crtJSProcedure( code ) ;
6205 INT32 rmProcedure(
const CHAR *spName )
6209 return SDB_NOT_CONNECTED ;
6211 return pSDB->rmProcedure( spName ) ;
6214 INT32 listProcedures( _sdbCursor **cursor,
const bson::BSONObj &condition )
6218 return SDB_NOT_CONNECTED ;
6220 return pSDB->listProcedures( cursor, condition ) ;
6230 INT32 listProcedures(
sdbCursor &cursor,
const bson::BSONObj &condition )
6234 return SDB_NOT_CONNECTED ;
6237 return pSDB->listProcedures( cursor, condition ) ;
6240 INT32 evalJS(
const CHAR *code,
6242 _sdbCursor **cursor,
6243 bson::BSONObj &errmsg )
6247 return SDB_NOT_CONNECTED ;
6249 return pSDB->evalJS( code, type, cursor, errmsg ) ;
6266 bson::BSONObj &errmsg )
6270 return SDB_NOT_CONNECTED ;
6273 return pSDB->evalJS( code, type, cursor, errmsg ) ;
6295 INT32 backupOffline (
const bson::BSONObj &options)
6297 return backup( options ) ;
6318 INT32 backup (
const bson::BSONObj &options)
6322 return SDB_NOT_CONNECTED ;
6324 return pSDB->backup( options ) ;
6328 INT32 listBackup ( _sdbCursor **cursor,
6329 const bson::BSONObj &options,
6330 const bson::BSONObj &condition = _sdbStaticObject,
6331 const bson::BSONObj &selector = _sdbStaticObject,
6332 const bson::BSONObj &orderBy = _sdbStaticObject)
6336 return SDB_NOT_CONNECTED ;
6338 return pSDB->listBackup( cursor, options, condition, selector, orderBy ) ;
6364 const bson::BSONObj &options,
6365 const bson::BSONObj &condition = _sdbStaticObject,
6366 const bson::BSONObj &selector = _sdbStaticObject,
6367 const bson::BSONObj &orderBy = _sdbStaticObject)
6371 return SDB_NOT_CONNECTED ;
6374 return pSDB->listBackup( cursor, options, condition, selector, orderBy ) ;
6391 INT32 removeBackup (
const bson::BSONObj &options)
6395 return SDB_NOT_CONNECTED ;
6397 return pSDB->removeBackup( options ) ;
6400 INT32 listTasks ( _sdbCursor **cursor,
6401 const bson::BSONObj &condition = _sdbStaticObject,
6402 const bson::BSONObj &selector = _sdbStaticObject,
6403 const bson::BSONObj &orderBy = _sdbStaticObject,
6404 const bson::BSONObj &hint = _sdbStaticObject)
6408 return SDB_NOT_CONNECTED ;
6410 return pSDB->listTasks ( cursor,
6434 const bson::BSONObj &condition = _sdbStaticObject,
6435 const bson::BSONObj &selector = _sdbStaticObject,
6436 const bson::BSONObj &orderBy = _sdbStaticObject,
6437 const bson::BSONObj &hint = _sdbStaticObject)
6441 return SDB_NOT_CONNECTED ;
6444 return pSDB->listTasks ( cursor,
6459 INT32 waitTasks (
const SINT64 *taskIDs,
6464 return SDB_NOT_CONNECTED ;
6466 return pSDB->waitTasks ( taskIDs,
6479 INT32 cancelTask ( SINT64 taskID,
6484 return SDB_NOT_CONNECTED ;
6486 return pSDB->cancelTask ( taskID,
6500 INT32 setSessionAttr (
const bson::BSONObj &options = _sdbStaticObject )
6504 return SDB_NOT_CONNECTED ;
6506 return pSDB->setSessionAttr ( options ) ;
6517 INT32 getSessionAttr ( bson::BSONObj & result,
6518 BOOLEAN useCache = TRUE )
6522 return SDB_NOT_CONNECTED ;
6524 return pSDB->getSessionAttr( result, useCache ) ;
6533 INT32 closeAllCursors ()
6535 return interrupt() ;
6548 return SDB_NOT_CONNECTED ;
6550 return pSDB->interrupt () ;
6561 INT32 interruptOperation()
6565 return SDB_NOT_CONNECTED ;
6567 return pSDB->interruptOperation () ;
6577 INT32 isValid ( BOOLEAN *result )
6581 return SDB_NOT_CONNECTED ;
6583 return pSDB->isValid ( result ) ;
6596 return pSDB->isValid () ;
6609 return pSDB->isClosed() ;
6630 INT32 createDomain (
const CHAR *pDomainName,
6631 const bson::BSONObj &options,
6636 return SDB_NOT_CONNECTED ;
6639 return pSDB->createDomain ( pDomainName, options, domain ) ;
6642 INT32 createDomain (
const CHAR *pDomainName,
6643 const bson::BSONObj &options,
6644 _sdbDomain **domain )
6648 return SDB_NOT_CONNECTED ;
6650 return pSDB->createDomain ( pDomainName, options, domain ) ;
6659 INT32 dropDomain (
const CHAR *pDomainName )
6663 return SDB_NOT_CONNECTED ;
6665 return pSDB->dropDomain ( pDomainName ) ;
6668 INT32 getDomain (
const CHAR *pDomainName,
6669 _sdbDomain **domain )
6673 return SDB_NOT_CONNECTED ;
6675 return pSDB->getDomain ( pDomainName, domain ) ;
6686 INT32 getDomain (
const CHAR *pDomainName,
6691 return SDB_NOT_CONNECTED ;
6694 return pSDB->getDomain ( pDomainName, domain ) ;
6697 INT32 listDomains ( _sdbCursor **cursor,
6698 const bson::BSONObj &condition = _sdbStaticObject,
6699 const bson::BSONObj &selector = _sdbStaticObject,
6700 const bson::BSONObj &orderBy = _sdbStaticObject,
6701 const bson::BSONObj &hint = _sdbStaticObject )
6705 return SDB_NOT_CONNECTED ;
6707 return pSDB->listDomains ( cursor, condition, selector, orderBy, hint ) ;
6728 const bson::BSONObj &condition = _sdbStaticObject,
6729 const bson::BSONObj &selector = _sdbStaticObject,
6730 const bson::BSONObj &orderBy = _sdbStaticObject,
6731 const bson::BSONObj &hint = _sdbStaticObject )
6735 return SDB_NOT_CONNECTED ;
6738 return pSDB->listDomains ( cursor, condition, selector, orderBy, hint ) ;
6746 INT32 getDC( sdbDataCenter &dc )
6750 return SDB_NOT_CONNECTED ;
6753 return pSDB->getDC ( dc ) ;
6761 INT32 getDC( _sdbDataCenter **dc )
6765 return SDB_NOT_CONNECTED ;
6767 return pSDB->getDC ( dc ) ;
6799 INT32 syncDB(
const bson::BSONObj &options = _sdbStaticObject )
6803 return SDB_NOT_CONNECTED ;
6805 return pSDB->syncDB ( options ) ;
6834 INT32 analyze (
const bson::BSONObj &options = _sdbStaticObject )
6838 return SDB_NOT_CONNECTED ;
6840 return pSDB->analyze ( options ) ;
6858 INT32 forceSession( SINT64 sessionID,
6859 const bson::BSONObj &options = _sdbStaticObject )
6863 return SDB_NOT_CONNECTED ;
6865 return pSDB->forceSession( sessionID, options ) ;
6882 INT32 forceStepUp(
const bson::BSONObj &options = _sdbStaticObject )
6886 return SDB_NOT_CONNECTED ;
6888 return pSDB->forceStepUp( options ) ;
6903 INT32 invalidateCache(
const bson::BSONObj &options = _sdbStaticObject )
6907 return SDB_NOT_CONNECTED ;
6909 return pSDB->invalidateCache( options ) ;
6925 INT32 reloadConfig(
const bson::BSONObj &options = _sdbStaticObject )
6929 return SDB_NOT_CONNECTED ;
6931 return pSDB->reloadConfig( options ) ;
6950 INT32 updateConfig(
const bson::BSONObj &configs = _sdbStaticObject,
6951 const bson::BSONObj &options = _sdbStaticObject )
6955 return SDB_NOT_CONNECTED ;
6957 return pSDB->updateConfig( configs, options ) ;
6976 INT32 deleteConfig(
const bson::BSONObj &configs = _sdbStaticObject,
6977 const bson::BSONObj &options = _sdbStaticObject )
6981 return SDB_NOT_CONNECTED ;
6983 return pSDB->deleteConfig( configs, options ) ;
7008 INT32 setPDLevel( INT32 level,
7009 const bson::BSONObj &options = _sdbStaticObject )
7013 return SDB_NOT_CONNECTED ;
7015 return pSDB->setPDLevel( level, options ) ;
7018 INT32 msg(
const CHAR* msg )
7022 return SDB_NOT_CONNECTED ;
7024 return pSDB->msg( msg ) ;
7042 INT32 loadCS(
const CHAR* csName,
7043 const bson::BSONObj &options = _sdbStaticObject )
7047 return SDB_NOT_CONNECTED ;
7049 return pSDB->loadCS( csName, options ) ;
7067 INT32 unloadCS(
const CHAR* csName,
7068 const bson::BSONObj &options = _sdbStaticObject )
7072 return SDB_NOT_CONNECTED ;
7074 return pSDB->unloadCS( csName, options ) ;
7089 INT32 traceStart( UINT32 traceBufferSize,
7090 const CHAR* component = NULL,
7091 const CHAR* breakpoint = NULL,
7092 const vector<UINT32> &tidVec = _sdbStaticUINT32Vec )
7096 return SDB_NOT_CONNECTED ;
7098 return pSDB->traceStart( traceBufferSize, component,
7099 breakpoint, tidVec ) ;
7121 INT32 traceStart( UINT32 traceBufferSize,
7122 const bson::BSONObj &options )
7126 return SDB_NOT_CONNECTED ;
7128 return pSDB->traceStart( traceBufferSize, options ) ;
7139 INT32 traceStop(
const CHAR* dumpFileName )
7143 return SDB_NOT_CONNECTED ;
7145 return pSDB->traceStop( dumpFileName ) ;
7157 return SDB_NOT_CONNECTED ;
7159 return pSDB->traceResume() ;
7172 return SDB_NOT_CONNECTED ;
7175 return pSDB->traceStatus( cursor ) ;
7178 INT32 traceStatus( _sdbCursor** cursor )
7182 return SDB_NOT_CONNECTED ;
7184 return pSDB->traceStatus( cursor ) ;
7197 INT32 renameCollectionSpace(
const CHAR* oldName,
7198 const CHAR* newName,
7199 const bson::BSONObj &options = _sdbStaticObject )
7203 return SDB_NOT_CONNECTED ;
7205 return pSDB->renameCollectionSpace( oldName, newName, options ) ;
7219 INT32 getLastErrorObj( bson::BSONObj &errObj )
7223 return SDB_NOT_CONNECTED ;
7225 return pSDB->getLastErrorObj( errObj ) ;
7231 void cleanLastErrorObj()
7237 return pSDB->cleanLastErrorObj() ;
7250 INT32 getLastResultObj( bson::BSONObj &result,
7251 BOOLEAN getOwned = FALSE )
const
7255 return SDB_NOT_CONNECTED ;
7257 return pSDB->getLastResultObj( result, getOwned ) ;
7279 INT32 createSequence(
const CHAR *pSequenceName,
7280 const bson::BSONObj &options,
7281 _sdbSequence **sequence )
7285 return SDB_NOT_CONNECTED ;
7287 return pSDB->createSequence( pSequenceName, options, sequence ) ;
7309 INT32 createSequence(
const CHAR *pSequenceName,
7310 const bson::BSONObj &options,
7315 return SDB_NOT_CONNECTED ;
7317 return pSDB->createSequence( pSequenceName, options, sequence ) ;
7328 INT32 createSequence(
const CHAR *pSequenceName,
7333 return SDB_NOT_CONNECTED ;
7335 return pSDB->createSequence( pSequenceName, sequence ) ;
7346 INT32 getSequence(
const CHAR *pSequenceName,
7347 _sdbSequence **sequence )
7351 return SDB_NOT_CONNECTED ;
7353 return pSDB->getSequence( pSequenceName, sequence ) ;
7364 INT32 getSequence(
const CHAR *pSequenceName,
7369 return SDB_NOT_CONNECTED ;
7371 return pSDB->getSequence( pSequenceName, sequence ) ;
7381 INT32 renameSequence(
const CHAR *pOldName,
const CHAR *pNewName )
7385 return SDB_NOT_CONNECTED ;
7387 return pSDB->renameSequence( pOldName, pNewName ) ;
7396 INT32 dropSequence(
const CHAR *pSequenceName )
7400 return SDB_NOT_CONNECTED ;
7402 return pSDB->dropSequence( pSequenceName ) ;