eZPublish  3.8
eZMySQLDB Class Reference

The eZMySQLDB class provides MySQL implementation of the database interface. More...

+ Inheritance diagram for eZMySQLDB:
+ Collaboration diagram for eZMySQLDB:

Public Member Functions

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

Public Attributes

 $CharsetMapping
 

Private Member Functions

 checkCharsetPriv ($charset, &$currentCharset)
 
 connect ($server, $db, $user, $password, $socketPath, $charset=null)
 

Additional Inherited Members

- Protected Member Functions inherited from eZDBInterface
 isConnected ()
 
 relationName ($relationType)
 
 reportError ()
 
- Protected Attributes inherited from eZDBInterface
 $Charset
 The charset used for the current database. More...
 
 $ConnectRetries
 The number of times to retry a connection if it fails. More...
 
 $DB
 The current database name. More...
 
 $DBConnection
 The current connection, false if not connection has been made. More...
 
 $DBWriteConnection
 Contains the write database connection if used. More...
 
 $EndTime
 The end time of the tiemr. More...
 
 $ErrorMessage
 The database error message of the last executed function. More...
 
 $ErrorNumber = 0
 The database error message number of the last executed function. More...
 
 $InputTextCodec
 
 $IsConnected = false
 Contains true if we're connected to the database backend. More...
 
 $NumQueries = 0
 Contains number of queries sended to DB. More...
 
 $OutputSQL
 Setting if SQL queries should be sent to debug output. More...
 
 $OutputTextCodec
 Instance of a textcodec which handles text conversion, may not be set if no builtin encoding is used. More...
 
 $Password
 Stores the database connection password. More...
 
 $RecordError = true
 If true then ErrorMessage and ErrorNumber get filled. More...
 
 $Server
 Contains the current server. More...
 
 $SlaveDB
 The slave database name. More...
 
 $SlavePassword
 The slave database user password. More...
 
 $SlaveServer
 The slave server name. More...
 
 $SlaveUser
 The slave database user. More...
 
 $SocketPath
 The socket path, used by MySQL. More...
 
 $StartTime
 The start time of the timer. More...
 
 $TimeTaken
 The total number of milliseconds the timer took. More...
 
 $TransactionCounter
 The transaction counter, 0 means no transaction. More...
 
 $TransactionIsValid
 Flag which tells if a transaction is considered valid or not A transaction will be made invalid if SQL errors occur. More...
 
 $UseBuiltinEncoding
 True if a builtin encoder is to be used, this means that all input/output text is converted. More...
 
 $UsePersistentConnection = false
 If true then the database connection should be persistent. More...
 
 $User
 Stores the database connection user. More...
 
 $UserSlaveServer
 Contains true if slave servers are enabled. More...
 

Detailed Description

The eZMySQLDB class provides MySQL implementation of the database interface.

eZMySQLDB is the MySQL implementation of eZDB.

See Also
eZDB

Member Function Documentation

eZMySQLDB::arrayQuery (   $sql,
  $params = array() 
)
virtual

Implements eZDBInterface.

eZMySQLDB::availableDatabases ( )
eZMySQLDB::beginQuery ( )

The query to start the transaction.

eZMySQLDB::bindingType ( )
virtual

Implements eZDBInterface.

eZMySQLDB::bindVariable ( $value,
  $fieldDef = false 
)
eZMySQLDB::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
There will be no check for databases using MySQL 4.1.0 or lower since they do not have proper character set handling.
eZMySQLDB::checkCharsetPriv (   $charset,
$currentCharset 
)
private

Referenced by checkCharset().

eZMySQLDB::close ( )
virtual

Implements eZDBInterface.

eZMySQLDB::commitQuery ( )

The query to commit the transaction.

eZMySQLDB::concatString (   $strings = array())
eZMySQLDB::connect (   $server,
  $db,
  $user,
  $password,
  $socketPath,
  $charset = null 
)
private

Opens a new connection to a MySQL database and returns the connection

Referenced by eZMySQLDB().

eZMySQLDB::createDatabase (   $dbName)
eZMySQLDB::databaseClientVersion ( )
virtual

Implements eZDBInterface.

eZMySQLDB::databaseName ( )
virtual

Implements eZDBInterface.

eZMySQLDB::databaseServerVersion ( )
eZMySQLDB::escapeString (   $str)
virtual

Implements eZDBInterface.

eZMySQLDB::eZMySQLDB (   $parameters)

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

Connect to master server

eZMySQLDB::eZTableList ( )
virtual

Implements eZDBInterface.

eZMySQLDB::isCharsetSupported (   $charset)

Referenced by connect().

eZMySQLDB::lastSerialID (   $table = false,
  $column = false 
)
virtual

Implements eZDBInterface.

eZMySQLDB::lock (   $table)
virtual

Implements eZDBInterface.

eZMySQLDB::md5 (   $str)
eZMySQLDB::query (   $sql)
virtual
eZMySQLDB::relationCount (   $relationType = EZ_DB_RELATION_TABLE)
virtual

Implements eZDBInterface.

Referenced by relationCounts().

eZMySQLDB::relationCounts (   $relationMask)
virtual

Implements eZDBInterface.

eZMySQLDB::relationList (   $relationType = EZ_DB_RELATION_TABLE)
virtual

Implements eZDBInterface.

eZMySQLDB::relationMatchRegexp (   $relationType)
virtual

Implements eZDBInterface.

eZMySQLDB::removeRelation (   $relationName,
  $relationType 
)
virtual

Implements eZDBInterface.

eZMySQLDB::rollbackQuery ( )

The query to cancel the transaction.

eZMySQLDB::setError ( )
virtual
eZMySQLDB::subString (   $string,
  $from,
  $len = null 
)
eZMySQLDB::supportedRelationTypeMask ( )
virtual

Implements eZDBInterface.

eZMySQLDB::supportedRelationTypes ( )
virtual

Implements eZDBInterface.

eZMySQLDB::unlock ( )
virtual

Implements eZDBInterface.

Member Data Documentation

eZMySQLDB::$CharsetMapping

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