SequoiaDB
 All Classes Namespaces Functions Variables Enumerations Properties Pages
Public Member Functions | Static Public Member Functions | Properties | List of all members
SequoiaDB.Sequoiadb Class Reference

Database operation interfaces of admin. More...

Public Member Functions

 Sequoiadb ()
 Default Constructor.
 
 Sequoiadb (string connString)
 Constructor.
 
 Sequoiadb (List< string > connStrings)
 Constructor.
 
 Sequoiadb (string host, int port)
 Constructor.
 
void Connect ()
 Connect to remote Sequoiadb database server.
 
void Connect (string username, string password)
 Connect to remote Sequoiadb database server Sequoiadb connection user name Sequoiadb connection password.
 
void Connect (string username, string password, ConfigOptions options)
 Connect to remote Sequoiadb database server Sequoiadb connection user name Sequoiadb connection password The options for connection.
 
void Disconnect ()
 Disconnect the remote server.
 
bool IsValid ()
 Judge wether the connection is is valid or not.
 
void CreateUser (string username, string password)
 Add an user in current database Sequoiadb connection user name Sequoiadb connection password.
 
void RemoveUser (string username, string password)
 Remove the user from current database Sequoiadb connection user name Sequoiadb connection password.
 
void TransactionBegin ()
 Begin the database transaction.
 
void TransactionCommit ()
 Commit the database transaction.
 
void TransactionRollback ()
 Rollback the database transaction.
 
void ChangeConnectionOptions (ConfigOptions opts)
 Change the connection options.
 
CollectionSpace CreateCollectionSpace (string csName)
 Create the named collection space with default SDB_PAGESIZE_64K.
 
CollectionSpace CreateCollectionSpace (string csName, int pageSize)
 Create the named collection space.
 
CollectionSpace CreateCollectionSpace (string csName, BsonDocument options)
 Create the named collection space.
 
void DropCollectionSpace (string csName)
 Remove the named collection space.
 
CollectionSpace GetCollecitonSpace (string csName)
 Get the named collection space.
 
bool IsCollectionSpaceExist (string csName)
 Verify the existence of collection space.
 
DBCursor ListCollectionSpaces ()
 List all the collecion space.
 
DBCursor ListCollections ()
 List all the collecion space.
 
DBCursor Exec (string sql)
 Executing SQL command.
 
void ExecUpdate (string sql)
 Executing SQL command for updating.
 
DBCursor GetSnapshot (int snapType, BsonDocument matcher, BsonDocument selector, BsonDocument orderBy)
 Get the snapshots of specified type.
 
DBCursor GetSnapshot (int snapType, BsonDocument matcher, BsonDocument selector, BsonDocument orderBy, BsonDocument hint, long skipRows, long returnRows)
 Get the snapshots of specified type.
 
DBCursor GetList (int listType)
 Get the informations of specified type.
 
DBCursor GetList (int listType, BsonDocument matcher, BsonDocument selector, BsonDocument orderBy)
 Get the informations of specified type.
 
DBCursor GetList (int listType, BsonDocument matcher, BsonDocument selector, BsonDocument orderBy, BsonDocument hint, long skipRows, long returnRows)
 Get the informations of specified type.
 
void ResetSnapshot (BsonDocument matcher)
 Reset the snapshot.
 
void BackupOffline (BsonDocument options)
 Backup the whole database or specifed replica group.
 
DBCursor ListBackup (BsonDocument options, BsonDocument matcher, BsonDocument selector, BsonDocument orderBy)
 List the backups.
 
void RemoveBackup (BsonDocument options)
 Remove the backups.
 
DBCursor ListTasks (BsonDocument matcher, BsonDocument selector, BsonDocument orderBy, BsonDocument hint)
 List the tasks.
 
void WaitTasks (List< long > taskIDs)
 Wait the tasks to finish.
 
void CancelTask (long taskID, bool isAsync)
 Cancel the specified task.
 
void SetSessionAttr (BsonDocument options)
 Set the attributes of the session.
 
BsonDocument GetSessionAttr ()
 Get the attributes of the session.
 
void CloseAllCursors ()
 Close all the cursors created in current connection, we can't use those cursors to get data from db engine again, but, there are some data cache in local.
 
bool IsDomainExist (string dmName)
 Verify the existence of domain in current database.
 
Domain CreateDomain (string domainName, BsonDocument options)
 Create a domain.
 
void DropDomain (string domainName)
 Drop a domain.
 
Domain GetDomain (string domainName)
 Get the specified domain.
 
DBCursor ListDomains (BsonDocument matcher, BsonDocument selector, BsonDocument orderBy, BsonDocument hint)
 List domains.
 
DBCursor ListReplicaGroups ()
 Get all the groups.
 
ReplicaGroup GetReplicaGroup (string groupName)
 Get the ReplicaGroup by name.
 
ReplicaGroup GetReplicaGroup (int groupID)
 Get the ReplicaGroup by ID.
 
ReplicaGroup CreateReplicaGroup (string groupName)
 Create the ReplicaGroup with given name.
 
void RemoveReplicaGroup (string groupName)
 Remove the ReplicaGroup with given name.
 
void CreateReplicaCataGroup (string hostName, int port, string dbpath, BsonDocument configure)
 Create the Replica Catalog Group with given options.
 
ReplicaGroup ActivateReplicaGroup (string groupName)
 Activate the ReplicaGroup with given name.
 
DataCenter GetDC ()
 Get data center.
 

Static Public Member Functions

static void InitClient (ClientOptions options)
 Initialize the configuration options for client.
 

Properties

IConnection Connection [get]
 Return the connection object.
 
ServerAddress ServerAddr [get, set]
 Return or group the remote server address.
 

Detailed Description

Database operation interfaces of admin.

Constructor & Destructor Documentation

SequoiaDB.Sequoiadb.Sequoiadb ( )
inline

Default Constructor.

Server address "127.0.0.1 : 11810"

SequoiaDB.Sequoiadb.Sequoiadb ( string  connString)
inline

Constructor.

Parameters
connStringRemote server address "IP : Port" or "IP"(port is 11810)
SequoiaDB.Sequoiadb.Sequoiadb ( List< string >  connStrings)
inline

Constructor.

Parameters
connStringsRemote server addresses "IP : Port"
SequoiaDB.Sequoiadb.Sequoiadb ( string  host,
int  port 
)
inline

Constructor.

Parameters
addrIP address
portPort

Member Function Documentation

ReplicaGroup SequoiaDB.Sequoiadb.ActivateReplicaGroup ( string  groupName)
inline

Activate the ReplicaGroup with given name.

Parameters
groupNameThe group name
Returns
The ReplicaGroup has been activated if succeed or null if fail
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.BackupOffline ( BsonDocument  options)
inline

Backup the whole database or specifed replica group.

Parameters
optionsContains 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}
  • GroupName : The replica groups which to be backuped
  • Path : The backup path, if not assign, use the backup path assigned in configuration file
  • Name : The name for the backup
  • 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
Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.CancelTask ( long  taskIDs,
bool  isAsync 
)
inline

Cancel the specified task.

Parameters
taskIDThe task id
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.ChangeConnectionOptions ( ConfigOptions  opts)
inline

Change the connection options.

Returns
void
Parameters
optsThe connection options
Exceptions
System.Exception
void SequoiaDB.Sequoiadb.CloseAllCursors ( )
inline

Close all the cursors created in current connection, we can't use those cursors to get data from db engine again, but, there are some data cache in local.

Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.Connect ( )
inline

Connect to remote Sequoiadb database server.

Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.Connect ( string  username,
string  password 
)
inline

Connect to remote Sequoiadb database server Sequoiadb connection user name Sequoiadb connection password.

Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.Connect ( string  username,
string  password,
ConfigOptions  options 
)
inline

Connect to remote Sequoiadb database server Sequoiadb connection user name Sequoiadb connection password The options for connection.

Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
CollectionSpace SequoiaDB.Sequoiadb.CreateCollectionSpace ( string  csName)
inline

Create the named collection space with default SDB_PAGESIZE_64K.

Parameters
csNameThe collection space name
Returns
The collection space handle
Exceptions
SequoiaDB.BaseException
System.Exception
CollectionSpace SequoiaDB.Sequoiadb.CreateCollectionSpace ( string  csName,
int  pageSize 
)
inline

Create the named collection space.

Parameters
csNameThe collection space name
pageSizeThe Page Size as below
  SDB_PAGESIZE_4K
  SDB_PAGESIZE_8K
  SDB_PAGESIZE_16K
  SDB_PAGESIZE_32K
  SDB_PAGESIZE_64K
  SDB_PAGESIZE_DEFAULT
Returns
The collection space handle
Exceptions
SequoiaDB.BaseException
System.Exception
CollectionSpace SequoiaDB.Sequoiadb.CreateCollectionSpace ( string  csName,
BsonDocument  options 
)
inline

Create the named collection space.

Parameters
csNameThe collection space name
optionsThe 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
Returns
The collection space handle
Exceptions
SequoiaDB.BaseException
System.Exception
Domain SequoiaDB.Sequoiadb.CreateDomain ( string  domainName,
BsonDocument  options 
)
inline

Create a domain.

Parameters
domainNameThe name of the domain
optionsThe options for the domain. The options are as below:
Group:     the list of replica groups' names which the domain is going to contain.
           eg: { "Group": [ "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" }
Returns
The created Domain instance
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.CreateReplicaCataGroup ( string  hostName,
int  port,
string  dbpath,
BsonDocument  configure 
)
inline

Create the Replica Catalog Group with given options.

Parameters
hostNameThe host name
portThe port
dbpathThe database path
configureThe configure options
Exceptions
SequoiaDB.BaseException
System.Exception
ReplicaGroup SequoiaDB.Sequoiadb.CreateReplicaGroup ( string  groupName)
inline

Create the ReplicaGroup with given name.

Parameters
groupNameThe group name
Returns
The ReplicaGroup has been created succefully
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.CreateUser ( string  username,
string  password 
)
inline

Add an user in current database Sequoiadb connection user name Sequoiadb connection password.

Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
SequoiaDB.Sequoiadb.Disconnect ( )
inline

Disconnect the remote server.

Returns
void
Exceptions
System.Exception
void SequoiaDB.Sequoiadb.DropCollectionSpace ( string  csName)
inline

Remove the named collection space.

Parameters
csNameThe collection space name
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.DropDomain ( string  domainName)
inline

Drop a domain.

Parameters
domainNameThe name of the domain
Returns
The created Domain instance
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.Exec ( string  sql)
inline

Executing SQL command.

Parameters
sqlSQL command
Returns
The DBCursor of matching documents or null
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.ExecUpdate ( string  sql)
inline

Executing SQL command for updating.

Parameters
sqlSQL command
Exceptions
SequoiaDB.BaseException
System.Exception
CollectionSpace SequoiaDB.Sequoiadb.GetCollecitonSpace ( string  csName)
inline

Get the named collection space.

Parameters
csNameThe collection space name
Returns
The CollecionSpace handle
Note
If collection space not exit, throw BaseException
Exceptions
SequoiaDB.BaseException
System.Exception
DataCenter SequoiaDB.Sequoiadb.GetDC ( )
inline

Get data center.

Returns
The ReplicaGroup has been activated if succeed or null if fail
Exceptions
SequoiaDB.BaseException
System.Exception
Domain SequoiaDB.Sequoiadb.GetDomain ( string  domainName)
inline

Get the specified domain.

Parameters
domainNameThe name of the domain
Returns
The created Domain instance
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.GetList ( int  listType)
inline

Get the informations of specified type.

Parameters
listTypeThe specified type as below:
SDBConst.SDB_LIST_CONTEXTS
SDBConst.SDB_LIST_CONTEXTS_CURRENT
SDBConst.SDB_LIST_SESSIONS
SDBConst.SDB_LIST_SESSIONS_CURRENT
SDBConst.SDB_LIST_COLLECTIONS
SDBConst.SDB_LIST_COLLECTIONSPACES
SDBConst.SDB_LIST_STORAGEUNITS
SDBConst.SDB_LIST_GROUPS
SDBConst.SDB_LIST_STOREPROCEDURES
SDBConst.SDB_LIST_DOMAINS
SDBConst.SDB_LIST_TASKS
SDBConst.SDB_LIST_TRANSACTIONS
SDBConst.SDB_LIST_TRANSACTIONS_CURRENT
SDBConst.SDB_LIST_USERS
Returns
A DBCursor of all the fitted objects or null
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.GetList ( int  listType,
BsonDocument  matcher,
BsonDocument  selector,
BsonDocument  orderBy 
)
inline

Get the informations of specified type.

Parameters
listTypeThe specified type as below:
SDBConst.SDB_LIST_CONTEXTS
SDBConst.SDB_LIST_CONTEXTS_CURRENT
SDBConst.SDB_LIST_SESSIONS
SDBConst.SDB_LIST_SESSIONS_CURRENT
SDBConst.SDB_LIST_COLLECTIONS
SDBConst.SDB_LIST_COLLECTIONSPACES
SDBConst.SDB_LIST_STORAGEUNITS
SDBConst.SDB_LIST_GROUPS
SDBConst.SDB_LIST_STOREPROCEDURES
SDBConst.SDB_LIST_DOMAINS
SDBConst.SDB_LIST_TASKS
SDBConst.SDB_LIST_TRANSACTIONS
SDBConst.SDB_LIST_TRANSACTIONS_CURRENT
SDBConst.SDB_LIST_USERS
matcherThe matching condition or null
selectorThe selective rule or null
orderByThe ordered rule or null
Returns
A DBCursor of all the fitted objects or null
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.GetList ( int  listType,
BsonDocument  matcher,
BsonDocument  selector,
BsonDocument  orderBy,
BsonDocument  hint,
long  skipRows,
long  returnRows 
)
inline

Get the informations of specified type.

Parameters
listTypeThe specified type as below:
SDBConst.SDB_LIST_CONTEXTS
SDBConst.SDB_LIST_CONTEXTS_CURRENT
SDBConst.SDB_LIST_SESSIONS
SDBConst.SDB_LIST_SESSIONS_CURRENT
SDBConst.SDB_LIST_COLLECTIONS
SDBConst.SDB_LIST_COLLECTIONSPACES
SDBConst.SDB_LIST_STORAGEUNITS
SDBConst.SDB_LIST_GROUPS
SDBConst.SDB_LIST_STOREPROCEDURES
SDBConst.SDB_LIST_DOMAINS
SDBConst.SDB_LIST_TASKS
SDBConst.SDB_LIST_TRANSACTIONS
SDBConst.SDB_LIST_TRANSACTIONS_CURRENT
SDBConst.SDB_LIST_USERS
matcherThe matching condition or null
selectorThe selective rule or null
orderByThe ordered rule or null
hintThe options provided for specific list type. Reserved
skipRowsSkip the first skipRows documents
returnRowsOnly return returnRows documents. -1 means return all matched results
Returns
A DBCursor of all the fitted objects or null
Exceptions
SequoiaDB.BaseException
System.Exception
ReplicaGroup SequoiaDB.Sequoiadb.GetReplicaGroup ( string  groupName)
inline

Get the ReplicaGroup by name.

Parameters
groupNameThe group name
Returns
The fitted ReplicaGroup or null
Exceptions
SequoiaDB.BaseException
System.Exception
ReplicaGroup SequoiaDB.Sequoiadb.GetReplicaGroup ( int  groupID)
inline

Get the ReplicaGroup by ID.

Parameters
groupIDThe group ID
Returns
The fitted ReplicaGroup or null
Exceptions
SequoiaDB.BaseException
System.Exception
BsonDocument SequoiaDB.Sequoiadb.GetSessionAttr ( )
inline

Get the attributes of the session.

Returns
BsonDocument or null while no session attributes returned
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.GetSnapshot ( int  snapType,
BsonDocument  matcher,
BsonDocument  selector,
BsonDocument  orderBy 
)
inline

Get the snapshots of specified type.

Parameters
snapTypeThe specified type as below:
SDBConst.SDB_SNAP_CONTEXTS
SDBConst.SDB_SNAP_CONTEXTS_CURRENT
SDBConst.SDB_SNAP_SESSIONS
SDBConst.SDB_SNAP_SESSIONS_CURRENT
SDBConst.SDB_SNAP_COLLECTIONS
SDBConst.SDB_SNAP_COLLECTIONSPACES
SDBConst.SDB_SNAP_DATABASE
SDBConst.SDB_SNAP_SYSTEM
SDBConst.SDB_SNAP_CATALOG
SDBConst.SDB_SNAP_TRANSACTIONS
SDBConst.SDB_SNAP_TRANSACTIONS_CURRENT
matcherThe matching condition or null
selectorThe selective rule or null
orderByThe ordered rule or null
Returns
A DBCursor of all the fitted objects or null
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.GetSnapshot ( int  snapType,
BsonDocument  matcher,
BsonDocument  selector,
BsonDocument  orderBy,
BsonDocument  hint,
long  skipRows,
long  returnRows 
)
inline

Get the snapshots of specified type.

Parameters
snapTypeThe specified type as below:
SDBConst.SDB_SNAP_CONTEXTS
SDBConst.SDB_SNAP_CONTEXTS_CURRENT
SDBConst.SDB_SNAP_SESSIONS
SDBConst.SDB_SNAP_SESSIONS_CURRENT
SDBConst.SDB_SNAP_COLLECTIONS
SDBConst.SDB_SNAP_COLLECTIONSPACES
SDBConst.SDB_SNAP_DATABASE
SDBConst.SDB_SNAP_SYSTEM
SDBConst.SDB_SNAP_CATALOG
SDBConst.SDB_SNAP_TRANSACTIONS
SDBConst.SDB_SNAP_TRANSACTIONS_CURRENT
matcherThe matching condition or null
selectorThe selective rule or null
orderByThe ordered rule or null
hintReserved
skipRowsReserved
returnRowsReserved
Returns
A DBCursor of all the fitted objects or null
Exceptions
SequoiaDB.BaseException
System.Exception
SequoiaDB.Sequoiadb.InitClient ( ClientOptions  options)
inlinestatic

Initialize the configuration options for client.

Parameters
optionsThe configuration options for client
bool SequoiaDB.Sequoiadb.IsCollectionSpaceExist ( string  csName)
inline

Verify the existence of collection space.

Parameters
csNameThe collecion space name
Returns
True if existed or False if not existed
Exceptions
SequoiaDB.BaseException
System.Exception
bool SequoiaDB.Sequoiadb.IsDomainExist ( string  dmName)
inline

Verify the existence of domain in current database.

Parameters
dmNameThe domain name
Returns
True if collection existed or False if not existed
Exceptions
SequoiaDB.BaseException
System.Exception
bool SequoiaDB.Sequoiadb.IsValid ( )
inline

Judge wether the connection is is valid or not.

Returns
If the connection is valid, return true
DBCursor SequoiaDB.Sequoiadb.ListBackup ( BsonDocument  options,
BsonDocument  matcher,
BsonDocument  selector,
BsonDocument  orderBy 
)
inline

List the backups.

Parameters
optionsContains 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 asigned 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.
matcherThe matching rule, return all the documents if null
selectorThe selective rule, return the whole document if null
orderByThe ordered rule, never sort if null
Returns
the DBCursor of the backup or null while having no backup infonation
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.ListCollections ( )
inline

List all the collecion space.

Returns
A DBCursor of all the collection or null
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.ListCollectionSpaces ( )
inline

List all the collecion space.

Returns
A DBCursor of all the collection space or null
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.ListDomains ( BsonDocument  matcher,
BsonDocument  selector,
BsonDocument  orderBy,
BsonDocument  hint 
)
inline

List domains.

Parameters
matcherThe matching rule, return all the documents if null
selectorThe selective rule, return the whole document if null
orderByThe ordered rule, never sort if null
hintSpecified 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 null, database automatically match the optimal index to scan data.
Returns
the cursor of the result.
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.ListReplicaGroups ( )
inline

Get all the groups.

Returns
A cursor of all the groups
Exceptions
SequoiaDB.BaseException
System.Exception
DBCursor SequoiaDB.Sequoiadb.ListTasks ( BsonDocument  matcher,
BsonDocument  selector,
BsonDocument  orderBy,
BsonDocument  hint 
)
inline

List the tasks.

Parameters
matcherThe matching rule, return all the documents if null
selectorThe selective rule, return the whole document if null
orderByThe ordered rule, never sort if null
hintSpecified 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 null, database automatically match the optimal index to scan data.
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.RemoveBackup ( BsonDocument  options)
inline

Remove the backups.

Parameters
optionsContains configuration information 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 asigned 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.
Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
ReplicaGroup SequoiaDB.Sequoiadb.RemoveReplicaGroup ( string  groupName)
inline

Remove the ReplicaGroup with given name.

Parameters
groupNameThe group name
Exceptions
SequoiaDB.BaseException
System.Exception
Note
We can't remove a replica group which has data
void SequoiaDB.Sequoiadb.RemoveUser ( string  username,
string  password 
)
inline

Remove the user from current database Sequoiadb connection user name Sequoiadb connection password.

Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.ResetSnapshot ( BsonDocument  matcher)
inline

Reset the snapshot.

Parameters
matcherThe 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, ...
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.SetSessionAttr ( BsonDocument  options)
inline

Set the attributes of the session.

Parameters
optionsThe 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 }.
Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.TransactionBegin ( )
inline

Begin the database transaction.

Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.TransactionCommit ( )
inline

Commit the database transaction.

Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.TransactionRollback ( )
inline

Rollback the database transaction.

Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.Sequoiadb.WaitTasks ( List< long >  taskIDs)
inline

Wait the tasks to finish.

Parameters
taskIDsThe list of task id
Exceptions
SequoiaDB.BaseException
System.Exception

Property Documentation

SequoiaDB.Sequoiadb.Connection
get

Return the connection object.

Returns
The Connection
SequoiaDB.Sequoiadb.ServerAddr
getset

Return or group the remote server address.

Returns
The ServerAddress

The documentation for this class was generated from the following file: