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

Public Member Functions

 __construct (array|string $address, string $userName="", string $password="")
 
 connect (array|string $address="127.0.0.1:11810", string $userName="", string $password="")
 
- Public Member Functions inherited from SequoiaDB
 __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)
 

Additional Inherited Members

- Public Attributes inherited from SequoiaDB
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

secure SequoiaDB, use SSL connection

Constructor & Destructor Documentation

SecureSdb::__construct ( array|string  $address,
string  $userName = "",
string  $password = "" 
)

SecureSdb 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.

Example: 1. 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 ;
}

Example: 2. 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 ;
}

Member Function Documentation

SecureSdb::connect ( array|string  $address = "127.0.0.1:11810",
string  $userName = "",
string  $password = "" 
)

Connect to database with ssl.

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.
Returns
Returns the result, default return array.
Return values
arrayarray( 'errno' => 0 )
string{ "errno": 0 }

Example:

$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 ;
}

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