eZ Publish  [4.0]
eZDBInterface Class Reference

The eZDBInterface defines the interface for all database implementations. More...

+ Inheritance diagram for eZDBInterface:

List of all members.

Public Member Functions

 arrayQuery ($sql, $params=array(), $server=false)
 attribute ($name)
 attributes ()
 availableDatabases ()
 begin ()
 beginQuery ()
 bindingType ()
 bindVariable ($value, $fieldDef=false)
 bitAnd ($arg1, $arg2)
 bitOr ($arg1, $arg2)
 charset ()
 checkCharset ($charset, &$currentCharset)
 close ()
 commit ()
 commitQuery ()
 concatString ($strings=array())
 connectRetryCount ()
 connectRetryWaitTime ()
 createDatabase ($dbName)
 createTempTable ($createTableQuery= '', $server=self::SERVER_SLAVE)
 databaseClientVersion ()
 databaseName ()
 databaseServerVersion ()
 dropTempTable ($dropTableQuery= '', $server=self::SERVER_SLAVE)
 dropTempTableList ($tableList, $server=self::SERVER_SLAVE)
 errorMessage ()
 errorNumber ()
 escapeString ($str)
 eZDBInterface ($parameters)
 eZTableList ($server=self::SERVER_MASTER)
 generateFailedTransactionStack ()
 generateUniqueTempTableName ($pattern, $randomizeIndex=false, $server=self::SERVER_SLAVE)
 hasAttribute ($name)
 hasRequiredServerVersion ($minVersion, $name=false)
 implodeWithTypeCast ($glue, &$pieces, $type)
 insertFile ($path, $sqlFile, $usePathType=true)
 invalidateTransaction ()
 isCharsetSupported ($charset)
 isTransactionValid ()
 lastSerialID ($table=false, $column=false)
 lock ($table)
 md5 ($str)
 query ($sql, $server=false)
 relationCount ($relationType=eZDBInterface::RELATION_TABLE)
 relationCounts ($relationMask)
 relationList ($relationType=eZDBInterface::RELATION_TABLE)
 relationMatchRegexp ($relationType)
 removeRelation ($relationName, $relationType)
 rollback ()
 rollbackQuery ()
 setError ()
 setIsSQLOutputEnabled ($enabled)
 socketPath ()
 subString ($string, $from, $len=null)
 supportedRelationTypeMask ()
 supportedRelationTypes ()
 supportsDefaultValuesInsertion ()
 transactionCounter ()
 unlock ()
 usesBuiltinEncoding ()
 useShortNames ()
 version ()

Static Public Member Functions

 generateSQLINStatement ($elements, $columnName= '', $not=false, $unique=true, $type=false)

Public Attributes

 $Charset
 The charset used for the current database.
 $ConnectRetries
 The number of times to retry a connection if it fails.
 $DB
 The current database name.
 $DBConnection
 The current connection, false if not connection has been made.
 $DBWriteConnection
 Contains the write database connection if used.
 $EndTime
 The end time of the tiemr.
 $ErrorMessage
 The database error message of the last executed function.
 $ErrorNumber = 0
 The database error message number of the last executed function.
 $InputTextCodec
 $IsConnected = false
 Contains true if we're connected to the database backend.
 $NumQueries = 0
 Contains number of queries sended to DB.
 $OutputSQL
 Setting if SQL queries should be sent to debug output.
 $OutputTextCodec
 Instance of a textcodec which handles text conversion, may not be set if no builtin encoding is used.
 $Password
 Stores the database connection password.
 $Port
 Contains the current port.
 $RecordError = true
 If true then ErrorMessage and ErrorNumber get filled.
 $Server
 Contains the current server.
 $SlaveDB
 The slave database name.
 $SlavePassword
 The slave database user password.
 $SlavePort
 The slave server port.
 $SlaveServer
 The slave server name.
 $SlaveUser
 The slave database user.
 $SocketPath
 The socket path, used by MySQL.
 $StartTime
 The start time of the timer.
 $TimeTaken
 The total number of milliseconds the timer took.
 $TransactionCounter
 The transaction counter, 0 means no transaction.
 $TransactionIsValid
 Flag which tells if a transaction is considered valid or not A transaction will be made invalid if SQL errors occur.
 $UseBuiltinEncoding
 True if a builtin encoder is to be used, this means that all input/output text is converted.
 $UsePersistentConnection = false
 If true then the database connection should be persistent.
 $User
 Stores the database connection user.
 $UserSlaveServer
 Contains true if slave servers are enabled.
const BINDING_NAME = 1
const BINDING_NO = 0
const BINDING_ORDERED = 2
const ERROR_MISSING_EXTENSION = 1
const RELATION_INDEX = 4
const RELATION_INDEX_BIT = 16
const RELATION_MASK = 31
const RELATION_NONE = 0
const RELATION_SEQUENCE = 1
const RELATION_SEQUENCE_BIT = 2
const RELATION_TABLE = 0
const RELATION_TABLE_BIT = 1
const RELATION_TRIGGER = 2
const RELATION_TRIGGER_BIT = 4
const RELATION_VIEW = 3
const RELATION_VIEW_BIT = 8
const SERVER_MASTER = 1
const SERVER_SLAVE = 2

Protected Member Functions

 isConnected ()
 relationName ($relationType)
 reportError ()

Private Member Functions

 endTime ()
 endTimer ()
 generateFailedTransactionStackEntry ($stack, $indentCount)
 generateTraceEntry ($entry)
 prepareSqlQuery (&$fd, &$buffer)
 reportQuery ($class, $sql, $numRows, $timeTaken)
 startTime ()
 startTimer ()
 timeTaken ()

Detailed Description

The eZDBInterface defines the interface for all database implementations.

See also:
eZDB

Definition at line 44 of file ezdbinterface.php.


Member Function Documentation

eZDBInterface::arrayQuery ( sql,
params = array(),
server = false 
) [pure virtual]

Executes an SQL query and returns the result as an array of accociative arrays.

Parameters:
$sqlSQL query to execute.
$paramsAssociative array containing extra parameters, can contain:
  • offset - The offset of the query.
  • limit - The limit of the query.
  • column - Limit returned row arrays to only contain this column.
$serverWhich server to execute the query on, either eZDBInterface::SERVER_MASTER or eZDBInterface::SERVER_SLAVE

An example would be:

      $db->arrayQuery( 'SELECT * FROM eztable', array( 'limit' => 10, 'offset' => 5 ) );

Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.

Definition at line 631 of file ezdbinterface.php.

eZDBInterface::attribute ( name)
Returns:
the value of the attribute $name if it exists, otherwise null.

Definition at line 218 of file ezdbinterface.php.

eZDBInterface::attributes ( )
Returns:
the available attributes for this database handler.

Definition at line 198 of file ezdbinterface.php.

eZDBInterface::availableDatabases ( )

Return alvailable databases in database.

Returns:
array of available databases, null of none available false if listing databases not supported by database

Reimplemented in eZMySQLDB, and eZMySQLiDB.

Definition at line 1267 of file ezdbinterface.php.

eZDBInterface::begin ( )

Begin a new transaction. If we are already in transaction then we omit this new transaction and its matching commit or rollback.

Reimplemented in eZNullDB.

Definition at line 655 of file ezdbinterface.php.

Referenced by eZPostgreSQLDB\lock().

eZDBInterface::beginQuery ( )

The query to start a transaction. This function must be reimplemented in the subclasses.

Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 713 of file ezdbinterface.php.

Referenced by begin().

eZDBInterface::bindingType ( ) [pure virtual]

Returns type of binding used in database plugin.

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 592 of file ezdbinterface.php.

eZDBInterface::bindVariable ( value,
fieldDef = false 
) [pure virtual]

Binds variable.

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 600 of file ezdbinterface.php.

eZDBInterface::bitAnd ( arg1,
arg2 
) [pure virtual]
Returns:
a sql-expression(string) to generate a bit and of the argument.

Implemented in eZMySQLDB, and eZMySQLiDB.

Definition at line 512 of file ezdbinterface.php.

eZDBInterface::bitOr ( arg1,
arg2 
) [pure virtual]
Returns:
a sql-expression(string) to generate a bit and of the argument.

Implemented in eZMySQLDB, and eZMySQLiDB.

Definition at line 521 of file ezdbinterface.php.

eZDBInterface::charset ( )

Returns the charset which the database is encoded in.

See also:
usesBuiltinEncoding

Definition at line 573 of file ezdbinterface.php.

eZDBInterface::checkCharset ( charset,
&$  currentCharset 
)

Checks if the requested character set matches the one used in the database.

Returns:
true if it matches or false if it differs.
Parameters:
[out]$currentCharsetThe charset that the database uses, will only be set if the match fails. Note: This will be specific to the database.
Note:
The default is to always return true, see the specific database handler for more information.

Reimplemented in eZMySQLDB, and eZMySQLiDB.

Definition at line 243 of file ezdbinterface.php.

eZDBInterface::close ( ) [pure virtual]

Will close the database connection.

Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.

Definition at line 1190 of file ezdbinterface.php.

eZDBInterface::commit ( )

Commits the current transaction. If this is not the outermost it will not commit to the database immediately but instead decrease the transaction counter.

If the current transaction had any errors in it the transaction will be rollbacked instead of commited. This ensures that the database is in a valid state. Also the PHP execution will be stopped.

Returns:
true if the transaction was successful, false otherwise.

Reimplemented in eZNullDB.

Definition at line 728 of file ezdbinterface.php.

Referenced by eZPostgreSQLDB\unlock().

eZDBInterface::commitQuery ( )

The query to commit the transaction. This function must be reimplemented in the subclasses.

Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 795 of file ezdbinterface.php.

Referenced by commit().

eZDBInterface::concatString ( strings = array()) [pure virtual]
Returns:
a sql-expression(string) to concatenate strings.

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 494 of file ezdbinterface.php.

eZDBInterface::connectRetryCount ( )
Returns:
the number of times the db handler should try to reconnect if it fails.

Definition at line 440 of file ezdbinterface.php.

Referenced by eZMySQLDB\connect(), eZMySQLiDB\connect(), and eZPostgreSQLDB\eZPostgreSQLDB().

eZDBInterface::connectRetryWaitTime ( )
Returns:
the number of seconds the db handler should wait before rereconnecting.
Note:
Currently returns 3 seconds.

Definition at line 449 of file ezdbinterface.php.

Referenced by eZMySQLDB\connect(), eZMySQLiDB\connect(), and eZPostgreSQLDB\eZPostgreSQLDB().

eZDBInterface::createDatabase ( dbName) [pure virtual]

Create a new database

Implemented in eZMySQLDB, and eZMySQLiDB.

Definition at line 1207 of file ezdbinterface.php.

eZDBInterface::createTempTable ( createTableQuery = '',
server = self::SERVER_SLAVE 
)

Create a new temporary table

Definition at line 1214 of file ezdbinterface.php.

eZDBInterface::databaseClientVersion ( ) [pure virtual]
Returns:
the version of the database client or false if no version could be retrieved/

Implemented in eZMySQLDB, and eZMySQLiDB.

Definition at line 557 of file ezdbinterface.php.

eZDBInterface::databaseName ( ) [pure virtual]

Returns the name of driver, this is used to determine the name of the database type. For instance multiple implementations of the MySQL database will all return 'mysql'.

Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.

Definition at line 424 of file ezdbinterface.php.

Referenced by hasRequiredServerVersion(), and insertFile().

eZDBInterface::databaseServerVersion ( )
Returns:
the version of the database server or false if no version could be retrieved/

Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 549 of file ezdbinterface.php.

Referenced by hasRequiredServerVersion().

eZDBInterface::dropTempTable ( dropTableQuery = '',
server = self::SERVER_SLAVE 
)

Drop temporary table

Definition at line 1222 of file ezdbinterface.php.

Referenced by dropTempTableList().

eZDBInterface::dropTempTableList ( tableList,
server = self::SERVER_SLAVE 
)

Drop temporary table list

Definition at line 1230 of file ezdbinterface.php.

eZDBInterface::endTime ( ) [private]
Returns:
the micro time when the timer was ended or false if no timer.

Definition at line 405 of file ezdbinterface.php.

eZDBInterface::endTimer ( ) [private]

Stops the current timer and calculates the time taken.

See also:
startTimer, timeTaken

Definition at line 384 of file ezdbinterface.php.

Referenced by eZPostgreSQLDB\query(), eZMySQLiDB\query(), and eZMySQLDB\query().

eZDBInterface::errorMessage ( )

Returns the error message

Definition at line 1247 of file ezdbinterface.php.

eZDBInterface::errorNumber ( )

Returns the error number

Definition at line 1255 of file ezdbinterface.php.

Referenced by eZMySQLiDB\availableDatabases(), eZMySQLDB\availableDatabases(), and insertFile().

eZDBInterface::escapeString ( str) [pure virtual]

Will escape a string so it's ready to be inserted in the database.

Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.

Definition at line 1181 of file ezdbinterface.php.

eZDBInterface::eZDBInterface ( parameters)

Create a new eZDBInterface object and connects to the database backend.

Definition at line 73 of file ezdbinterface.php.

Referenced by eZMySQLDB\eZMySQLDB(), eZMySQLiDB\eZMySQLiDB(), eZNullDB\eZNullDB(), and eZPostgreSQLDB\eZPostgreSQLDB().

eZDBInterface::eZTableList ( server = self::SERVER_MASTER) [pure virtual]
Returns:
existing ez publish tables in database

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 1083 of file ezdbinterface.php.

Referenced by generateUniqueTempTableName().

eZDBInterface::generateFailedTransactionStack ( )

Goes through the transaction stack tree $this->TransactionStackTree and generates the text output for it and returns it.

Returns:
The generated string or false if it is disabled.

Definition at line 837 of file ezdbinterface.php.

eZDBInterface::generateFailedTransactionStackEntry ( stack,
indentCount 
) [private]

Recursive helper function for generating stack tree output.

Returns:
The generated string

Definition at line 851 of file ezdbinterface.php.

Referenced by generateFailedTransactionStack().

eZDBInterface::generateSQLINStatement ( elements,
columnName = '',
not = false,
unique = true,
type = false 
) [static]

This function can be used to create a SQL IN statement to be used in a WHERE clause:

WHERE columnName IN ( element1, element2, ... )

By default, the elements that can be submitted as an anonymous array (or an integer value in case of a single element) will just be imploded. Drivers for databases with a limitation of the elements within an IN statement have to reimplement this function. It is also possible to negate the "IN" to a "NOT IN" by using the last parameter of this function.

Usage:

$db =& eZDb::instance(); $db->generateSQLINStatement( array( 2, 5, 43, ) );

Parameters:
$elementsElements that should (not) be matched by the IN statment as an integer or anonymous array
$columnNameColumn name of the database table the IN statement should be created for
$notWill generate a "NOT IN" ( if set to true ) statement instead of an "IN" ( if set to false , default )
$unique
$typeThe type to cast the array elements to
Returns:
A string with the correct IN statement like for example "columnName IN ( element1, element2 )"

Definition at line 1331 of file ezdbinterface.php.

eZDBInterface::generateTraceEntry ( entry) [private]

Helper function for generating output for one stack-trace entry.

Returns:
The generated string

Definition at line 898 of file ezdbinterface.php.

Referenced by generateFailedTransactionStackEntry().

eZDBInterface::generateUniqueTempTableName ( pattern,
randomizeIndex = false,
server = self::SERVER_SLAVE 
)

Generate unique table name basing on the given pattern. If the pattern contains a (%) character then the character is replaced with a part providing uniqueness (e.g. random number).

Definition at line 1277 of file ezdbinterface.php.

eZDBInterface::hasAttribute ( name)
Returns:
true if the attribute $name exists for this database handler.

Definition at line 206 of file ezdbinterface.php.

eZDBInterface::hasRequiredServerVersion ( minVersion,
name = false 
)

Checks if the version number of the server is equal or larger than $minVersion. Will also check if the database type is correct if $name is set.

Parameters:
$minVersionA string denoting the min. required version.
$nameThe name of the database type it requires or false if it does not matter.
Returns:
true if the server fulfills the requirements.

Definition at line 534 of file ezdbinterface.php.

eZDBInterface::implodeWithTypeCast ( glue,
&$  pieces,
type 
)

Casts elements of $pieces to type $type and returns them as string separated by $glue.

Parameters:
$glueThe separator. $pieces The array containing the elements. $type The type to cast to.

Example:

      implodeWithTypeCast( ',', $myArray, 'int' )

Definition at line 1154 of file ezdbinterface.php.

Referenced by generateSQLINStatement().

eZDBInterface::insertFile ( path,
sqlFile,
usePathType = true 
)

Inserts the SQL file $sqlFile found in the path $path into the currently connected database.

Returns:
true if succesful.

Definition at line 303 of file ezdbinterface.php.

eZDBInterface::invalidateTransaction ( )

Invalidates the current transaction, see commit() for more details on this.

Returns:
true if it was invalidated or false if there is no transaction to invalidate.
See also:
isTransactionValid()

Definition at line 954 of file ezdbinterface.php.

Referenced by reportError().

eZDBInterface::isCharsetSupported ( charset)
Returns:
true if the charset $charset is supported by the connected database.

Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 564 of file ezdbinterface.php.

eZDBInterface::isTransactionValid ( )
Returns:
true if the current or last running transaction was valid, false otherwise.
See also:
invalidateTransaction()

Definition at line 1047 of file ezdbinterface.php.

eZDBInterface::lastSerialID ( table = false,
column = false 
) [pure virtual]

Returns the last serial ID generated with an auto increment field.

Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.

Definition at line 1173 of file ezdbinterface.php.

eZDBInterface::lock ( table) [pure virtual]

Locks a table

Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.

Definition at line 639 of file ezdbinterface.php.

eZDBInterface::md5 ( str) [pure virtual]
Returns:
a sql-expression(string) to generate a md5 sum of the string.

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 503 of file ezdbinterface.php.

Referenced by reportError().

eZDBInterface::prepareSqlQuery ( &$  fd,
&$  buffer 
) [private]

Prepare the sql file so we can create the database.

Parameters:
$fdThe file descriptor
$bufferReference to string buffer for SQL queries.

Definition at line 254 of file ezdbinterface.php.

Referenced by insertFile().

eZDBInterface::query ( sql,
server = false 
) [pure virtual]

Execute a query on the global MySQL database link. If it returns an error, the script is halted and the attempted SQL query and MySQL error message are printed.

Parameters:
$sqlSQL query to execute.

Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.

Definition at line 611 of file ezdbinterface.php.

Referenced by createTempTable(), dropTempTable(), and insertFile().

eZDBInterface::relationCount ( relationType = eZDBInterface::RELATION_TABLE) [pure virtual]
Returns:
the number of relation objects in the database for the relation type $relationType.

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 1075 of file ezdbinterface.php.

eZDBInterface::relationCounts ( relationMask) [pure virtual]
Returns:
the relation count for all relation types in the mask $relationMask.

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 1067 of file ezdbinterface.php.

eZDBInterface::relationList ( relationType = eZDBInterface::RELATION_TABLE) [pure virtual]
Returns:
the relation names in the database as an array for the relation type $relationType.

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 1091 of file ezdbinterface.php.

eZDBInterface::relationMatchRegexp ( relationType) [pure virtual]
Returns:
A regexp (PCRE) that can be used to filter out certain relation elements. If no special regexp is provided it will return false.
Parameters:
$relationTypeThe type which needs to be filtered, this allows one regexp per type.

An example, will only match tables that start with 'ez'.

     return "#^ez#";
Note:
This function is currently used by the eZDBTool class to remove relation elements of a specific kind (Most likely eZ Publish related elements).

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 1136 of file ezdbinterface.php.

eZDBInterface::relationName ( relationType) [protected]
Returns:
the name of the relation type which is usable in SQL or false if unknown type.
Note:
This function can be used by som database handlers which can operate on relation types using SQL.

Definition at line 1110 of file ezdbinterface.php.

Referenced by eZPostgreSQLDB\removeRelation(), eZMySQLiDB\removeRelation(), and eZMySQLDB\removeRelation().

eZDBInterface::removeRelation ( relationName,
relationType 
) [pure virtual]

Tries to remove the relation type $relationType named $relationName

Returns:
true if successful

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 1100 of file ezdbinterface.php.

eZDBInterface::reportError ( ) [protected]

This is called whenever an error occurs in one of the database handlers. If a transaction is active it will be invalidated as well.

Definition at line 967 of file ezdbinterface.php.

Referenced by eZPostgreSQLDB\query(), eZMySQLiDB\query(), and eZMySQLDB\query().

eZDBInterface::reportQuery ( class,
sql,
numRows,
timeTaken 
) [private]
eZDBInterface::rollback ( )

Cancels the transaction.

Reimplemented in eZNullDB.

Definition at line 803 of file ezdbinterface.php.

eZDBInterface::rollbackQuery ( )

The query to cancel the transaction. This function must be reimplemented in the subclasses.

Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 943 of file ezdbinterface.php.

Referenced by commit(), reportError(), and rollback().

eZDBInterface::setError ( ) [pure virtual]

Sets the error message and error message number

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 1240 of file ezdbinterface.php.

eZDBInterface::setIsSQLOutputEnabled ( enabled)

Enabled or disables sql output.

Definition at line 364 of file ezdbinterface.php.

eZDBInterface::socketPath ( )
Returns:
the socket path for the database or false if no socket path was defined.

Definition at line 432 of file ezdbinterface.php.

eZDBInterface::startTime ( ) [private]
Returns:
the micro time when the timer was start or false if no timer.

Definition at line 396 of file ezdbinterface.php.

eZDBInterface::startTimer ( ) [private]

Records the current micro time. End the timer with endTimer() and fetch the result with timeTaken();

Definition at line 374 of file ezdbinterface.php.

Referenced by eZPostgreSQLDB\query(), eZMySQLiDB\query(), and eZMySQLDB\query().

eZDBInterface::subString ( string,
from,
len = null 
) [pure virtual]
Returns:
a sql-expression(string) to get substring.

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 485 of file ezdbinterface.php.

eZDBInterface::supportedRelationTypeMask ( ) [pure virtual]
Returns:
a mask of the relation type it supports.

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 458 of file ezdbinterface.php.

eZDBInterface::supportedRelationTypes ( ) [pure virtual]
Returns:
an array of the relation types.

Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.

Definition at line 476 of file ezdbinterface.php.

eZDBInterface::supportsDefaultValuesInsertion ( )

Reimplemented in eZMySQLDB, and eZMySQLiDB.

Definition at line 1351 of file ezdbinterface.php.

eZDBInterface::timeTaken ( ) [private]
Returns:
the number of milliseconds the last operation took or false if no value.

Definition at line 414 of file ezdbinterface.php.

Referenced by eZPostgreSQLDB\query(), eZMySQLiDB\query(), and eZMySQLDB\query().

eZDBInterface::transactionCounter ( )
Returns:
The current transaction counter.

0 means no transactions, 1 or higher means 1 or more transactions are running and a negative value means something is wrong.

Definition at line 1058 of file ezdbinterface.php.

eZDBInterface::unlock ( ) [pure virtual]

Releases table locks.

Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.

Definition at line 647 of file ezdbinterface.php.

eZDBInterface::usesBuiltinEncoding ( )

Returns true if the database handles encoding itself, if not all queries and returned data must be decoded yourselves.

Note:
This functionality might be removed in the future

Definition at line 583 of file ezdbinterface.php.

eZDBInterface::useShortNames ( ) [pure virtual]
Returns:
if the short column names should be used insted of default ones

Definition at line 467 of file ezdbinterface.php.

eZDBInterface::version ( )

Get database version number

Returns:
version number false if not supported

Definition at line 1299 of file ezdbinterface.php.


Member Data Documentation

eZDBInterface::$Charset

The charset used for the current database.

Definition at line 1374 of file ezdbinterface.php.

eZDBInterface::$ConnectRetries

The number of times to retry a connection if it fails.

Definition at line 1376 of file ezdbinterface.php.

eZDBInterface::$DB

The current database name.

Definition at line 1364 of file ezdbinterface.php.

eZDBInterface::$DBConnection

The current connection, false if not connection has been made.

Definition at line 1366 of file ezdbinterface.php.

eZDBInterface::$DBWriteConnection

Contains the write database connection if used.

Definition at line 1368 of file ezdbinterface.php.

eZDBInterface::$EndTime

The end time of the tiemr.

Definition at line 1392 of file ezdbinterface.php.

eZDBInterface::$ErrorMessage

The database error message of the last executed function.

Definition at line 1396 of file ezdbinterface.php.

eZDBInterface::$ErrorNumber = 0

The database error message number of the last executed function.

Definition at line 1398 of file ezdbinterface.php.

eZDBInterface::$InputTextCodec

Definition at line 1379 of file ezdbinterface.php.

eZDBInterface::$IsConnected = false

Contains true if we're connected to the database backend.

Definition at line 1386 of file ezdbinterface.php.

eZDBInterface::$NumQueries = 0

Contains number of queries sended to DB.

Definition at line 1388 of file ezdbinterface.php.

eZDBInterface::$OutputSQL

Setting if SQL queries should be sent to debug output.

Definition at line 1384 of file ezdbinterface.php.

eZDBInterface::$OutputTextCodec

Instance of a textcodec which handles text conversion, may not be set if no builtin encoding is used.

Definition at line 1378 of file ezdbinterface.php.

eZDBInterface::$Password

Stores the database connection password.

Definition at line 1372 of file ezdbinterface.php.

eZDBInterface::$Port

Contains the current port.

Definition at line 1360 of file ezdbinterface.php.

eZDBInterface::$RecordError = true

If true then ErrorMessage and ErrorNumber get filled.

Definition at line 1400 of file ezdbinterface.php.

eZDBInterface::$Server

Contains the current server.

Definition at line 1358 of file ezdbinterface.php.

eZDBInterface::$SlaveDB

The slave database name.

Definition at line 1406 of file ezdbinterface.php.

eZDBInterface::$SlavePassword

The slave database user password.

Definition at line 1414 of file ezdbinterface.php.

eZDBInterface::$SlavePort

The slave server port.

Definition at line 1410 of file ezdbinterface.php.

eZDBInterface::$SlaveServer

The slave server name.

Definition at line 1408 of file ezdbinterface.php.

eZDBInterface::$SlaveUser

The slave database user.

Definition at line 1412 of file ezdbinterface.php.

eZDBInterface::$SocketPath

The socket path, used by MySQL.

Definition at line 1362 of file ezdbinterface.php.

eZDBInterface::$StartTime

The start time of the timer.

Definition at line 1390 of file ezdbinterface.php.

eZDBInterface::$TimeTaken

The total number of milliseconds the timer took.

Definition at line 1394 of file ezdbinterface.php.

eZDBInterface::$TransactionCounter

The transaction counter, 0 means no transaction.

Definition at line 1416 of file ezdbinterface.php.

eZDBInterface::$TransactionIsValid

Flag which tells if a transaction is considered valid or not A transaction will be made invalid if SQL errors occur.

Definition at line 1419 of file ezdbinterface.php.

eZDBInterface::$UseBuiltinEncoding

True if a builtin encoder is to be used, this means that all input/output text is converted.

Definition at line 1382 of file ezdbinterface.php.

eZDBInterface::$UsePersistentConnection = false

If true then the database connection should be persistent.

Definition at line 1402 of file ezdbinterface.php.

eZDBInterface::$User

Stores the database connection user.

Definition at line 1370 of file ezdbinterface.php.

eZDBInterface::$UserSlaveServer

Contains true if slave servers are enabled.

Definition at line 1404 of file ezdbinterface.php.

Definition at line 47 of file ezdbinterface.php.

Definition at line 48 of file ezdbinterface.php.

Definition at line 63 of file ezdbinterface.php.

Definition at line 62 of file ezdbinterface.php.

Referenced by supportedRelationTypeMask().

Definition at line 67 of file ezdbinterface.php.

Referenced by eZMySQLiDB\query(), and eZMySQLDB\query().


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