Skip to content
Permalink
Browse files

Add 3 abstract methods to Cake\Database\Driver

  • Loading branch information...
trichins authored and markstory committed Jan 6, 2014
1 parent 757ca35 commit e58acb4478e96cc35fbbb5834af28ba4657c5c4a
Showing with 33 additions and 0 deletions.
  1. +33 −0 Cake/Database/Driver.php
@@ -143,6 +143,39 @@ public function supportsQuoting() {
return true;
}
/**
* Returns a callable function that will be used to transform a passed Query object.
* This function, in turn, will return an instance of a Query object that has been
* transformed to accommodate any specificities of the SQL dialect in use.
*
* @param string $type the type of query to be transformed
* (select, insert, update, delete)
* @return callable
*/
public abstract function queryTranslator($type);
/**
* Get the schema dialect.
*
* Used by Cake\Schema package to reflect schema and
* generate schema.
*
* If all the tables that use this Driver specify their
* own schemas, then this may return null.
*
* @return Cake\Database\Schema\BaseSchema
*/
public abstract function schemaDialect();
/**
* Quotes a database identifier (a column name, table name, etc..) to
* be used safely in queries without the risk of using reserver words
*
* @param string $identifier
* @return string
*/
public abstract function quoteIdentifier($identifier);
/**
* Escapes values for use in schema definitions.
*

0 comments on commit e58acb4

Please sign in to comment.
You can’t perform that action at this time.