|
| __construct (string $hostName=NULL, string $userName=NULL, string $password=NULL) |
| creates a new database connection object
|
|
void | install (array|string $install) |
| set function, "install" default is true, output array, set false, output string
|
|
array string | getError (void) |
| When function return type is "array|string", the return content contains the error code,.
|
|
array string | connect (string $hostName, string $userName=NULL, string $password=NULL) |
| Connect to database.
|
|
void | close (void) |
| Disconnect to database.
|
|
SequoiaCursor | execSQL (string $sql) |
| execute of SQL code
|
|
array string | execUpdateSQL (string $sql) |
| execute of SQL code
|
|
SequoiaCursor | getSnapshot (int $snapType, array|string $condition=NULL, array|string $select=NULL, array|string $orderBy=NULL) |
| Get the snapshot.
|
|
SequoiaCursor | getList (int $listType, array|string $condition=NULL, array|string $select=NULL, array|string $orderBy=NULL) |
| Get the specified list.
|
|
SequoiaGroup | selectGroup (string $name) |
| Gets group object.
|
|
array string | resetSnapshot (void) |
| Reset the snapshot.
|
|
SequoiadbCS | selectCS (string $name, int $pageSize=4096) |
| Gets a collection Space, if is not exist,will auto create.
|
|
SequoiaCursor | listCSs (void) |
| Lists all of the collection space.
|
|
SequoiaCursor | listCollections (void) |
| Lists all of the collection.
|
|
array string | createCataGroup (string $hostname, string $serviceName, string $databasePath, array|string $config) |
| create cata group
|
|
array string | dropCollectionSpace (string $name) |
| drop a collection Space
|
|
SequoiaDB::__construct |
( |
string |
$hostName = NULL , |
|
|
string |
$userName = NULL , |
|
|
string |
$password = NULL |
|
) |
| |
creates a new database connection object
- Parameters
-
[in] | $hostName | Optional parameter,The Host Name or IP Address and The Service Name or Port of Database Server |
[in] | $userName | if registered user, need to enter user name and password |
[in] | $password | if registered user, need to enter user name and password |
- Return values
-
a | new database connection object |
array string SequoiaDB::connect |
( |
string |
$hostName, |
|
|
string |
$userName = NULL , |
|
|
string |
$password = NULL |
|
) |
| |
Connect to database.
- Parameters
-
[in] | $hostName | Optional parameter,The Host Name or IP Address and the Service Name or Port of Database Server |
[in] | $userName | if registered user, need to enter user name and password |
[in] | $password | if registered user, need to enter user name and password |
- Return values
-
Returns | the database response |
array string SequoiaDB::createCataGroup |
( |
string |
$hostname, |
|
|
string |
$serviceName, |
|
|
string |
$databasePath, |
|
|
array|string |
$config |
|
) |
| |
create cata group
- Parameters
-
[in] | $hostname | cata group host name |
[in] | $serviceName | cata group service name |
[in] | $databasePath | cata group path |
[in] | $config | cata group create config |
- Return values
-
Returns | the database response |
array string SequoiaDB::dropCollectionSpace |
( |
string |
$name | ) |
|
drop a collection Space
- Parameters
-
[in] | $name | The collection Space name |
- Return values
-
Returns | the database response |
execute of SQL code
- Parameters
-
- Return values
-
array string SequoiaDB::execUpdateSQL |
( |
string |
$sql | ) |
|
execute of SQL code
- Parameters
-
- Return values
-
array string SequoiaDB::getError |
( |
void |
| ) |
|
When function return type is "array|string", the return content contains the error code,.
but a small part of function does not return an error code, So you can call getError() to retrieve the error code,
SequoiaCursor SequoiaDB::getList |
( |
int |
$listType, |
|
|
array|string |
$condition = NULL , |
|
|
array|string |
$select = NULL , |
|
|
array|string |
$orderBy = NULL |
|
) |
| |
Get the specified list.
- Parameters
-
[in] | $listType | The list type as below SDB_LIST_CONTEXTS: Get all the contexts' list
SDB_LIST_CONTEXTS_CURRENT: Get the current context's list
SDB_LIST_SESSIONS: Get all the sessions' list
SDB_LIST_SESSIONS_CURRENT: Get the current session's list
SDB_LIST_COLLECTIONS: Get all the collections' list
SDB_LIST_COLLECTIONSPACES: Get all the collecion spaces' list
SDB_LIST_STORAGEUNITS: Get all the storage units' list
SDB_LIST_GROUPS:Get all the group list
|
[in] | $condition | The matching rule, match all the documents if null |
[in] | $select | The selective rule, return the whole document if null |
[in] | $orderBy | The ordered rule, never sort if null |
- Return values
-
SequoiaCursor SequoiaDB::getSnapshot |
( |
int |
$snapType, |
|
|
array|string |
$condition = NULL , |
|
|
array|string |
$select = NULL , |
|
|
array|string |
$orderBy = NULL |
|
) |
| |
Get the snapshot.
- Parameters
-
[in] | $snapType | The snapshot type as below SDB_SNAP_CONTEXTS: Get all the contexts' snapshot
SDB_SNAP_CONTEXTS_CURRENT: Get the current context's snapshot
SDB_SNAP_SESSIONS: Get all the sessions' snapshot
SDB_SNAP_SESSIONS_CURRENT: Get the current session's snapshot
SDB_SNAP_COLLECTION:Get all collection's snapshot
SDB_SNAP_COLLECTIONSPACE:Get all collection space snapshot
SDB_SNAP_DATABASE: Get the database's snapshot
SDB_SNAP_SYSTEM:Get the system's snapshot
SDB_SNAP_CATALOG:Get the group's snapshot
|
[in] | $condition | The matching rule, match all the documents if null |
[in] | $select | The selective rule, return the whole document if null |
[in] | $orderBy | The ordered rule, never sort if null |
- Return values
-
void SequoiaDB::install |
( |
array|string |
$install | ) |
|
set function, "install" default is true, output array, set false, output string
- Parameters
-
[in] | $install | The Array or json, key is "install" |
Lists all of the collection.
- Return values
-
Lists all of the collection space.
- Return values
-
array string SequoiaDB::resetSnapshot |
( |
void |
| ) |
|
Reset the snapshot.
- Return values
-
Returns | the database response |
SequoiadbCS SequoiaDB::selectCS |
( |
string |
$name, |
|
|
int |
$pageSize = 4096 |
|
) |
| |
Gets a collection Space, if is not exist,will auto create.
- Parameters
-
[in] | $name | The collection Space name |
[in] | $pageSize | create collection space, set page size,input 4096,8192,16384,32768,65536 |
- Return values
-
a | new collection space object |
Gets group object.
- Parameters
-
- Return values
-
The documentation for this class was generated from the following file:
- /opt/jenkins/workspace/sequoiadb_x86_rocksdb_compile/sequoiadb/driver/php5/ext/sequoiadb.h