eZPublishCommunityProject  2013.9
eZ\Publish\Core\Persistence\Legacy\EzcDbHandler Class Reference

Wrapper class for the zeta components database handler, providing some additional utility functions. More...

+ Inheritance diagram for eZ\Publish\Core\Persistence\Legacy\EzcDbHandler:

Public Member Functions

 __call ($method, $parameters)
 Proxy methods to the aggregated DB handler. More...
 
 __construct (ezcDbHandlerWrapped $ezcDbHandler)
 Construct from zeta components database handler. More...
 
 alias ($name, $alias)
 Custom alias method. More...
 
 aliasedColumn (ezcQuerySelect $query, $columnName, $tableName=null)
 Creates an alias for $tableName, $columnName in $query. More...
 
 getAutoIncrementValue ($table, $column)
 Get auto increment value. More...
 
 getSequenceName ($table, $column)
 Returns the name of the affected sequence. More...
 
 quoteColumn ($columnName, $tableName=null)
 Returns a qualified identifier for $columnName in $tableName. More...
 
 quoteIdentifier ($identifier)
 Custom quote identifier method. More...
 
 quoteTable ($tableName)
 Returns a qualified identifier for $tableName. More...
 

Static Public Member Functions

static create ($dbParams)
 Factory for getting EzcDbHandler handler object. More...
 

Protected Attributes

 $ezcDbHandler
 

Detailed Description

Wrapper class for the zeta components database handler, providing some additional utility functions.

Functions as a full proxy to the zeta components database class.

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::__construct ( ezcDbHandlerWrapped  $ezcDbHandler)

Construct from zeta components database handler.

Parameters
\ezcDbHandler$ezcDbHandler

Member Function Documentation

eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::__call (   $method,
  $parameters 
)

Proxy methods to the aggregated DB handler.

Parameters
string$method
array$parameters
Returns
mixed
eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::alias (   $name,
  $alias 
)

Custom alias method.

Ignores some properties of identifier quoting, but since we use somehow sane table and column names, ourselves, this is fine.

This is an optimization and works around the ezcDB implementation.

Parameters
string$identifier
Returns
string

Referenced by eZ\Publish\Core\Persistence\Legacy\EzcDbHandler\aliasedColumn().

eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::aliasedColumn ( ezcQuerySelect  $query,
  $columnName,
  $tableName = null 
)

Creates an alias for $tableName, $columnName in $query.

Parameters
\ezcQuerySelect$query
string$columnName
string | null$tableName
Returns
string
static eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::create (   $dbParams)
static

Factory for getting EzcDbHandler handler object.

Will use postgres or sqlite specific wrappers if dsn indicates such databases.

The DSN (data source name) defines which database to use. It's format is defined by the Apache Zeta Components Database component. Examples are:

  • mysql://root:secret/ezp For the MySQL database "ezp" on localhost, which will be accessed using user "root" with password "secret"
  • sqlite://:memory: for a SQLite in memory database (used e.g. for unit tests)

For further information on the database setup, please refer to {

See Also
http://incubator.apache.org/zetacomponents/documentation/trunk/Database/tutorial.html#handler-usage}
Parameters
string|mixed[]$dbParams
Returns
EzcDbHandler

Referenced by eZ\Bundle\EzPublishCoreBundle\ApiLoader\LegacyDbHandlerFactory\buildLegacyDbHandler().

eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::getAutoIncrementValue (   $table,
  $column 
)

Get auto increment value.

Returns the value used for autoincrement tables. Usually this will just be null. In case for sequence based RDBMS this method can return a proper value for the given column.

Parameters
string$table
string$column
Returns
mixed
eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::getSequenceName (   $table,
  $column 
)

Returns the name of the affected sequence.

Parameters
string$table
string$column
Returns
string
eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::quoteColumn (   $columnName,
  $tableName = null 
)

Returns a qualified identifier for $columnName in $tableName.

Parameters
string$columnName
string$tableName
Returns
string

Referenced by eZ\Publish\Core\Persistence\Legacy\EzcDbHandler\aliasedColumn().

eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::quoteIdentifier (   $identifier)

Custom quote identifier method.

Ignores some properties of identifier quoting, but since we use somehow sane table and column names, ourselves, this is fine.

This is an optimization and works around the ezcDB implementation.

Parameters
string$identifier
Returns
string

Referenced by eZ\Publish\Core\Persistence\Legacy\EzcDbHandler\aliasedColumn(), eZ\Publish\Core\Persistence\Legacy\EzcDbHandler\quoteColumn(), and eZ\Publish\Core\Persistence\Legacy\EzcDbHandler\quoteTable().

eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::quoteTable (   $tableName)

Returns a qualified identifier for $tableName.

Parameters
string$tableName
Returns
string

Referenced by eZ\Publish\Core\Persistence\Legacy\EzcDbHandler\quoteColumn().

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\EzcDbHandler::$ezcDbHandler
protected

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