SequoiaDB
 All Classes Files Functions
Public Member Functions | List of all members
SequoiaDB Class Reference
Inheritance diagram for SequoiaDB:
SecureSdb

Public Member Functions

 __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
 

Member Function Documentation

SequoiaDB::__construct ( string  $hostName = NULL,
string  $userName = NULL,
string  $password = NULL 
)

creates a new database connection object

Parameters
[in]$hostNameOptional parameter,The Host Name or IP Address and The Service Name or Port of Database Server
[in]$userNameif registered user, need to enter user name and password
[in]$passwordif registered user, need to enter user name and password
Return values
anew database connection object
array string SequoiaDB::connect ( string  $hostName,
string  $userName = NULL,
string  $password = NULL 
)

Connect to database.

Parameters
[in]$hostNameOptional parameter,The Host Name or IP Address and the Service Name or Port of Database Server
[in]$userNameif registered user, need to enter user name and password
[in]$passwordif registered user, need to enter user name and password
Return values
Returnsthe database response
array string SequoiaDB::createCataGroup ( string  $hostname,
string  $serviceName,
string  $databasePath,
array|string  $config 
)

create cata group

Parameters
[in]$hostnamecata group host name
[in]$serviceNamecata group service name
[in]$databasePathcata group path
[in]$configcata group create config
Return values
Returnsthe database response
array string SequoiaDB::dropCollectionSpace ( string  $name)

drop a collection Space

Parameters
[in]$nameThe collection Space name
Return values
Returnsthe database response
SequoiaCursor SequoiaDB::execSQL ( string  $sql)

execute of SQL code

Parameters
[in]$sqlsql code
Return values
anew cursor object
array string SequoiaDB::execUpdateSQL ( string  $sql)

execute of SQL code

Parameters
[in]$sqlsql code
Return values
executeresult
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]$listTypeThe 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]$conditionThe matching rule, match all the documents if null
[in]$selectThe selective rule, return the whole document if null
[in]$orderByThe ordered rule, never sort if null
Return values
anew cursor object
SequoiaCursor SequoiaDB::getSnapshot ( int  $snapType,
array|string  $condition = NULL,
array|string  $select = NULL,
array|string  $orderBy = NULL 
)

Get the snapshot.

Parameters
[in]$snapTypeThe 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]$conditionThe matching rule, match all the documents if null
[in]$selectThe selective rule, return the whole document if null
[in]$orderByThe ordered rule, never sort if null
Return values
anew cursor object
void SequoiaDB::install ( array|string  $install)

set function, "install" default is true, output array, set false, output string

Parameters
[in]$installThe Array or json, key is "install"
SequoiaCursor SequoiaDB::listCollections ( void  )

Lists all of the collection.

Return values
anew cursor object
SequoiaCursor SequoiaDB::listCSs ( void  )

Lists all of the collection space.

Return values
anew cursor object
array string SequoiaDB::resetSnapshot ( void  )

Reset the snapshot.

Return values
Returnsthe database response
SequoiadbCS SequoiaDB::selectCS ( string  $name,
int  $pageSize = 4096 
)

Gets a collection Space, if is not exist,will auto create.

Parameters
[in]$nameThe collection Space name
[in]$pageSizecreate collection space, set page size,input 4096,8192,16384,32768,65536
Return values
anew collection space object
SequoiaGroup SequoiaDB::selectGroup ( string  $name)

Gets group object.

Parameters
[in]$nameThe group name
Return values
anew group object

The documentation for this class was generated from the following file: