Database operation interfaces of domain.
More...
#include <client.hpp>
Database operation interfaces of domain.
INT32 sdbclient::sdbDomain::addGroups |
( |
const bson::BSONObj & |
options | ) |
|
|
inline |
Add groups into the current domain.
- Parameters
-
[in] | options | The options user wants to alter Groups: The list of replica groups' names to be added into the domain.
eg: { "Groups": [ "group1", "group2", "group3" ] }, it means that domain
changes to add "group1" "group2" or "group3".
|
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbDomain::alterDomain |
( |
const bson::BSONObj & |
options | ) |
|
|
inline |
Alter the current domain.
- Parameters
-
[in] | options | The options user wants to alter Groups: The list of replica groups' names which the domain is going to contain.
eg: { "Groups": [ "group1", "group2", "group3" ] }, it means that domain
changes to contain "group1" "group2" or "group3".
We can add or remove groups in current domain. However, if a group has data
in it, remove it out of domain will be failing.
AutoSplit: Alter current domain to have the ability of automatically split or not.
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" }
|
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
const CHAR * sdbclient::sdbDomain::getName |
( |
| ) |
|
|
inline |
Get the name of current domain.
- Return values
-
The | name of current domain or null if fail |
INT32 sdbclient::sdbDomain::listCollectionsInDomain |
( |
sdbCursor & |
cursor | ) |
|
|
inline |
List all the collections in current domain.
- Parameters
-
[in] | cHandle | The domain handle |
[out] | cursor | The sdbCursor object of result |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbDomain::listCollectionSpacesInDomain |
( |
sdbCursor & |
cursor | ) |
|
|
inline |
List all the collection spaces in current domain.
- Parameters
-
[in] | cHandle | The domain handle |
[out] | cursor | The sdbCursor object of result |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbDomain::listReplicaGroupInDomain |
( |
sdbCursor & |
cursor | ) |
|
|
inline |
List all the replicagroup in current domain.
- Parameters
-
[out] | cursor | The curosr reference of the result |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbDomain::removeGroups |
( |
const bson::BSONObj & |
options | ) |
|
|
inline |
Remove groups from the current domain.
- Parameters
-
[in] | options | The options user wants to alter Groups: The list of replica groups' names which the domain is going to remove.
eg: { "Groups": [ "group1", "group2", "group3" ] }, it means that domain
changes to remove "group1" "group2" or "group3".
If a group has data in it, remove it out of domain will be failing.
|
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbDomain::setAttributes |
( |
const bson::BSONObj & |
options | ) |
|
|
inline |
Alter the current domain.
- Parameters
-
[in] | options | The options user wants to alter Groups: The list of replica groups' names which the domain is going to contain.
eg: { "Groups": [ "group1", "group2", "group3" ] }, it means that domain
changes to contain "group1" "group2" or "group3".
We can add or remove groups in current domain. However, if a group has data
in it, remove it out of domain will be failing.
AutoSplit: Alter current domain to have the ability of automatically split or not.
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" }
|
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbDomain::setGroups |
( |
const bson::BSONObj & |
options | ) |
|
|
inline |
Set the groups of the current domain.
- Parameters
-
[in] | options | The options user wants to alter Groups: The list of replica groups' names which the domain is going to contain.
eg: { "Groups": [ "group1", "group2", "group3" ] }, it means that domain
changes to contain "group1" "group2" or "group3".
We can add or remove groups in current domain. However, if a group has data
in it, remove it out of domain will be failing.
|
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
sdbclient::sdbDomain::pDomain |
A pointer of virtual base class _sdbDomain
Class sdbDomain is a shell for _sdbDomain. We use pDomain to call the methods in class _sdbDomain.
The documentation for this class was generated from the following file: