Public Member Functions | |
drop () | |
getName () | |
selectCL (string $name, array|string $options=null) | |
createCL (string $name, array|string $options=null) | |
getCL (string $name) | |
dropCL (string $name) | |
selectCollection (string $name, array|string $options=NULL) | |
dropCollection (string $name) | |
SequoiaCS Class. To get this Class object must be call SequoiaDB::selectCS or SequoiaDB::getCS.
Class for create an object of the collection space
SequoiaCS::createCL | ( | string | $name, |
array|string | $options = null |
||
) |
Create the specified collection.
$name | the string argument. The collection name. |
$options | an array or the string argument. The options specified by use. e.g. array( 'Compressed' => true )
ShardingKey : The partition key.
ShardingType : The partition type.
Partition : Number of partitions, ShardingType is 'hash', represented the number of hash partitions, its value must be a power of 2, range [ 2^3, 2^20 ], default 1024.
ReplSize : Copy write by default number is 1.
Compressed : Data compression, default false.
CompressionType : Types of compression, default 'snappy'.
IsMainCL : Main partition, default false.
AutoSplit : Automatic split, defualt true.
Group : To create a replication group.
AutoIndexId : Collection is automatically created using the _id field is called '$id' a unique index, default true.
EnsureShardingIndex : Collection is automatically created using the ShardingKey contains the field names for the '$shard' index, default true.
|
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
SequoiaCS::drop | ( | ) |
Drop collection space.
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
SequoiaCS::dropCL | ( | string | $name | ) |
Drop the specified collection.
$name | the string argument. The collection name. |
array | array( 'errno' => 0 ) |
string | { "errno": 0 } |
Example:
SequoiaCS::dropCollection | ( | string | $name | ) |
Drop the specified collection.
SequoiaCS::getCL | ( | string | $name | ) |
Get the specified collection.
$name | the string argument. The collection name. |
SequoiaCL | Object |
Example:
SequoiaCS::getName | ( | ) |
Get the specified collection space name.
string | <cs_name> |
Example:
SequoiaCS::selectCL | ( | string | $name, |
array|string | $options = null |
||
) |
Get the specified collection, if is not exist, will auto create.
$name | the string argument. The collection name. |
$options | an array or the string argument. When the collection is created, $options into force. ShardingKey : The partition key.
ShardingType : The partition type.
Partition : Number of partitions, ShardingType is 'hash', represented the number of hash partitions, its value must be a power of 2, range [ 2^3, 2^20 ], default 1024.
ReplSize : Copy write by default number is 1.
Compressed : Data compression, default false.
CompressionType : Types of compression, default 'snappy'.
IsMainCL : Main partition, default false.
AutoSplit : Automatic split, defualt true.
Group : To create a replication group.
AutoIndexId : Collection is automatically created using the _id field is called '$id' a unique index, default true.
EnsureShardingIndex : Collection is automatically created using the ShardingKey contains the field names for the '$shard' index, default true.
|
SequoiaCL | Object |
Example:
SequoiaCS::selectCollection | ( | string | $name, |
array|string | $options = NULL |
||
) |
Get the specified collection, if is not exist,will auto create.