W3cubDocs

/Phalcon 2

Interface Phalcon\Db\DialectInterface

Phalcon\Db\DialectInterface initializer

Methods

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

Generates the SQL for LIMIT clause

abstract public string forUpdate (string $sqlQuery)

Returns a SQL modified with a FOR UPDATE clause

abstract public string sharedLock (string $sqlQuery)

Returns a SQL modified with a LOCK IN SHARE MODE clause

abstract public string select (array $definition)

Builds a SELECT statement

abstract public string getColumnList (array $columnList)

Gets a list of columns

abstract public getColumnDefinition (Phalcon\Db\ColumnInterface $column)

Gets the column name in MySQL

abstract public string addColumn (string $tableName, string $schemaName, Phalcon\Db\ColumnInterface $column)

Generates SQL to add a column to a table

abstract public string modifyColumn (string $tableName, string $schemaName, Phalcon\Db\ColumnInterface $column)

Generates SQL to modify a column in a table

abstract public string dropColumn (string $tableName, string $schemaName, string $columnName)

Generates SQL to delete a column from a table

abstract public string addIndex (string $tableName, string $schemaName, Phalcon\Db\IndexInterface $index)

Generates SQL to add an index to a table

abstract public string dropIndex (string $tableName, string $schemaName, string $indexName)

Generates SQL to delete an index from a table

abstract public string addPrimaryKey (string $tableName, string $schemaName, Phalcon\Db\IndexInterface $index)

Generates SQL to add the primary key to a table

abstract public string dropPrimaryKey (string $tableName, string $schemaName)

Generates SQL to delete primary key from a table

abstract public string addForeignKey (string $tableName, string $schemaName, Phalcon\Db\ReferenceInterface $reference)

Generates SQL to add an index to a table

abstract public string dropForeignKey (string $tableName, string $schemaName, string $referenceName)

Generates SQL to delete a foreign key from a table

abstract public string createTable (string $tableName, string $schemaName, array $definition)

Generates SQL to create a table

abstract public string dropTable (string $tableName, string $schemaName)

Generates SQL to drop a table

abstract public string createView (string $viewName, array $definition, string $schemaName)

Generates SQL to create a view

abstract public string dropView (string $viewName, string $schemaName, [unknown $ifExists])

Generates SQL to drop a view

abstract public string tableExists (string $tableName, [string $schemaName])

Generates SQL checking for the existence of a schema.table

abstract public string viewExists (string $viewName, [string $schemaName])

Generates SQL checking for the existence of a schema.view

abstract public string describeColumns (string $table, [string $schema])

Generates SQL to describe a table

abstract public array listTables ([string $schemaName])

List all tables on database

abstract public array listViews ([string $schemaName])

List all views on database

abstract public string describeIndexes (string $table, [string $schema])

Generates SQL to query indexes on a table

abstract public string describeReferences (string $table, [string $schema])

Generates SQL to query foreign keys on a table

abstract public string tableOptions (string $table, [string $schema])

Generates the SQL to describe the table creation options

abstract public boolean supportsSavepoints ()

Checks whether the platform supports savepoints

abstract public boolean supportsReleaseSavepoints ()

Checks whether the platform supports releasing savepoints.

abstract public string createSavepoint (string $name)

Generate SQL to create a new savepoint

abstract public string releaseSavepoint (string $name)

Generate SQL to release a savepoint

abstract public string rollbackSavepoint (string $name)

Generate SQL to rollback a savepoint

© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/2.0.0/api/Phalcon_Db_DialectInterface.html