XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
DBCubrid Class Reference
Inheritance diagram for DBCubrid:
DB

Public Member Functions

 __construct ($auto_connect=TRUE)
 
 create ()
 
 __connect ($connection)
 
 _close ($connection)
 
 addQuotes ($string)
 
 _begin ($transactionLevel=0)
 
 _rollback ($transactionLevel=0)
 
 _commit ()
 
 __query ($query, $connection)
 
 _setError ()
 
 _fetch ($result, $arrayIndexEndValue=NULL)
 
 getNextSequence ()
 
 _makeSequence ()
 
 isTableExists ($target_name)
 
 addColumn ($table_name, $column_name, $type= 'number', $size= '', $default=null, $notnull=FALSE)
 
 dropColumn ($table_name, $column_name)
 
 isColumnExists ($table_name, $column_name)
 
 addIndex ($table_name, $index_name, $target_columns, $is_unique=FALSE)
 
 dropIndex ($table_name, $index_name, $is_unique=FALSE)
 
 isIndexExists ($table_name, $index_name)
 
 deleteDuplicateIndexes ()
 
 createTableByXml ($xml_doc)
 
 createTableByXmlFile ($file_name)
 
 _createTable ($xml_doc)
 
 _executeInsertAct ($queryObject, $with_values=TRUE)
 
 _executeUpdateAct ($queryObject, $with_values=TRUE)
 
 _executeDeleteAct ($queryObject, $with_values=TRUE)
 
 _executeSelectAct ($queryObject, $connection=NULL, $with_values=TRUE)
 
 queryError ($queryObject)
 
 queryPageLimit ($queryObject, $connection, $with_values)
 
 getParser ($force=FALSE)
 
 getSelectPageSql ($query, $with_values=TRUE, $start_count=0, $list_count=0)
 
- Public Member Functions inherited from DB
 getInstance ($db_type=NULL)
 
 create ()
 
 __construct ()
 
 getSupportedList ()
 
 _getSupportedList ()
 
 _sortDBMS ($a, $b)
 
 isSupported ()
 
 isConnected ($type= 'master', $indx=0)
 
 actStart ($query)
 
 actFinish ()
 
 setQueryLog ($log)
 
 setError ($errno=0, $errstr= 'success')
 
 isError ()
 
 getError ()
 
 executeQuery ($query_id, $args=NULL, $arg_columns=NULL, $type=NULL)
 
 checkQueryCacheFile ($query_id, $xml_file)
 
 _executeQuery ($cache_file, $source_args, $query_id, $arg_columns, $type)
 
 getCountCache ($tables, $condition)
 
 putCountCache ($tables, $condition, $count=0)
 
 resetCountCache ($tables)
 
 dropTable ($table_name)
 
 getSelectSql ($query, $with_values=TRUE)
 
 getClickCountQuery ($queryObject)
 
 getDeleteSql ($query, $with_values=TRUE, $with_priority=FALSE)
 
 getUpdateSql ($query, $with_values=TRUE, $with_priority=FALSE)
 
 getInsertSql ($query, $with_values=TRUE, $with_priority=FALSE)
 
 _getSlaveConnectionStringIndex ()
 
 _getConnection ($type= 'master', $indx=NULL)
 
 _dbInfoExists ()
 
 _close ($connection)
 
 close ($type= 'master', $indx=0)
 
 _begin ($transactionLevel=0)
 
 begin ()
 
 _rollback ($transactionLevel=0)
 
 rollback ()
 
 _commit ()
 
 commit ($force=FALSE)
 
 __query ($query, $connection)
 
 _query ($query, $connection=NULL)
 
 _setDBInfo ()
 
 __connect ($connection)
 
 _afterConnect ($connection)
 
 _connect ($type= 'master', $indx=0)
 
 actDBClassStart ()
 
 actDBClassFinish ()
 
 getParser ($force=FALSE)
 

Public Attributes

 $prefix = 'xe_'
 
 $cutlen = 12000
 
 $comment_syntax = '/* %s */'
 
 $column_type
 
- Public Attributes inherited from DB
 $priority_dbms
 
 $count_cache_path = 'files/cache/db'
 
 $cond_operation
 
 $master_db = NULL
 
 $slave_db = NULL
 
 $result = NULL
 
 $errno = 0
 
 $errstr = ''
 
 $query = ''
 
 $connection = ''
 
 $elapsed_time = 0
 
 $elapsed_dbclass_time = 0
 
 $transaction_started = FALSE
 
 $is_connected = FALSE
 
 $cache_file = 'files/cache/queries/'
 
 $db_type
 
 $use_prepared_statements
 

Additional Inherited Members

- Static Public Member Functions inherited from DB
static getEnableList ()
 
static getDisableList ()
 
- Static Public Attributes inherited from DB
static $isSupported = FALSE
 
static $supported_list = array()
 

Detailed Description

Definition at line 13 of file DBCubrid.class.php.

Constructor & Destructor Documentation

DBCubrid::__construct (   $auto_connect = TRUE)

constructor

Returns
void

Definition at line 52 of file DBCubrid.class.php.

Member Function Documentation

DBCubrid::__connect (   $connection)

DB Connect this method is private

Parameters
array$connectionconnection's value is db_hostname, db_port, db_database, db_userid, db_password
Returns
resource

Definition at line 73 of file DBCubrid.class.php.

DBCubrid::__query (   $query,
  $connection 
)

Execute the query this method is private

Parameters
string$query
resource$connection
Returns
resource

Definition at line 207 of file DBCubrid.class.php.

DBCubrid::_begin (   $transactionLevel = 0)

DB transaction start this method is private

Returns
boolean

Definition at line 147 of file DBCubrid.class.php.

DBCubrid::_close (   $connection)

DB disconnection this method is private

Parameters
resource$connection
Returns
void

Definition at line 105 of file DBCubrid.class.php.

DBCubrid::_commit ( )

DB transaction commit this method is private

Returns
boolean

Definition at line 193 of file DBCubrid.class.php.

DBCubrid::_createTable (   $xml_doc)

Create table by using the schema xml

type : number, varchar, tinytext, text, bigtext, char, date,
opt : notnull, default, size
index : primary key, index, unique

Parameters
string$xml_docxml schema contents
Returns
void|object

Definition at line 728 of file DBCubrid.class.php.

DBCubrid::_executeDeleteAct (   $queryObject,
  $with_values = TRUE 
)

Handles deleteAct

Parameters
BaseObject$queryObject
boolean$with_values
Returns
resource

Definition at line 920 of file DBCubrid.class.php.

DBCubrid::_executeInsertAct (   $queryObject,
  $with_values = TRUE 
)

Handles insertAct

Parameters
BaseObject$queryObject
boolean$with_values
Returns
resource

Definition at line 857 of file DBCubrid.class.php.

DBCubrid::_executeSelectAct (   $queryObject,
  $connection = NULL,
  $with_values = TRUE 
)

Handle selectAct To get a specific page list easily in select statement, a method, navigation, is used

Parameters
BaseObject$queryObject
resource$connection
boolean$with_values
Returns
BaseObject

Definition at line 956 of file DBCubrid.class.php.

DBCubrid::_executeUpdateAct (   $queryObject,
  $with_values = TRUE 
)

Handles updateAct

Parameters
BaseObject$queryObject
boolean$with_values
Returns
resource

Definition at line 888 of file DBCubrid.class.php.

DBCubrid::_fetch (   $result,
  $arrayIndexEndValue = NULL 
)

Fetch the result

Parameters
resource$result
int | NULL$arrayIndexEndValue
Returns
array

Definition at line 306 of file DBCubrid.class.php.

DBCubrid::_makeSequence ( )

if the table already exists, set the status to GLOBALS

Returns
void

Definition at line 396 of file DBCubrid.class.php.

DBCubrid::_rollback (   $transactionLevel = 0)

DB transaction rollback this method is private

Returns
boolean

Definition at line 170 of file DBCubrid.class.php.

DBCubrid::_setError ( )

Retrieve CUBRID error and set to object

Author
Corina Udrescu (dev@x.nosp@m.pres.nosp@m.sengi.nosp@m.ne.o.nosp@m.rg)

Definition at line 292 of file DBCubrid.class.php.

DBCubrid::addColumn (   $table_name,
  $column_name,
  $type = 'number',
  $size = '',
  $default = null,
  $notnull = FALSE 
)

Add a column to the table

Parameters
string$table_nametable name
string$column_namecolumn name
string$typecolumn type, default value is 'number'
int$sizecolumn size
string | int$defaultdefault value
boolean$notnullnot null status, default value is false
Returns
void

Definition at line 482 of file DBCubrid.class.php.

DBCubrid::addIndex (   $table_name,
  $index_name,
  $target_columns,
  $is_unique = FALSE 
)

Add an index to the table $target_columns = array(col1, col2) $is_unique? unique : none

Parameters
string$table_nametable name
string$index_nameindex name
string | array$target_columnstarget column or columns
boolean$is_unique
Returns
void

Definition at line 580 of file DBCubrid.class.php.

DBCubrid::addQuotes (   $string)

Handles quatation of the string variables from the query

Parameters
string$string
Returns
string

Definition at line 117 of file DBCubrid.class.php.

DBCubrid::create ( )

Create an instance of this class

Returns
DBCubrid return DBCubrid object instance

Definition at line 62 of file DBCubrid.class.php.

DBCubrid::createTableByXml (   $xml_doc)

Creates a table by using xml contents

Parameters
string$xml_docxml schema contents
Returns
void|object

Definition at line 698 of file DBCubrid.class.php.

DBCubrid::createTableByXmlFile (   $file_name)

Creates a table by using xml file path

Parameters
string$file_namexml schema file path
Returns
void|object

Definition at line 708 of file DBCubrid.class.php.

DBCubrid::deleteDuplicateIndexes ( )

Delete duplicated index of the table

Returns
boolean

Definition at line 635 of file DBCubrid.class.php.

DBCubrid::dropColumn (   $table_name,
  $column_name 
)

Drop a column from the table

Parameters
string$table_nametable name
string$column_namecolumn name
Returns
void

Definition at line 535 of file DBCubrid.class.php.

DBCubrid::dropIndex (   $table_name,
  $index_name,
  $is_unique = FALSE 
)

Drop an index from the table

Parameters
string$table_nametable name
string$index_nameindex name
boolean$is_unique
Returns
void

Definition at line 599 of file DBCubrid.class.php.

DBCubrid::getNextSequence ( )

Return the sequence value incremented by 1 Auto_increment column only used in the CUBRID sequence table

Returns
int

Definition at line 381 of file DBCubrid.class.php.

DBCubrid::getParser (   $force = FALSE)

Return the DBParser

Parameters
boolean$force
Returns
DBParser

Definition at line 1121 of file DBCubrid.class.php.

DBCubrid::getSelectPageSql (   $query,
  $with_values = TRUE,
  $start_count = 0,
  $list_count = 0 
)

If select query execute, return paging sql

Parameters
object$query
boolean$with_values
int$start_count
int$list_count
Returns
string select paging sql

Definition at line 1134 of file DBCubrid.class.php.

DBCubrid::isColumnExists (   $table_name,
  $column_name 
)

Check column exist status of the table

Parameters
string$table_nametable name
string$column_namecolumn name
Returns
boolean

Definition at line 548 of file DBCubrid.class.php.

DBCubrid::isIndexExists (   $table_name,
  $index_name 
)

Check index status of the table

Parameters
string$table_nametable name
string$index_nameindex name
Returns
boolean

Definition at line 612 of file DBCubrid.class.php.

DBCubrid::isTableExists (   $target_name)

Check a table exists status

Parameters
string$target_name
Returns
boolean

Definition at line 443 of file DBCubrid.class.php.

DBCubrid::queryError (   $queryObject)

If have a error, return error object

Parameters
BaseObject$queryObject
Returns
BaseObject

Definition at line 1000 of file DBCubrid.class.php.

DBCubrid::queryPageLimit (   $queryObject,
  $connection,
  $with_values 
)

If select query execute, return page info

Parameters
BaseObject$queryObject
resource$connection
boolean$with_values
Returns
BaseObject BaseObject with page info containing

Definition at line 1023 of file DBCubrid.class.php.

Member Data Documentation

DBCubrid::$column_type
Initial value:
= array(
'bignumber' => 'numeric(20)',
'number' => 'integer',
'varchar' => 'character varying',
'char' => 'character',
'tinytext' => 'character varying(256)',
'text' => 'character varying(1073741823)',
'bigtext' => 'character varying(1073741823)',
'date' => 'character varying(14)',
'float' => 'float',
)

Definition at line 36 of file DBCubrid.class.php.

DBCubrid::$comment_syntax = '/* %s */'

Definition at line 27 of file DBCubrid.class.php.

DBCubrid::$cutlen = 12000

Definition at line 26 of file DBCubrid.class.php.

DBCubrid::$prefix = 'xe_'

Definition at line 20 of file DBCubrid.class.php.


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