Documentation

目次

前のトピックへ

< Class Phalcon\Db\Column

次のトピックへ

Class Phalcon\Db\Dialect\Mysql >

このページ

Abstract class Phalcon\Db\Dialect

This is the base class to each database dialect. This implements common methods to transform intermediate code into its RDBM related syntax

Methods

public string limit (string $sqlQuery, int $number)

Generates the SQL for LIMIT clause

<?php

 $sql = $dialect->limit('SELECT * FROM robots', 10);
 echo $sql; // SELECT * FROM robots LIMIT 10

public string forUpdate (string $sqlQuery)

Returns a SQL modified with a FOR UPDATE clause

<?php

 $sql = $dialect->forUpdate('SELECT * FROM robots');
 echo $sql; // SELECT * FROM robots FOR UPDATE

public string sharedLock (string $sqlQuery)

Returns a SQL modified with a LOCK IN SHARE MODE clause

<?php

 $sql = $dialect->sharedLock('SELECT * FROM robots');
 echo $sql; // SELECT * FROM robots LOCK IN SHARE MODE

public string getColumnList (array $columnList)

Gets a list of columns with escaped identifiers

<?php

 echo $dialect->getColumnList(array('column1', 'column'));

public string getSqlExpression (array $expression, [string $escapeChar])

Transforms an intermediate representation for a expression into a database system valid expression

public string getSqlTable (array $table, [string $escapeChar])

Transform an intermediate representation for a schema/table into a database system valid expression

public string select (array $definition)

Builds a SELECT statement

public boolean supportsSavepoints ()

Checks whether the platform supports savepoints

public boolean supportsReleaseSavepoints ()

Checks whether the platform supports releasing savepoints.

public string createSavepoint (string $name)

Generate SQL to create a new savepoint

public string releaseSavepoint (string $name)

Generate SQL to release a savepoint

public string rollbackSavepoint (string $name)

Generate SQL to rollback a savepoint