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

Public Member Functions

 __construct (array|string $address, string $userName="", string $password="", boolean $useSSL=false)
 
 install (array|string $options=null)
 
 getLastErrorMsg ()
 
 cleanLastErrorMsg ()
 
 connect (array|string $address="127.0.0.1:11810", string $userName="", string $password="", boolean $useSSL=false)
 
 close ()
 
 isValid ()
 
 syncDB (array|string $options=null)
 
 invalidateCache (array|string $condition=array( 'Global'=> true))
 
 interrupt ()
 
 interruptOperation ()
 
 snapshot (integer $type, array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null, integer $numToSkip=0, integer $numToReturn=-1)
 
 resetSnapshot (array|string $options=null)
 
 list (integer $type, array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null, integer $numToSkip=0, integer $numToReturn=-1)
 
 listCS (array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null)
 
 selectCS (string $name, array|string $options=null)
 
 selectCS (string $name, integer $pageSize=null)
 
 createCS (string $name, array|string $options=null)
 
 getCS (string $name)
 
 dropCS (string $name)
 
 renameCS (string $oldName, string $newName, array|string $options=null)
 
 listCL (array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null)
 
 getCL (string $fullName)
 
 truncate (string $fullName)
 
 listDomain (array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null)
 
 createDomain (string $name, array|string $options=null)
 
 getDomain (string $name)
 
 dropDomain (string $name)
 
 listGroup (array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null)
 
 getGroup (string $name)
 
 createGroup (string $name)
 
 removeGroup (string $name)
 
 createCataGroup (string $hostName, string $serviceName, string $databasePath, array|string $configure=null)
 
 execSQL (string $sql)
 
 execUpdateSQL (string $sql)
 
 createUser (string $userName, string $passwd)
 
 removeUser (string $userName, string $passwd)
 
 flushConfigure (array|string $options)
 
 updateConfig (array|string $configs, array|string $options)
 
 deleteConfig (array|string $configs, array|string $options)
 
 listProcedure (array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null)
 
 createJsProcedure (string $code)
 
 removeProcedure (string $name)
 
 evalJs (string $code)
 
 transactionBegin ()
 
 transactionCommit ()
 
 transactionRollback ()
 
 backup (array|string $options)
 
 listBackup (array|string $options, array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null)
 
 removeBackup (array|string $options)
 
 listTask (array|string $condition=null, array|string $selector=null, array|string $orderBy=null, array|string $hint=null)
 
 waitTask (array|integer|SequoiaInt64 $taskID)
 
 cancelTask (integer|SequoiaInt64 $taskID, boolean $isAsync=true)
 
 setSessionAttr (array|string $options)
 
 getSessionAttr (boolean $useCache=TRUE)
 
 forceSession (integer|SequoiaINT64 $sessionID, array|string $options=null)
 
 analyze (array|string $options=null)
 
 getList (integer $type, array|string $condition=null, array|string $selector=null, array|string $orderBy=null)
 
 getSnapshot (integer $type, array|string $condition=null, array|string $selector=null, array|string $orderBy=null)
 
 selectCS (string $name, integer $pageSize=4096)
 
 listCSs ()
 
 dropCollectionSpace (string $name)
 
 listCollections ()
 
 listDomains ()
 
 selectGroup (string $name)
 
 backupOffline (array|string $options)
 

Public Attributes

const SDB_SNAP_CONTEXTS 0
 
const SDB_SNAP_CONTEXTS_CURRENT 1
 
const SDB_SNAP_SESSIONS 2
 
const SDB_SNAP_SESSIONS_CURRENT 3
 
const SDB_SNAP_COLLECTIONS 4
 
const SDB_SNAP_COLLECTIONSPACES 5
 
const SDB_SNAP_DATABASE 6
 
const SDB_SNAP_SYSTEM 7
 
const SDB_SNAP_CATALOG 8
 
const SDB_SNAP_TRANSACTIONS 9
 
const SDB_SNAP_TRANSACTIONS_CURRENT 10
 
const SDB_SNAP_ACCESSPLANS 11
 
const SDB_SNAP_HEALTH 12
 
const SDB_SNAP_CONFIGS 13
 
const SDB_SNAP_SVCTASKS 14
 
const SDB_SNAP_SEQUENCES 15
 
const SDB_SNAP_QUERIES 18
 
const SDB_SNAP_LATCHWAITS 19
 
const SDB_SNAP_LOCKWAITS 20
 
const SDB_SNAP_INDEXSTATS 21
 
const SDB_SNAP_COLLECTION 4
 
const SDB_SNAP_COLLECTIONSPACE 5
 
const SDB_SNAP_CATA 8
 
const SDB_SNAP_TRANSACTION 9
 
const SDB_SNAP_TRANSACTION_CURRENT 10
 
const SDB_LIST_CONTEXTS 0
 
const SDB_LIST_CONTEXTS_CURRENT 1
 
const SDB_LIST_SESSIONS 2
 
const SDB_LIST_SESSIONS_CURRENT 3
 
const SDB_LIST_COLLECTIONS 4
 
const SDB_LIST_COLLECTIONSPACES 5
 
const SDB_LIST_STORAGEUNITS 6
 
const SDB_LIST_GROUPS 7
 
const SDB_LIST_STOREPROCEDURES 8
 
const SDB_LIST_DOMAINS 9
 
const SDB_LIST_TASKS 10
 
const SDB_LIST_TRANSACTIONS 11
 
const SDB_LIST_TRANSACTIONS_CURRENT 12
 
const SDB_LIST_SVCTASKS 14
 
const SDB_LIST_SEQUENCES 15
 
const SDB_LIST_USERS 16
 
const SDB_LIST_CL_IN_DOMAIN 129
 
const SDB_LIST_CS_IN_DOMAIN 130
 

Detailed Description

Class for create an object of the db

Constructor & Destructor Documentation

SequoiaDB::__construct ( array|string  $address,
string  $userName = "",
string  $password = "",
boolean  $useSSL = false 
)

SequoiaDB class constructor.

Parameters
$addressan array or the string argument. The Host Name or IP Address and The Service Name or Port of Database Server.
$userNamethe string argument. The User's Name of the account.
$passwordthe string argument. The Password of the account.
$useSSLa boolean argument. Connect to database with ssl.

Example: 1. Using the connect function to connect to the database.

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 2. Connect to the database.

$db = new SequoiaDB( "192.168.1.10:11810" ) ;
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 3. Connect to the database, using the default service name. The default service name is 11810.

$db = new SequoiaDB( "192.168.1.10" ) ;
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 4. Connect to the running database one.

$db = new SequoiaDB( [ "192.168.1.10:11810", "192.168.1.11:11810", "192.168.1.12:11810" ] ) ;
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 5. Connect to the authentication database.

$db = new SequoiaDB( "192.168.1.10:11810", "admin", "123456" ) ;
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 6. Connect to the running authentication database one.

$db = new SequoiaDB( [ "192.168.1.10:11810", "192.168.1.11:11810", "192.168.1.12:11810" ], "admin", "123456" ) ;
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 7. Connect to the database with ssl.

$db = new SequoiaDB( "192.168.1.10:11810", "", "", true ) ;
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database with ssl, error code: ".$err['errno'] ;
return ;
}

Example: 8. Using the connect function to connect to the database with ssl.

$db = new SecureSdb() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database with ssl, error code: ".$err['errno'] ;
return ;
}

Example: 9. Connect to the database with ssl.

$db = new SecureSdb( "192.168.1.10:11810" ) ;
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database with ssl, error code: ".$err['errno'] ;
return ;
}

Member Function Documentation

SequoiaDB::analyze ( array|string  $options = null)

Analyze collection or index to collect statistics information

Parameters
$optionsan array or the string argument. The control options:
CollectionSpace : (String) Specify the collection space to be analyzed.
Collection : (String) Specify the collection to be analyzed.
Index : (String) Specify the index to be analyzed.
Mode : (Int32) Specify the analyze mode (default is 1):
Mode 1 will analyze with data samples.
Mode 2 will analyze with full data.
Mode 3 will generate default statistics.
Mode 4 will reload statistics into memory cache.
Mode 5 will clear statistics from memory cache.
Location Elements : (Only take effect in coordinate nodes) GroupID:INT32, GroupName:String, NodeID:INT32, HostName:String, svcname:String ...
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

  1. Analyze all collections by default.
    $db = new SequoiaDB() ;
    $err = $db -> connect( "192.168.1.10:11810" ) ;
    if( $err['errno'] != 0 ) {
    echo "Failed to connect database, error code: ".$err['errno'] ;
    return ;
    }
    $result = $db -> analyze() ;
    var_dump( $result ) ;
  2. Analyze collection "foo.bar"
    $db = new SequoiaDB() ;
    $err = $db -> connect( "192.168.1.10:11810" ) ;
    if( $err['errno'] != 0 ) {
    echo "Failed to connect database, error code: ".$err['errno'] ;
    return ;
    }
    $result = $db -> analyze( array( 'Collection' => 'foo.bar' ) ) ;
    var_dump( $result ) ;
SequoiaDB::backup ( array|string  $options)

Backup the whole database or specifed replica group.

Parameters
$optionsan array or the string argument. Contains a series of backup configuration infomations. Backup the whole cluster if null. The "options" contains 5 options as below. All the elements in options are optional. e.g.
array( 'GroupName' => array( 'RGName1', 'RGName2' ), 'Path' => '/opt/sequoiadb/backup', 'Name' => 'backupName', 'Description' => 'It is my backup', 'EnsureInc' => true, 'OverWrite' => true )
GroupID : The id(s) of replica group(s) which to be backuped
GroupName : The replica groups which to be backuped
Path : The backup path, if not assign, use the backup path assigned in the configuration file,
the path support to use wildcard(%g/%G:group name, %h/%H:host name, %s/%S:service name).
e.g.
array( 'Path' => '/opt/sequoiadb/backup/%g' )
isSubDir : Whether the path specified by paramer "Path" is a subdirectory of the path specified in the configuration file, default to be false
Name : The name for the backup
Prefix : The prefix of name for the backup, default to be null.
e.g.
array( 'Prefix' => '%g_bk_' )
EnableDateDir : Whether turn on the feature which will create subdirectory named to current date like "YYYY-MM-DD" automatically, default to be false
Description : The description for the backup
EnsureInc : Whether excute increment synchronization, default to be false
OverWrite : Whether overwrite the old backup file, default to be false
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> backup( array( 'Name' => 'myBackup_1' ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call backup, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::backupOffline ( array|string  $options)

Backup the whole database or specifed replica group.

See Also
backup().
Deprecated:
This function is deprecated, use the function backup() instead.
SequoiaDB::cancelTask ( integer|SequoiaInt64  $taskID,
boolean  $isAsync = true 
)

Cancel the specified task.

Parameters
$taskIDan integer argument. The task id.
$isAsynca boolean argument. The operation "cancel task" is async or not, "true" for async, "false" for sync. Default sync.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> cancelTask( 1, false ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call cancelTask, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::cleanLastErrorMsg ( )

Clean the last error object(returned by engine) of current connection.

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 )
{
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::close ( )

Disconnect to database.

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$db -> close() ;
SequoiaDB::connect ( array|string  $address = "127.0.0.1:11810",
string  $userName = "",
string  $password = "",
boolean  $useSSL = false 
)

Connect to database.

Parameters
$addressan array or the string argument. The Host Name or IP Address and The Service Name or Port of Database Server.
$userNamethe string argument. The User's Name of the account.
$passwordthe string argument. The Password of the account.
$useSSLa boolean argument. Connect to database with ssl.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example: 1. Connect to the default address of the database. The default address is 127.0.0.1:11810.

$db = new SequoiaDB() ;
$err = $db -> connect() ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 2. Connect to the database.

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 3. Connect to the database, using the default service name. The default service name is 11810.

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 4. Connect to the running database one.

$db = new SequoiaDB() ;
$err = $db -> connect( [ "192.168.1.10:11810", "192.168.1.11:11810", "192.168.1.12:11810" ] ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 5. Connect to the authentication database.

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810", "admin", "123456" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 6. Connect to the running authentication database one.

$db = new SequoiaDB() ;
$err = $db -> connect( [ "192.168.1.10:11810", "192.168.1.11:11810", "192.168.1.12:11810" ], "admin", "123456" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}

Example: 7. Connect to the database with ssl.

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810", "", "", true ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database with ssl, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::createCataGroup ( string  $hostName,
string  $serviceName,
string  $databasePath,
array|string  $configure = null 
)

Create a catalog replica group.

Parameters
$hostNamethe string argument. The hostname for the catalog replica group.
$serviceNamethe string argument. The servicename for the catalog replica group.
$databasePaththe string argument. The path for the catalog replica group.
$configurethe string argument. The configurations for the catalog replica group.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> createCataGroup( 'host1', '11900', '/opt/sequoiadb/database/catalog/11900' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to create catalog group, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::createCS ( string  $name,
array|string  $options = null 
)

Create the specified collection space.

Parameters
$namethe string argument. The collection space name.
$optionsan array or the string argument. The options specified by use. e.g.
array( 'PageSize' => 4096, 'Domain' => 'myDomain' )
PageSize : Assign the pagesize of the collection space
Domain : Assign which domain does current collection space belong to
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> createCS( 'foo', array( 'PageSize' => 4096 ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call createCS, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::createDomain ( string  $name,
array|string  $options = null 
)

Create a domain.

Parameters
$namethe string argument. The name of the domain.
$optionsan array or the string argument. The options for the domain. The options are as below:
Groups : The list of replica groups names which the domain is going to contain.
eg: array( 'Groups' => array( "group1", "group2", "group3" ) )
If this argument is not included, the domain will contain all replica groups in the cluster.
AutoSplit : 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 not automatically split data into those groups which were add into this domain later.
eg: array( 'Groups' => array( "group1", "group2", "group3" ), 'AutoSplit' => true )
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> createDomain( 'myDomain', array( 'Groups' => array( "group1", "group2", "group3" ), 'AutoSplit' => true ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to create domain, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::createGroup ( string  $name)

Create the specified replica group.

Parameters
$namethe string argument. The name of the replica group.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> createGroup( 'myGroup' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to create group, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::createJsProcedure ( string  $code)

Create a store procedure.

Parameters
$codethe string argument. The code of store procedures.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> createJsProcedure( 'function sum( a,b ){ return a + b ; }' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call createJsProcedure, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::createUser ( string  $userName,
string  $passwd 
)

Create an account.

Parameters
$userNamethe string argument. The user name of the account.
$passwdthe string argument. The password of the account.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> createUser( 'mike', '123456789' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to create user, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::deleteConfig ( array|string  $configs,
array|string  $options 
)

Force the node to delete config from file and take effect.

Parameters
$configsthe specific configuration parameters to delete
$optionsThe control options:(Only take effect in coordinate nodes)
GroupID:INT32,
GroupName:String,
NodeID:INT32,
HostName:String,
svcname:String,
...
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> deleteConfig( '{"diagnum":1}', '{"svcname":"20000"}' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call deleteConfig, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::dropCollectionSpace ( string  $name)

Drop the specified collection space.

See Also
dropCS().
Deprecated:
This function is deprecated, use the function dropCS() instead.
SequoiaDB::dropCS ( string  $name)

Drop the specified collection space.

Parameters
$namethe string argument. The collection space name.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> dropCS( 'foo' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to drop collection space, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::dropDomain ( string  $name)

Drop a domain.

Parameters
$namethe string argument. The name of the domain.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> dropDomain( 'myDomain' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to drop domain, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::evalJs ( string  $code)

Eval javascript code.

Parameters
$codethe string argument. The code to eval.
Returns
Returns javascript return value
Return values
void
string
integer
SequoiaINT64
double
arrayrecord
stringrecord
boolean
SequoiaCursorObject
SequoiaCSObject
SequoiaCLObject
SequoiaGroupObject
SequoiaNodeObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$result = $db -> evalJs( 'sum( 1, 2 );' ) ;
$err = $db -> getLastErrorMsg() ;
if( $err['errno'] != 0 ) ) {
echo "Failed to call evalJs, error code: ".$err['errno'] ;
if( strlen( $result ) > 0 )
{
echo $result ;
}
return ;
}
$type = gettype( $result ) ;
switch( $type )
{
case 'boolean':
case 'integer':
case 'double':
case 'string':
echo "Value is ".$result ;
break ;
case 'array':
echo "Value is " ;
var_dump( $result ) ;
break ;
case 'resource':
$resourceType = get_resource_type( $result ) ;
if( $resourceType == 'SequoiaINT64' )
{
echo "Value is ".$result ;
}
else if( $resourceType == 'SequoiaCS' )
{
echo "Get a collection space object" ;
}
else if( $resourceType == 'SequoiaCL' )
{
echo "Get a collection object" ;
}
else if( $resourceType == 'SequoiaGroup' )
{
echo "Get a group object" ;
}
else if( $resourceType == 'SequoiaNode' )
{
echo "Get a node object" ;
}
else if( $resourceType == 'SequoiaCursor' )
{
while( $record = $result -> next() ) {
var_dump( $record ) ;
}
}
break ;
}
SequoiaDB::execSQL ( string  $sql)

Executing SQL command.

Parameters
$sqlthe string argument. The SQL command.
Returns
Returns a new SequoiaCursor object.
Return values
SequoiaCursorObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cursor = $db -> execSQL( 'select * from foo.bar' ) ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call execSQL, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}
SequoiaDB::execUpdateSQL ( string  $sql)

Executing SQL command for updating.

Parameters
$sqlthe string argument. The SQL command.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> execUpdateSQL( 'create collectionspace foo' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call execUpdateSQL, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::flushConfigure ( array|string  $options)

Flush the options to configure file.

Parameters
$optionsan array or the string argument. The configure infomation. e.g.
array( 'Global' => true )
Global : In cluster environment, passing array( 'Global' => true ) will flush data and catalog configuration file, while passing array( 'Global' => false ) will flush coord configuration file.
In stand-alone environment, both them have the same behaviour.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> flushConfigure( array( 'Global' => true ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call flushConfigure, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::forceSession ( integer|SequoiaINT64  $sessionID,
array|string  $options = null 
)

Interrupte the session.

Parameters
$sessionIDan integer or the SequoiaINT64 Object argument. The id of the session which we want to inerrupt.
$optionsan array or the string argument. The location information, such as NodeID, HostName and svcname. the options are as below:
HostName: Node's HostName.
svcname: Node's svcname.
NodeID: Node ID.
GroupID: Replica group ID.
GroupName: Replica group name.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example: integer type

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> forceSession( 1 ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call forceSession, error code: ".$err['errno'] ;
return ;
}

Example: SequoiaINT64 type

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> forceSession( new SequoiaINT64( '1' ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call forceSession, error code: ".$err['errno'] ;
return ;
}

Example: Force specified node session

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> forceSession( 1, array( "HostName" => "host-01", "svcname" => "11810" ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call forceSession, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::getCL ( string  $fullName)

Get the specified collection.

Parameters
$fullNamethe string argument. The collection full name.
Returns
Returns a new SequoiaCL object.
Return values
SequoiaCLObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cl = $db -> getCL( 'foo.bar' ) ;
if( empty( $cl ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call getCL, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::getCS ( string  $name)

Get the specified collection space.

Parameters
$namethe string argument. The collection space name.
Returns
Returns a new SequoiaCS object.
Return values
SequoiaCSObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cs = $db -> getCS( 'foo' ) ;
if( empty( $cs ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call getCS, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::getDomain ( string  $name)

Get a domain.

Parameters
$namethe string argument. The name of the domain.
Returns
Returns a new SequoiaDomain object.
Return values
SequoiaDomainObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$domainObj = $db -> getDomain( 'myDomain' ) ;
if( empty( $domainObj ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call getDomain, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::getGroup ( string  $name)

Get the specified replica group.

Returns
Returns a new SequoiaGroup object.
Return values
SequoiaGroupObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$groupObj = $db -> getGroup( 'myGroup' ) ;
if( empty( $groupObj ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call getGroup, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::getLastErrorMsg ( )

Get the error object of the previous operation. The error object is not automatically cleared until the next operation.

Returns
Returns the result of the last error message
Return values
arrayerror infomation

If there has an error, it contains the follow fields:

errno: the error number
description: the description of the errno
detail: the error detail
ErrNodes: describes which data nodes have errors, and detailed information about the error
(this field is an expand field, which is only returned when an error occurs on the data node)

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 )
{
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cs = $db -> getCS( "not_exist_cs" ) ;
echo "Get the last error message." ;
$errMsg = $db -> getLastErrorMsg() ;
var_dump( $errMsg ) ;
SequoiaDB::getList ( integer  $type,
array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null 
)

Get the specified list.

See Also
list().
Deprecated:
This function is deprecated, use the function list() instead.
SequoiaDB::getSessionAttr ( boolean  $useCache = TRUE)

Get the attributes of the session.

Parameters
$useCachea boolean argument. Whether to use cache.
Returns
Returns the result, default return array.
Return values
arrayresult
stringresult

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$result = $db -> getSessionAttr() ;
var_dump( $result )
SequoiaDB::getSnapshot ( integer  $type,
array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null 
)

Get the snapshot.

See Also
snapshot().
Deprecated:
This function is deprecated, use the function snapshot() instead.
SequoiaDB::install ( array|string  $options = null)

SequoiaDB class constructor.

Parameters
$optionsan array or the string argument. Set driver options and return the current options. the options are as below:
install: Set the type of return value for all return result function.
The default is true, return an array;
set the false, return the string.
Returns
Returns the current options.
Return values
arrayarray( 'install' => true )
string{ "install": false }

Example: 1. Set to return an array type

$db = new SequoiaDB() ;
$db -> install( array( 'install' => true ) ) ;
$err = $db -> getLastErrorMsg() ;
echo "The result is an array type. " ;
var_dump( $err ) ;
//output: array(1){ ["errno"] => int(0) }

Example: 2. Set to return the string type

$db = new SequoiaDB() ;
$db -> install( array( 'install' => false ) ) ;
$err = $db -> getLastErrorMsg() ;
echo "The result is the string type. " ;
var_dump( $err ) ;
//output: string(14) "{ "errno": 0 }"

Example: 3. Get the driver current options

$db = new SequoiaDB() ;
$options = $db -> install() ;
var_dump( $options ) ;
SequoiaDB::interrupt ( )

Send a "Interrpt" message to engine, as a result, all the cursors and lobs created by current connection will be closed.

Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$result = $db -> interrupt() ;
var_dump( $result ) ;
SequoiaDB::interruptOperation ( )

Send "INTERRUPT_SELF" message to engine to stop the current operation.

Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example: Interrupt query operation

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cl = $db -> getCL( 'foo.bar' ) ;
if( empty( $cl ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call getCL, error code: ".$err['errno'] ;
return ;
}
$cursor = $cl -> find() ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to find, error code: ".$err['errno'] ;
return ;
}
$result = $db -> interruptOperation() ;
var_dump( $result ) ;
SequoiaDB::invalidateCache ( array|string  $condition = array( 'Global' => true ))

Clear node cache.

Parameters
$conditionan array or the string argument . Filter condition:
If the GroupID, GroupName, NodeID, HostName, and svcname fields are set, this field is ignored.
Global : true | false
The default is all groups, the relationship between GroupID and GroupName is or.
GroupID : 1001 | [ 1001, 1002, ... ],
GroupName : "group1" | [ "group1", "group2", ... ]
The default is all nodes in the group, the relationship between GroupID and GroupName is and.
NodeID : 1001 | [ 1001, 1002, ... ]
HostName : "host1" | [ "host1", "host2", ... ]
svcname : "11810" | [ "11810", "11820", ... ]
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

  1. Clear all node cache.
    $db = new SequoiaDB() ;
    $err = $db -> connect( "192.168.1.10:11810" ) ;
    if( $err['errno'] != 0 ) {
    echo "Failed to connect database, error code: ".$err['errno'] ;
    return ;
    }
    $result = $db -> invalidateCache() ;
    var_dump( $result ) ;
  2. Clear specified group cache.
    $db = new SequoiaDB() ;
    $err = $db -> connect( "192.168.1.10:11810" ) ;
    if( $err['errno'] != 0 ) {
    echo "Failed to connect database, error code: ".$err['errno'] ;
    return ;
    }
    $result = $db -> invalidateCache( array( 'GroupName' => 'group1' ) ) ;
    var_dump( $result ) ;
  3. Clear specified node cache.
    $db = new SequoiaDB() ;
    $err = $db -> connect( "192.168.1.10:11810" ) ;
    if( $err['errno'] != 0 ) {
    echo "Failed to connect database, error code: ".$err['errno'] ;
    return ;
    }
    $result = $db -> invalidateCache( array( 'HostName' => 'host1', 'svcname' => '11810' ) ) ;
    var_dump( $result ) ;
SequoiaDB::isValid ( )

Judge whether the connection is valid.

Returns
Returns the result.
Return values
booleanisConnect

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$status = $db -> isValid() ;
echo "Current connection status: ".$status ;
$db -> close() ;
$status = $db -> isValid() ;
echo "Current connection status: ".$status ;
SequoiaDB::list ( integer  $type,
array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null,
array|string  $hint = null,
integer  $numToSkip = 0,
integer  $numToReturn = -1 
)

Get the specified list.

Parameters
$typean integer argument. The list type as below:
$conditionan array or the string argument. The matching rule, match all the documents if null.
$selectoran array or the string argument. The selective rule, return the whole document if null.
$orderByan array or the string argument. The ordered rule, never sort if null.
$hintan array or the string argument. The options provided for specific list type. Reserved.
$numToSkipan integer argument. Skip the first numToSkip records, never skip if this parameter is 0.
$numToReturnan integer argument. Only return numToReturn records, return all if this parameter is -1.
Returns
Returns a new SequoiaCursor object.
Return values
SequoiaCursorObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cursor = $db -> list( SDB_LIST_CONTEXTS ) ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call list, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}
SequoiaDB::listBackup ( array|string  $options,
array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null,
array|string  $hint = null 
)

List the backups.

Parameters
$optionsan array or the string argument. Contains configuration infomations for remove backups, list all the backups in the default backup path if null. The "options" contains 3 options as below. All the elements in options are optional. e.g.
array( 'GroupName' => array( 'RGName1', 'RGName2' ), 'Path' => '/opt/sequoiadb/backup', 'Name' => 'backupName' )
GroupName : Assign the backups of specifed replica groups to be list
Path : Assign the backups in specifed path to be list, if not assign, use the backup path asigned in the configuration file
Name : Assign the backups with specifed name to be list
$conditionan array or the string argument. The matching rule, return all the record if null.
$selectoran array or the string argument. The selective rule, return the whole record if null.
$orderByan array or the string argument. The ordered rule, never sort if null.
$hintan array or the string argument. This parameter is reserved and must be null.
Returns
Returns a new SequoiaCursor object.
Return values
SequoiaCursorObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cursor = $db -> listBackup( array( 'Name' => 'myBackup_1' ) ) ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call listBackup, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}
SequoiaDB::listCL ( array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null,
array|string  $hint = null 
)

List all collection of current database(not include temporary collection of temporary collection space)

Parameters
$conditionan array or the string argument. This parameter is reserved and must be null.
$selectoran array or the string argument. This parameter is reserved and must be null.
$orderByan array or the string argument. This parameter is reserved and must be null.
$hintan array or the string argument. This parameter is reserved and must be null.
Returns
Returns a new SequoiaCursor object.
Return values
SequoiaCursorObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cursor = $db -> listCL() ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call listCL, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}
SequoiaDB::listCollections ( )

List all collection of current database(not include temporary collection of temporary collection space)

See Also
listCL().
Deprecated:
This function is deprecated, use the function listCL() instead.
SequoiaDB::listCS ( array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null,
array|string  $hint = null 
)

List all collection space of current database(include temporary collection space)

Parameters
$conditionan array or the string argument. This parameter is reserved and must be null.
$selectoran array or the string argument. This parameter is reserved and must be null.
$orderByan array or the string argument. This parameter is reserved and must be null.
$hintan array or the string argument. This parameter is reserved and must be null.
Returns
Returns a new SequoiaCursor object.
Return values
SequoiaCursorObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cursor = $db -> listCS() ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call listCS, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}
SequoiaDB::listCSs ( )

Get the specified list.

See Also
listCS().
Deprecated:
This function is deprecated, use the function listCS() instead.
SequoiaDB::listDomain ( array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null,
array|string  $hint = null 
)

List the domain.

Parameters
$conditionan array or the string argument. The matching rule, return all the record if null.
$selectoran array or the string argument. The selective rule, return the whole record if null.
$orderByan array or the string argument. The The ordered rule, never sort if null.
$hintan array or the string argument. This parameter is reserved and must be null.
Returns
Returns a new SequoiaCursor object.
Return values
SequoiaCursorObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cursor = $db -> listDomain() ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call listDomains, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}
SequoiaDB::listDomains ( )

List the domain.

See Also
listDomain().
Deprecated:
This function is deprecated, use the function listDomain() instead.
SequoiaDB::listGroup ( array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null,
array|string  $hint = null 
)

List all the replica groups of current database.

Parameters
$conditionan array or the string argument. This parameter is reserved and must be null.
$selectoran array or the string argument. This parameter is reserved and must be null.
$orderByan array or the string argument. This parameter is reserved and must be null.
$hintan array or the string argument. This parameter is reserved and must be null.
Returns
Returns a new SequoiaCursor object.
Return values
SequoiaCursorObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cursor = $db -> listGroup() ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call listGroup, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}
SequoiaDB::listProcedure ( array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null,
array|string  $hint = null 
)

List store procedures.

Parameters
$conditionan array or the string argument. The condition of list.
$selectoran array or the string argument. This parameter is reserved and must be null.
$orderByan array or the string argument. This parameter is reserved and must be null.
$hintan array or the string argument. This parameter is reserved and must be null.
Returns
Returns a new SequoiaCursor object.
Return values
SequoiaCursorObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cursor = $db -> listProcedure( array( 'name' => 'sum' ) ) ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call listProcedure, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}
SequoiaDB::listTask ( array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null,
array|string  $hint = null 
)

List the tasks.

Parameters
$conditionan array or the string argument. The matching rule, return all the record if null.
$selectoran array or the string argument. The selective rule, return the whole record if null.
$orderByan array or the string argument. The The ordered rule, never sort if null.
$hintan array or the string argument. The hint, automatically match the optimal hint if null.
Returns
Returns a new SequoiaCursor object.
Return values
SequoiaCursorObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cursor = $db -> listTask() ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call listTask, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}
SequoiaDB::removeBackup ( array|string  $options)

Remove the backups.

Parameters
$optionsan array or the string argument. Contains configuration infomations for remove backups, list all the backups in the default backup path if null. The "options" contains 3 options as below. All the elements in options are optional. eg: array( 'GroupName' => array( 'RGName1', 'RGName2' ), 'Path' => '/opt/sequoiadb/backup', 'Name' => 'backupName' )
GroupName : Assign the backups of specifed replica groups to be list
Path : Assign the backups in specifed path to be list, if not assign, use the backup path asigned in the configuration file
Name : Assign the backups with specifed name to be list
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> removeBackup( array( 'Name' => 'myBackup_1' ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to remove backup, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::removeGroup ( string  $name)

Remove the specified replica group.

Parameters
$namethe string argument. The name of the replica group.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> removeGroup( 'myGroup' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to remove group, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::removeProcedure ( string  $name)

Remove a store procedure.

Parameters
$namethe string argument. The name of store procedure.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> removeProcedure( 'sum' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call removeProcedure, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::removeUser ( string  $userName,
string  $passwd 
)

Delete an account.

Parameters
$userNamethe string argument. The user name of the account.
$passwdthe string argument. The password of the account.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> removeUser( 'mike', '123456789' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to remove user, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::renameCS ( string  $oldName,
string  $newName,
array|string  $options = null 
)

Rename collectionSpace

Parameters
$oldNameThe old collection space name
$newNameThe new collection space name
$optionsReserved
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> renameCS( 'foo', 'new_foo' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to rename collection space, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::resetSnapshot ( array|string  $options = null)

Reset the snapshot.

Parameters
$optionsan array or the string argument. The control options:
Type : (String) Specify the snapshot type to be reset (default is "all"):
"sessions"
"sessions current"
"database"
"health"
"all"
SessionID : (Int32) Specify the session ID to be reset.
Other Options : Some of other options are as below:(please visit the official website to search "Location Elements" for more detail.)
GroupID:INT32,
GroupName:String,
NodeID:INT32,
HostName:String,
svcname:String
...
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> resetSnapshot() ;
if( $err['errno'] != 0 ) {
echo "Failed to reset snapshot, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::selectCS ( string  $name,
integer  $pageSize = 4096 
)

Get the specified collection space, if is not exist,will auto create.

Parameters
$namethe string argument. The collection space name.
$pageSizean integer argument. When the collection space is created, $pageSize into force. The $pageSize as below:
4096
8192
16384
32768
65536
Returns
Returns a new SequoiaCS object.
Return values
SequoiaCSObject
Deprecated:
This function is deprecated, use the function selectCS( string $name, array|string $options = NULL ) instead.

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cs = $db -> selectCS( 'foo', 4096 ) ;
if( empty( $cs ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call selectCS, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::selectCS ( string  $name,
array|string  $options = null 
)

Get the specified collection space, if is not exist,will auto create.

Parameters
$namethe string argument. The collection space name.
$optionsan array or the string argument. When the collection space is created, $options into force. The options specified by use. e.g.
array( 'PageSize' => 4096, 'Domain' => 'mydomain' )
PageSize : Assign the pagesize of the collection space
Domain : Assign which domain does current collection space belong to
Returns
Returns a new SequoiaCS object.
Return values
SequoiaCSObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cs = $db -> selectCS( 'foo', array( 'PageSize' => 4096 ) ) ;
if( empty( $cs ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call selectCS, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::selectCS ( string  $name,
integer  $pageSize = null 
)

Get the specified collection space, if is not exist,will auto create.

Parameters
$namethe string argument. The collection space name.
$pageSizean integer argument. Assign the pagesize of the collection space.
Returns
Returns a new SequoiaCS object.
Return values
SequoiaCSObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cs = $db -> selectCS( 'foo', 4096 ) ;
if( empty( $cs ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call selectCS, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::selectGroup ( string  $name)

Get the specified replica group.

See Also
getGroup().
Deprecated:
This function is deprecated, use the function getGroup() instead.
SequoiaDB::setSessionAttr ( array|string  $options)

Set the attributes of the session.

Parameters
$optionsan array or the string argument. The configuration options for session. Please reference here for more detail.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> setSessionAttr( array( 'PreferedInstance' => 'm' ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call setSessionAttr, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::snapshot ( integer  $type,
array|string  $condition = null,
array|string  $selector = null,
array|string  $orderBy = null,
array|string  $hint = null,
integer  $numToSkip = 0,
integer  $numToReturn = -1 
)

Get the snapshot.

Parameters
$typean integer argument. The snapshot type as below:
SDB_SNAP_CONTEXTS : Get the snapshot of all the contexts
SDB_SNAP_CONTEXTS_CURRENT : Get the snapshot of current context
SDB_SNAP_SESSIONS : Get the snapshot of all the sessions
SDB_SNAP_SESSIONS_CURRENT : Get the snapshot of current session
SDB_SNAP_COLLECTIONS : Get the snapshot of all the collections
SDB_SNAP_COLLECTIONSPACES : Get the snapshot of all the collection spaces
SDB_SNAP_DATABASE : Get the snapshot of the database
SDB_SNAP_SYSTEM : Get the snapshot of the system
SDB_SNAP_CATALOG : Get the snapshot of the catalog
SDB_SNAP_TRANSACTIONS : Get the snapshot of transactions
SDB_SNAP_TRANSACTIONS_CURRENT : Get the snapshot of all the transactions in current session
SDB_SNAP_ACCESSPLANS : Get the snapshot of cached access plans
SDB_SNAP_HEALTH : Get the snapshot of node health detection
SDB_SNAP_CONFIGS : Get the snapshot of node configurations
SDB_SNAP_SVCTASKS : Get the snapshot of service tasks
SDB_SNAP_SEQUENCES : Get the snapshot of sequences
SDB_SNAP_QUERIES : Get the snapshot of queries
SDB_SNAP_LATCHWAITS : Get the snapshot of latch waits
SDB_SNAP_LOCKWAITS : Get the snapshot of lock waits
SDB_SNAP_INDEXSTATS : Get the snapshot of index statistics
$conditionan array or the string argument. The matching rule, match all the documents if null.
$selectoran array or the string argument. The selective rule, return the whole document if null.
$orderByan array or the string argument. The ordered rule, never sort if null.
$hintan array or the string argument. The options provided for specific snapshot type. format: array( '$Options' => <options> )
$numToSkipan integer argument. Skip the first numToSkip records, never skip if this parameter is 0.
$numToReturnan integer argument. Only return numToReturn records, return all if this parameter is -1.
Returns
Returns a new SequoiaCursor object.
Return values
SequoiaCursorObject

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cursor = $db -> snapshot( SDB_SNAP_CONTEXTS ) ;
if( empty( $cursor ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call snapshot, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}
SequoiaDB::syncDB ( array|string  $options = null)

Sync database which are specified.

Parameters
$optionsan array or the string argument. The control options:
Deep : (INT32) Flush with deep mode or not. 1 in default. 0 for non-deep mode,1 for deep mode,-1 means use the configuration with server.
Block : (Bool) Flush with block mode or not. false in default.
CollectionSpace : (String) Specify the collectionspace to sync. If not set, will sync all the collectionspaces and logs, otherwise, will only sync the collectionspace specified.
Location Elements : (Only take effect in coordinate nodes) GroupID:INT32, GroupName:String, NodeID:INT32, HostName:String, svcname:String ...
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

  1. Deep persistence for all collections and logs.
    $db = new SequoiaDB() ;
    $err = $db -> connect( "192.168.1.10:11810" ) ;
    if( $err['errno'] != 0 ) {
    echo "Failed to connect database, error code: ".$err['errno'] ;
    return ;
    }
    $result = $db -> syncDB() ;
    var_dump( $result ) ;
  2. Deep persistence for collection space foo.
    $db = new SequoiaDB() ;
    $err = $db -> connect( "192.168.1.10:11810" ) ;
    if( $err['errno'] != 0 ) {
    echo "Failed to connect database, error code: ".$err['errno'] ;
    return ;
    }
    $result = $db -> syncDB( array( 'CollectionSpace' => 'foo' ) ) ;
    var_dump( $result ) ;
  3. For the data group group1 for depth and blocking persistence.
    $db = new SequoiaDB() ;
    $err = $db -> connect( "192.168.1.10:11810" ) ;
    if( $err['errno'] != 0 ) {
    echo "Failed to connect database, error code: ".$err['errno'] ;
    return ;
    }
    $result = $db -> syncDB( array( 'GroupName' => 'group1', 'Block' => true ) ) ;
    var_dump( $result ) ;
SequoiaDB::transactionBegin ( )

Transaction begin.

Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cl = $db -> getCL( 'foo.bar' ) ;
if( empty( $cl ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call getCL, error code: ".$err['errno'] ;
return ;
}
$err = $db -> transactionBegin() ;
if( $err['errno'] != 0 ) {
echo "Failed to call transactionBegin, error code: ".$err['errno'] ;
return ;
}
$err = $cl -> insert( array( 'a' => 1 ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call insert, error code: ".$err['errno'] ;
return ;
}
$err = $db -> transactionCommit() ;
if( $err['errno'] != 0 ) {
echo "Failed to call transactionCommit, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::transactionCommit ( )

Transaction commit.

Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cl = $db -> getCL( 'foo.bar' ) ;
if( empty( $cl ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call getCL, error code: ".$err['errno'] ;
return ;
}
$err = $db -> transactionBegin() ;
if( $err['errno'] != 0 ) {
echo "Failed to call transactionBegin, error code: ".$err['errno'] ;
return ;
}
$err = $cl -> insert( array( 'a' => 1 ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call insert, error code: ".$err['errno'] ;
return ;
}
$err = $db -> transactionCommit() ;
if( $err['errno'] != 0 ) {
echo "Failed to call transactionCommit, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::transactionRollback ( )

Transaction rollback.

Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$cl = $db -> getCL( 'foo.bar' ) ;
if( empty( $cl ) ) {
$err = $db -> getLastErrorMsg() ;
echo "Failed to call getCL, error code: ".$err['errno'] ;
return ;
}
$err = $db -> transactionBegin() ;
if( $err['errno'] != 0 ) {
echo "Failed to call transactionBegin, error code: ".$err['errno'] ;
return ;
}
$err = $cl -> insert( array( 'a' => 1 ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call insert, error code: ".$err['errno'] ;
return ;
}
$err = $db -> transactionRollback() ;
if( $err['errno'] != 0 ) {
echo "Failed to call transactionRollback, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::truncate ( string  $fullName)

Truncate the collection.

Parameters
$fullNamethe string argument. The collection full name.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> truncate( 'foo.bar' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to truncate the collection, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::updateConfig ( array|string  $configs,
array|string  $options 
)

Force the node to update config from file and take effect.

Parameters
$configsthe specific configuration parameters to update
$optionsThe control options:(Only take effect in coordinate nodes)
GroupID:INT32,
GroupName:String,
NodeID:INT32,
HostName:String,
svcname:String,
...
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> updateConfig( '{"diagnum":20}', '{"svcname":"20000"}' ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call updateConfig, error code: ".$err['errno'] ;
return ;
}
SequoiaDB::waitTask ( array|integer|SequoiaInt64  $taskID)

Remove the backups.

Parameters
$taskIDan array or an integer argument. The array of task id or the integer of task id ;
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example: array type

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> waitTask( array( 1, 2, new SequoiaInt64( '3' ) ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call waitTask, error code: ".$err['errno'] ;
return ;
}

Example: integer type

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> waitTask( 1 ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call waitTask, error code: ".$err['errno'] ;
return ;
}

Example: SequoiaInt64 type

$db = new SequoiaDB() ;
$err = $db -> connect( "192.168.1.10:11810" ) ;
if( $err['errno'] != 0 ) {
echo "Failed to connect database, error code: ".$err['errno'] ;
return ;
}
$err = $db -> waitTask( new SequoiaInt64( '1' ) ) ;
if( $err['errno'] != 0 ) {
echo "Failed to call waitTask, error code: ".$err['errno'] ;
return ;
}

Member Data Documentation

const SequoiaDB::SDB_LIST_CL_IN_DOMAIN 129

Get the list of the collections in specified domain.

const SequoiaDB::SDB_LIST_COLLECTIONS 4

Get the list of the collections.

const SequoiaDB::SDB_LIST_COLLECTIONSPACES 5

Get the list of the collecion spaces.

const SequoiaDB::SDB_LIST_CONTEXTS 0

Get the list of the contexts.

const SequoiaDB::SDB_LIST_CONTEXTS_CURRENT 1

Get the list of current context.

const SequoiaDB::SDB_LIST_CS_IN_DOMAIN 130

Get the list of the collection spaces in specified domain.

const SequoiaDB::SDB_LIST_DOMAINS 9

Get the list of the domains ( only applicable in sharding env ).

const SequoiaDB::SDB_LIST_GROUPS 7

Get the list of the replica groups ( only applicable in sharding env ).

const SequoiaDB::SDB_LIST_SEQUENCES 15

Get the list of sequences.

const SequoiaDB::SDB_LIST_SESSIONS 2

Get the list of the sessions.

const SequoiaDB::SDB_LIST_SESSIONS_CURRENT 3

Get the list of current session.

const SequoiaDB::SDB_LIST_STORAGEUNITS 6

Get the list of the storage units.

const SequoiaDB::SDB_LIST_STOREPROCEDURES 8

Get the list of the stored procedures ( only applicable in sharding env ).

const SequoiaDB::SDB_LIST_SVCTASKS 14

Get the list of service tasks.

const SequoiaDB::SDB_LIST_TASKS 10

Get the list of the tasks ( only applicable in sharding env ).

const SequoiaDB::SDB_LIST_TRANSACTIONS 11

Get all the transactions information.

const SequoiaDB::SDB_LIST_TRANSACTIONS_CURRENT 12

Get the transactions information of current session.

const SequoiaDB::SDB_LIST_USERS 16

Get the list of users.

const SequoiaDB::SDB_SNAP_ACCESSPLANS 11

Get the snapshot of cached access plans.

const SequoiaDB::SDB_SNAP_CATA 8

Get the snapshot of the catalog.

Deprecated:
See Also
SDB_SNAP_CATALOG
const SequoiaDB::SDB_SNAP_CATALOG 8

Get the snapshot of the catalog.

const SequoiaDB::SDB_SNAP_COLLECTION 4

Get the snapshot of all the collections.

Deprecated:
See Also
SDB_SNAP_COLLECTIONS
const SequoiaDB::SDB_SNAP_COLLECTIONS 4

Get the snapshot of all the collections.

const SequoiaDB::SDB_SNAP_COLLECTIONSPACE 5

Get the snapshot of all the collection spaces.

Deprecated:
See Also
SDB_SNAP_COLLECTIONSPACES
const SequoiaDB::SDB_SNAP_COLLECTIONSPACES 5

Get the snapshot of all the collection spaces.

const SequoiaDB::SDB_SNAP_CONFIGS 13

Get the snapshot of node configurations.

const SequoiaDB::SDB_SNAP_CONTEXTS 0

Get the snapshot of all the contexts.

const SequoiaDB::SDB_SNAP_CONTEXTS_CURRENT 1

Get the snapshot of current context

const SequoiaDB::SDB_SNAP_DATABASE 6

Get the snapshot of the database.

const SequoiaDB::SDB_SNAP_HEALTH 12

Get the snapshot of node health detection.

const SequoiaDB::SDB_SNAP_INDEXSTATS 21

Get the snapshot of index statistics

const SequoiaDB::SDB_SNAP_LATCHWAITS 19

Get the snapshot of latch waits

const SequoiaDB::SDB_SNAP_LOCKWAITS 20

Get the snapshot of lock waits

const SequoiaDB::SDB_SNAP_QUERIES 18

Get the snapshot of queries

const SequoiaDB::SDB_SNAP_SEQUENCES 15

Get the snapshot of sequences.

const SequoiaDB::SDB_SNAP_SESSIONS 2

Get the snapshot of all the sessions.

const SequoiaDB::SDB_SNAP_SESSIONS_CURRENT 3

Get the snapshot of current session.

const SequoiaDB::SDB_SNAP_SVCTASKS 14

Get the snapshot of service tasks.

const SequoiaDB::SDB_SNAP_SYSTEM 7

Get the snapshot of the system.

const SequoiaDB::SDB_SNAP_TRANSACTION 9

Get the snapshot of all the transactions.

Deprecated:
See Also
SDB_SNAP_TRANSACTIONS
const SequoiaDB::SDB_SNAP_TRANSACTION_CURRENT 10

Get the snapshot of current transaction.

Deprecated:
See Also
SDB_SNAP_TRANSACTIONS_CURRENT
const SequoiaDB::SDB_SNAP_TRANSACTIONS 9

Get the snapshot of all the transactions.

const SequoiaDB::SDB_SNAP_TRANSACTIONS_CURRENT 10

Get the snapshot of current transaction.


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