Public Member Functions | |
alter (array|string $options) | |
addGroups (array|string $options) | |
setGroups (array|string $options) | |
removeGroups (array|string $options) | |
setAttributes (array|string $options) | |
listCS (array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null) | |
listCL (array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null) | |
listGroup (array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null) | |
SequoiaDomain Class. To get this Class object must be call SequoiaDB::getDomain.
SequoiaDomain::addGroups | ( | array|string | $options | ) |
Alter the current domain to add groups.
$options | an array or the string argument. The options user wants to alter. Groups: The list of replica group names which the domain is going to add.
eg:
array( 'Groups' => array( 'group1', 'group2', 'group3' ) )
|
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
SequoiaDomain::alter | ( | array|string | $options | ) |
Alter the current domain.
$options | an array or the string argument. The options user wants to alter. Groups: The list of replica group names which the domain is going to contain.
eg:
array( 'Groups' => array( '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 will not automatically split data into those groups which were add into this domain later.
eg:
array( 'Groups' => array( 'group1', 'group2', 'group3' ), 'AutoSplit' => true )
|
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
SequoiaDomain::listCL | ( | array|string | $condition = null , |
array|string | $selector = null , |
||
array|string | $orderBy = null , |
||
array|string | $hint = null |
||
) |
List the collections in domain.
$condition | an array or the string argument. This parameter is reserved and must be null. |
$selector | an array or the string argument. This parameter is reserved and must be null. |
$orderBy | an array or the string argument. This parameter is reserved and must be null. |
$hint | an array or the string argument. This parameter is reserved and must be null. |
SequoiaCursor | Object |
Example:
SequoiaDomain::listCS | ( | array|string | $condition = null , |
array|string | $selector = null , |
||
array|string | $orderBy = null , |
||
array|string | $hint = null |
||
) |
List the collection spaces in domain.
$condition | an array or the string argument. This parameter is reserved and must be null. |
$selector | an array or the string argument. This parameter is reserved and must be null. |
$orderBy | an array or the string argument. This parameter is reserved and must be null. |
$hint | an array or the string argument. This parameter is reserved and must be null. |
SequoiaCursor | Object |
Example:
SequoiaDomain::listGroup | ( | array|string | $condition = null , |
array|string | $selector = null , |
||
array|string | $orderBy = null , |
||
array|string | $hint = null |
||
) |
List the groups in domain.
$condition | an array or the string argument. This parameter is reserved and must be null. |
$selector | an array or the string argument. This parameter is reserved and must be null. |
$orderBy | an array or the string argument. This parameter is reserved and must be null. |
$hint | an array or the string argument. This parameter is reserved and must be null. |
SequoiaCursor | Object |
Example:
SequoiaDomain::removeGroups | ( | array|string | $options | ) |
Alter the current domain to remove groups.
$options | an array or the string argument. The options user wants to alter. Groups: The list of replica group names which the domain is going to remove.
eg:
array( 'Groups' => array( 'group1', 'group2', 'group3' ) )
If a group has data in it, remove it out of domain will be failing.
|
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
SequoiaDomain::setAttributes | ( | array|string | $options | ) |
Alter the current domain.
$options | an array or the string argument. The options user wants to alter. Groups: The list of replica group names which the domain is going to contain.
eg:
array( 'Groups' => array( '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 will not automatically split data into those groups which were add into this domain later.
eg:
array( 'Groups' => array( 'group1', 'group2', 'group3' ), 'AutoSplit' => true )
|
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
SequoiaDomain::setGroups | ( | array|string | $options | ) |
Alter the current domain to set groups.
$options | an array or the string argument. The options user wants to alter. Groups: The list of replica group names which the domain is going to contain.
eg:
array( 'Groups' => array( 'group1', 'group2', '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.
|
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example: