SequoiaDB
|
Database operation interfaces of admin. More...
#include <client.hpp>
Public Member Functions | |
sdb (BOOLEAN useSSL=FALSE) | |
Default constructor. | |
~sdb () | |
Destructor. | |
INT32 | connect (const CHAR *pHostName, UINT16 port) |
Connect to remote Database Server. | |
INT32 | connect (const CHAR *pHostName, UINT16 port, const CHAR *pUsrName, const CHAR *pPasswd) |
Connect to remote Database Server. | |
INT32 | connect (const CHAR *pHostName, const CHAR *pServiceName) |
Connect to remote Database Server. | |
INT32 | connect (const CHAR *pHostName, const CHAR *pServiceName, const CHAR *pUsrName, const CHAR *pPasswd) |
Connect to remote Database Server. | |
INT32 | connect (const CHAR **pConnAddrs, INT32 arrSize, const CHAR *pUsrName, const CHAR *pPasswd) |
Connect to database used a random valid address in the array. | |
INT32 | createUsr (const CHAR *pUsrName, const CHAR *pPasswd, const bson::BSONObj &options=_sdbStaticObject) |
Add an user in current database. | |
INT32 | removeUsr (const CHAR *pUsrName, const CHAR *pPasswd) |
Remove the spacified user from current database. | |
void | disconnect () |
Disconnect the remote Database Server. | |
INT32 | getSnapshot (sdbCursor &cursor, INT32 snapType, const bson::BSONObj &condition=_sdbStaticObject, const bson::BSONObj &selector=_sdbStaticObject, const bson::BSONObj &orderBy=_sdbStaticObject, const bson::BSONObj &hint=_sdbStaticObject, INT64 numToSkip=0, INT64 numToReturn=-1) |
Get the snapshots of specified type. | |
INT32 | getSnapshot (_sdbCursor **cursor, INT32 snapType, const bson::BSONObj &condition=_sdbStaticObject, const bson::BSONObj &selector=_sdbStaticObject, const bson::BSONObj &orderBy=_sdbStaticObject, const bson::BSONObj &hint=_sdbStaticObject, INT64 numToSkip=0, INT64 numToReturn=-1) |
INT32 | resetSnapshot (const bson::BSONObj &condition=_sdbStaticObject) |
Reset the snapshot. | |
INT32 | getList (_sdbCursor **cursor, INT32 listType, const bson::BSONObj &condition=_sdbStaticObject, const bson::BSONObj &selector=_sdbStaticObject, const bson::BSONObj &orderBy=_sdbStaticObject, const bson::BSONObj &hint=_sdbStaticObject, INT64 numToSkip=0, INT64 numToReturn=-1) |
INT32 | getList (sdbCursor &cursor, INT32 listType, const bson::BSONObj &condition=_sdbStaticObject, const bson::BSONObj &selector=_sdbStaticObject, const bson::BSONObj &orderBy=_sdbStaticObject, const bson::BSONObj &hint=_sdbStaticObject, INT64 numToSkip=0, INT64 numToReturn=-1) |
Get the informations of specified type. | |
INT32 | getCollection (const CHAR *pCollectionFullName, _sdbCollection **collection) |
INT32 | getCollection (const CHAR *pCollectionFullName, sdbCollection &collection) |
INT32 | getCollectionSpace (const CHAR *pCollectionSpaceName, _sdbCollectionSpace **cs) |
INT32 | getCollectionSpace (const CHAR *pCollectionSpaceName, sdbCollectionSpace &cs) |
Get the specified collection space. | |
INT32 | createCollectionSpace (const CHAR *pCollectionSpaceName, INT32 iPageSize, _sdbCollectionSpace **cs) |
INT32 | createCollectionSpace (const CHAR *pCollectionSpaceName, INT32 iPageSize, sdbCollectionSpace &cs) |
Create collection space with specified pagesize. | |
INT32 | createCollectionSpace (const CHAR *pCollectionSpaceName, const bson::BSONObj &options, sdbCollectionSpace &cs) |
Create collection space with specified pagesize. | |
INT32 | dropCollectionSpace (const CHAR *pCollectionSpaceName) |
Remove the specified collection space. | |
INT32 | listCollectionSpaces (_sdbCursor **result) |
INT32 | listCollectionSpaces (sdbCursor &result) |
List all collection space of current database(include temporary collection space). | |
INT32 | listCollections (_sdbCursor **result) |
INT32 | listCollections (sdbCursor &result) |
list all collections in current database. | |
INT32 | listReplicaGroups (_sdbCursor **result) |
INT32 | listReplicaGroups (sdbCursor &result) |
List all replica groups of current database. | |
INT32 | getReplicaGroup (const CHAR *pName, _sdbReplicaGroup **result) |
INT32 | getReplicaGroup (const CHAR *pName, sdbReplicaGroup &result) |
Get the specified replica group. | |
INT32 | getReplicaGroup (INT32 id, _sdbReplicaGroup **result) |
INT32 | getReplicaGroup (INT32 id, sdbReplicaGroup &result) |
Get the specified replica group. | |
INT32 | createReplicaGroup (const CHAR *pName, _sdbReplicaGroup **replicaGroup) |
INT32 | createReplicaGroup (const CHAR *pName, sdbReplicaGroup &replicaGroup) |
Create the specified replica group. | |
INT32 | removeReplicaGroup (const CHAR *pName) |
Remove the specified replica group. | |
INT32 | createReplicaCataGroup (const CHAR *pHostName, const CHAR *pServiceName, const CHAR *pDatabasePath, const bson::BSONObj &configure) |
Create a catalog replica group. | |
INT32 | activateReplicaGroup (const CHAR *pName, _sdbReplicaGroup **replicaGroup) |
INT32 | activateReplicaGroup (const CHAR *pName, sdbReplicaGroup &replicaGroup) |
Activate the specified replica group. | |
INT32 | execUpdate (const CHAR *sql) |
Executing SQL command for updating. | |
INT32 | exec (const CHAR *sql, _sdbCursor **result) |
INT32 | exec (const CHAR *sql, sdbCursor &result) |
Executing SQL command. | |
INT32 | transactionBegin () |
Transaction commit. | |
INT32 | transactionCommit () |
Transaction commit. | |
INT32 | transactionRollback () |
Transaction rollback. | |
INT32 | flushConfigure (const bson::BSONObj &options) |
flush the options to configure file. | |
INT32 | crtJSProcedure (const CHAR *code) |
create a store procedures. | |
INT32 | rmProcedure (const CHAR *spName) |
remove a store procedure. | |
INT32 | listProcedures (_sdbCursor **cursor, const bson::BSONObj &condition) |
INT32 | listProcedures (sdbCursor &cursor, const bson::BSONObj &condition) |
list store procedures. | |
INT32 | evalJS (const CHAR *code, SDB_SPD_RES_TYPE &type, _sdbCursor **cursor, bson::BSONObj &errmsg) |
INT32 | evalJS (const CHAR *code, SDB_SPD_RES_TYPE &type, sdbCursor &cursor, bson::BSONObj &errmsg) |
INT32 | backupOffline (const bson::BSONObj &options) |
Backup the whole database or specifed replica group. | |
INT32 | listBackup (_sdbCursor **cursor, const bson::BSONObj &options, const bson::BSONObj &condition=_sdbStaticObject, const bson::BSONObj &selector=_sdbStaticObject, const bson::BSONObj &orderBy=_sdbStaticObject) |
INT32 | listBackup (sdbCursor &cursor, const bson::BSONObj &options, const bson::BSONObj &condition=_sdbStaticObject, const bson::BSONObj &selector=_sdbStaticObject, const bson::BSONObj &orderBy=_sdbStaticObject) |
List the backups. | |
INT32 | removeBackup (const bson::BSONObj &options) |
Remove the backups. | |
INT32 | listTasks (_sdbCursor **cursor, const bson::BSONObj &condition=_sdbStaticObject, const bson::BSONObj &selector=_sdbStaticObject, const bson::BSONObj &orderBy=_sdbStaticObject, const bson::BSONObj &hint=_sdbStaticObject) |
INT32 | listTasks (sdbCursor &cursor, const bson::BSONObj &condition=_sdbStaticObject, const bson::BSONObj &selector=_sdbStaticObject, const bson::BSONObj &orderBy=_sdbStaticObject, const bson::BSONObj &hint=_sdbStaticObject) |
List the tasks. | |
INT32 | waitTasks (const SINT64 *taskIDs, SINT32 num) |
Wait the tasks to finish. | |
INT32 | cancelTask (SINT64 taskID, BOOLEAN isAsync) |
Cancel the specified task. | |
INT32 | setSessionAttr (const bson::BSONObj &options=_sdbStaticObject) |
Set the attributes of the session. | |
INT32 | getSessionAttr (bson::BSONObj &result) |
Get the attributes of the session. | |
INT32 | closeAllCursors () |
Send a "Interrpt" message to engine, as a result, all the cursors and lobs created by current connection will be closed. | |
INT32 | isValid (BOOLEAN *result) |
Judge whether the connection is valid. | |
BOOLEAN | isValid () |
Judge whether the connection is valid. | |
INT32 | createDomain (const CHAR *pDomainName, const bson::BSONObj &options, sdbDomain &domain) |
Create a domain. | |
INT32 | dropDomain (const CHAR *pDomainName) |
Drop a domain. | |
INT32 | getDomain (const CHAR *pDomainName, sdbDomain &domain) |
Get a domain. | |
INT32 | listDomains (sdbCursor &cursor, const bson::BSONObj &condition=_sdbStaticObject, const bson::BSONObj &selector=_sdbStaticObject, const bson::BSONObj &orderBy=_sdbStaticObject, const bson::BSONObj &hint=_sdbStaticObject) |
List the domains. | |
INT32 | getDC (sdbDataCenter &dc) |
UINT64 | getLastAliveTime () const |
Get the number of seconds from the standard time point (usually in the midnight of January 1, 1970) to the last alive time. | |
Public Attributes | |
_sdb * | pSDB |
Database operation interfaces of admin.
|
inline |
Default constructor.
[in] | useSSL | Set whether use the SSL or not, default is FALSE. |
|
inline |
Activate the specified replica group.
[in] | pName | The name of the replica group |
[out] | replicaGroup | The return sdbReplicaGroup object |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Backup the whole database or specifed replica group.
[in] | options | Contains a series of backup configuration infomations. Backup the whole cluster if null. The "options" contains 5 options as below. All the elements in options are optional. eg: {"GroupName":["rgName1", "rgName2"], "Path":"/opt/sequoiadb/backup", "Name":"backupName", "Description":description, "EnsureInc":true, "OverWrite":true} GroupID : The id(s) of replica group(s) which to be backuped GroupName : The replica groups which to be backuped Path : The backup path, if not assign, use the backup path assigned in the configuration file, the path support to use wildcard(%g/%G:group name, %h/%H:host name, %s/%S:service name). e.g. {Path:"/opt/sequoiadb/backup/%g"} isSubDir : Whether the path specified by paramer "Path" is a subdirectory of the path specified in the configuration file, default to be false Name : The name for the backup Prefix : The prefix of name for the backup, default to be null. e.g. {Prefix:"%g_bk_"} EnableDateDir : Whether turn on the feature which will create subdirectory named to current date like "YYYY-MM-DD" automatically, default to be false Description : The description for the backup EnsureInc : Whether excute increment synchronization, default to be false OverWrite : Whether overwrite the old backup file, default to be false |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Cancel the specified task.
[in] | taskID | The task id |
[in] | isAsync | The operation "cancel task" is async or not, "true" for async, "false" for sync. Default sync |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Send a "Interrpt" message to engine, as a result, all the cursors and lobs created by current connection will be closed.
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Connect to remote Database Server.
[in] | pHostName | The Host Name or IP Address of Database Server. |
[in] | port | The Port of Database Server. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Connect to remote Database Server.
[in] | pHostName | The Host Name or IP Address of Database Server. |
[in] | port | The Port of Database Server. |
[in] | pUsrName | The connection user name. |
[in] | pPasswd | The connection password. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Connect to remote Database Server.
[in] | pHostName | The Host Name or IP Address of Database Server. |
[in] | pServiceName | The Service Name of Database Server. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Connect to remote Database Server.
[in] | pHostName | The Host Name or IP Address of Database Server. |
[in] | pServiceName | The Service Name of Database Server. |
[in] | pUsrName | The connection user name. |
[in] | pPasswd | The connection password. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Connect to database used a random valid address in the array.
[in] | pConnAddrs | The array of the coord's address |
[in] | arrSize | The size of the array |
[in] | pUsrName | The connection user name. |
[in] | pPasswd | The connection password. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Create collection space with specified pagesize.
[in] | pCollectionSpaceName | The name of collection space. |
[in] | iPageSize | The Page Size as below SDB_PAGESIZE_4K SDB_PAGESIZE_8K SDB_PAGESIZE_16K SDB_PAGESIZE_32K SDB_PAGESIZE_64K SDB_PAGESIZE_DEFAULT |
[out] | cs | The return collection space object of creation. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Create collection space with specified pagesize.
[in] | pCollectionSpaceName | The name of collection space. |
[in] | options | The options specified by user, e.g. {"PageSize": 4096, "Domain": "mydomain"}. PageSize : Assign the pagesize of the collection space Domain : Assign which domain does current collection space belong to |
[out] | cs | The return collection space object of creation. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Create a domain.
[in] | pDomainName | The name of the domain |
[in] | options | The options for the domain. The options are as below: Groups: The list of replica groups' names which the domain is going to contain. eg: { "Groups": [ "group1", "group2", "group3" ] } If this argument is not included, the domain will contain all replica groups in the cluster. AutoSplit: If this option is set to be true, while creating collection(ShardingType is "hash") in this domain, the data of this collection will be split(hash split) into all the groups in this domain automatically. However, it won't automatically split data into those groups which were add into this domain later. eg: { "Groups": [ "group1", "group2", "group3" ], "AutoSplit: true" } |
[out] | domain | The created sdbDomain object |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Create a catalog replica group.
[in] | pHostName | The hostname for the catalog replica group |
[in] | pServiceName | The servicename for the catalog replica group |
[in] | pDatabasePath | The path for the catalog replica group |
[in] | configure | The configurations for the catalog replica group |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Create the specified replica group.
[in] | pName | The name of the replica group. |
[out] | replicaGroup | The return sdbReplicaGroup object. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Add an user in current database.
[in] | pUsrName | The connection user name. |
[in] | pPasswd | The connection password. |
[in] | options | The options for user, such as: { AuditMask:"DDL|DML" } AuditMask : User audit log mask, value list: ACCESS,CLUSTER,SYSTEM,DML,DDL,DCL,DQL,INSERT,DELETE, UPDATE,OTHER. You can combine multiple values with '|'. 'ALL' means that all mask items are turned on, and 'NONE' means that no mask items are turned on. If an item in the user audit log is not configured, the configuration of the corresponding mask item on the node is inherited. You can also use '!' to disable inheritance of this mask( e.g. "!DDL|DML" ). |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
create a store procedures.
[in] | code | The code of store procedures |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Remove the specified collection space.
[in] | pCollectionSpaceName | The name of collection space. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Drop a domain.
[in] | pDomainName | The name of the domain |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
INT32 evalJS( const CHAR *code, SDB_SPD_RES_TYPE &type, _sdbCursor **cursor, bson::BSONObj &errmsg ) brief eval a func. \ type is declared in spd.h. see SDB_FMP_RES_TYPE.
[in] | code | The code to eval |
[out] | type | The type of value |
[out] | cursor | The cursor handle of current eval |
[out] | errmsg | The errmsg from eval |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Executing SQL command.
[in] | sql | The SQL command. |
[out] | result | The return cursor object of matching documents. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Executing SQL command for updating.
[in] | sql | The SQL command. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
flush the options to configure file.
[in] | options | The configure infomation, pass {"Global":true} or {"Global":false} In cluster environment, passing {"Global":true} will flush data's and catalog's configuration file, while passing {"Global":false} will flush coord's configuration file. In stand-alone environment, both them have the same behaviour. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Get the specified collection.
[in] | pCollectionFullName | The full name of collection. |
[out] | collection | The return collection object of query. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Get the specified collection space.
[in] | pCollectionSpaceName | The name of collection space. |
[out] | cs | The return collection space object of query. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Get a domain.
[in] | pDomainName | The name of the domain |
[out] | domain | The sdbDomain object to get |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Get the number of seconds from the standard time point (usually in the midnight of January 1, 1970) to the last alive time.
UINT64 | time difference, unit for seconds |
|
inline |
Get the informations of specified type.
[in] | listType | The list type as below SDB_LIST_CONTEXTS : Get all contexts list SDB_LIST_CONTEXTS_CURRENT : Get contexts list for the current session SDB_LIST_SESSIONS : Get all sessions list SDB_LIST_SESSIONS_CURRENT : Get the current session SDB_LIST_COLLECTIONS : Get all collections list SDB_LIST_COLLECTIONSPACES : Get all collecion spaces' list SDB_LIST_STORAGEUNITS : Get storage units list SDB_LIST_GROUPS : Get replicaGroup list ( only applicable in sharding env ) SDB_LIST_STOREPROCEDURES : Get all the stored procedure list SDB_LIST_DOMAINS : Get all the domains list SDB_LIST_TASKS : Get all the running split tasks ( only applicable in sharding env ) SDB_LIST_TRANSACTIONS : Get all the transactions information. SDB_LIST_TRANSACTIONS_CURRENT : Get the transactions information of current session. SDB_LIST_USERS : Get all the user informations. |
[in] | condition | The matching rule, match all the documents if null. |
[in] | select | The selective rule, return the whole document if null. |
[in] | orderBy | The ordered rule, never sort if null. |
[in] | hint | The options provided for specific list type. Reserved. |
[in] | numToSkip | Skip the first numToSkip documents. |
[in] | numToReturn | Only return numToReturn documents. -1 means return all matched results. |
[out] | cursor | The return cursor object of query. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Get the specified replica group.
[in] | pName | The name of replica group. |
[out] | result | The sdbReplicaGroup object. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Get the specified replica group.
[in] | id | The id of replica group. |
[out] | result | The sdbReplicaGroup object. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Get the attributes of the session.
[out] | result | The return bson object |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Get the snapshots of specified type.
[in] | snapType | The snapshot type as below SDB_SNAP_CONTEXTS : Get the snapshot of all the contexts SDB_SNAP_CONTEXTS_CURRENT : Get the snapshot of current context SDB_SNAP_SESSIONS : Get the snapshot of all the sessions SDB_SNAP_SESSIONS_CURRENT : Get the snapshot of current session SDB_SNAP_COLLECTIONS : Get the snapshot of all the collections SDB_SNAP_COLLECTIONSPACES : Get the snapshot of all the collection spaces SDB_SNAP_DATABASE : Get the snapshot of the database SDB_SNAP_SYSTEM : Get the snapshot of the system SDB_SNAP_CATALOG : Get the snapshot of the catalog SDB_SNAP_TRANSACTIONS : Get snapshot of transactions in current session SDB_SNAP_TRANSACTIONS_CURRENT : Get snapshot of all the transactions |
[in] | condition | The matching rule, match all the documents if not provided. |
[in] | select | The selective rule, return the whole document if not provided. |
[in] | orderBy | The ordered rule, result set is unordered if not provided. |
[in] | hint | Reserved. |
[in] | numToSkip | Reserved. |
[in] | numToReturn | Reserved. |
[out] | cursor | The return cursor object of query. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Judge whether the connection is valid.
[out] | result | the output result |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Judge whether the connection is valid.
TRUE | for the connection is valid while FALSE for not |
|
inline |
List the backups.
[in] | options | Contains configuration information for listing backups, list all the backups in the default backup path if null. The "options" contains several options as below. All the elements in options are optional. eg: {"GroupName":["RGName1", "RGName2"], "Path":"/opt/sequoiadb/backup", "Name":"backupName"} GroupID : Specified the group id of the backups, default to list all the backups of all the groups. GroupName : Specified the group name of the backups, default to list all the backups of all the groups. Path : Specified the path of the backups, default to use the backup path asigned in the configuration file. Name : Specified the name of backup, default to list all the backups. IsSubDir : Specified the "Path" is a subdirectory of the backup path assigned in the configuration file or not, default to be false. Prefix : Specified the prefix name of the backups, support for using wildcards("%g","%G","%h","%H","%s","%s"),such as: Prefix:"%g_bk_", default to not using wildcards. Detail : Display the detail of the backups or not, default to be false. |
[in] | condition | The matching rule, return all the documents if not provided |
[in] | selector | The selective rule, return the whole document if null |
[in] | orderBy | The ordered rule, never sort if null |
[out] | cursor | The cusor handle of result |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
list all collections in current database.
[out] | result | The return cursor object of query. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
List all collection space of current database(include temporary collection space).
[out] | result | The return cursor object of query. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
List the domains.
[in] | condition | The matching rule, return all the documents if null |
[in] | selector | The selective rule, return the whole document if null |
[in] | orderBy | The ordered rule, never sort if null |
[in] | hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is not provided, database automatically match the optimal index to scan data |
[out] | cursor | The sdbCursor object of result |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
list store procedures.
[in] | condition | The condition of list |
[out] | cursor | The cursor of the result |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
List all replica groups of current database.
[out] | result | The return cursor object of query. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
List the tasks.
[in] | condition | The matching rule, return all the documents if null |
[in] | selector | The selective rule, return the whole document if null |
[in] | orderBy | The ordered rule, never sort if null |
[in] | hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is not provided, database automatically match the optimal index to scan data |
[out] | cursor | The connection handle |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Remove the backups.
[in] | options | Contains configuration infomations for removing backups, remove all the backups in the default backup path if null. The "options" contains several options as below. All the elements in options are optional. eg: {"GroupName":["RGName1", "RGName2"], "Path":"/opt/sequoiadb/backup", "Name":"backupName"} GroupID : Specified the group id of the backups, default to list all the backups of all the groups. GroupName : Specified the group name of the backups, default to list all the backups of all the groups. Path : Specified the path of the backups, default to use the backup path asigned in the configuration file. Name : Specified the name of backup, default to list all the backups. IsSubDir : Specified the "Path" is a subdirectory of the backup path assigned in the configuration file or not, default to be false. Prefix : Specified the prefix name of the backups, support for using wildcards("%g","%G","%h","%H","%s","%s"),such as: Prefix:"%g_bk_", default to not using wildcards. Detail : Display the detail of the backups or not, default to be false. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Remove the specified replica group.
[in] | pName | The name of the replica group |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Remove the spacified user from current database.
[in] | pUsrName | The connection user name. |
[in] | pPasswd | The connection password. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Reset the snapshot.
[in] | condition | The control options are as below: (please visit the official website to search "Location Elements" for more detail.) GroupID :INT32, GroupName :String, NodeID :INT32, HostName :String, svcname :String, ... |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
remove a store procedure.
[in] | spName | The name of store procedure |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Set the attributes of the session.
[in] | options | The configuration options for session.The options are as below: PreferedInstance : Preferred instance for read request in the current session. Could be single value in "M", "m", "S", "s", "A", "a", 1-255, or BSON Array to include multiple values. e.g. { "PreferedInstance" : [ 1, 7 ] }. "M", "m": read and write instance( master instance ). If multiple numeric instances are given with "M", matched master instance will be chosen in higher priority. If multiple numeric instances are given with "M" or "m", master instance will be chosen if no numeric instance is matched. "S", "s": read only instance( slave instance ). If multiple numeric instances are given with "S", matched slave instances will be chosen in higher priority. If multiple numeric instances are given with "S" or "s", slave instance will be chosen if no numeric instance is matched. "A", "a": any instance. 1-255: the instance with specified instance ID. If multiple alphabet instances are given, only first one will be used. If matched instance is not found, will choose instance by random. PreferedInstanceMode : The mode to choose query instance when multiple preferred instances are found in the current session. e.g. { "PreferedInstanceMode : "random" }. "random": choose the instance from matched instances by random. "ordered": choose the instance from matched instances by the order of "PreferedInstance". Timeout : The timeout (in ms) for operations in the current session. -1 means no timeout for operations. e.g. { "Timeout" : 10000 }. |
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Transaction commit.
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Transaction commit.
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Transaction rollback.
SDB_OK | Operation Success |
Others | Operation Fail |
|
inline |
Wait the tasks to finish.
[in] | taskIDs | The array of task id |
[in] | num | The number of task id |
SDB_OK | Operation Success |
Others | Operation Fail |
sdbclient::sdb::pSDB |