Public Member Functions | |
alter (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::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: