Class: Doctrine_DataDict_Mysql

Source Location: /Doctrine/DataDict/Mysql.php

Class Doctrine_DataDict_Mysql

Class Overview

Located in /Doctrine/DataDict/Mysql.php [line 33]

Doctrine_Connection_Module
   |
   --Doctrine_DataDict
      |
      --Doctrine_DataDict_Mysql
Author(s): Information Tags:
Version:  $Revision: 1730 $
Link:  www.phpdoctrine.com
Since:  1.0
License:  LGPL

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Doctrine_Connection_Module

Doctrine_Connection_Module::$conn
Doctrine_Connection_Module::$moduleName

Inherited From Doctrine_DataDict

Doctrine_DataDict::compareDefinition()
Obtain an array of changes that may need to applied
Doctrine_DataDict::parseBoolean()
parseBoolean parses a literal boolean value and returns proper sql equivalent

Inherited From Doctrine_Connection_Module

Doctrine_Connection_Module::__construct()
Doctrine_Connection_Module::getConnection()
getConnection returns the connection object this module uses
Doctrine_Connection_Module::getModuleName()
getModuleName returns the name of this module

[ Top ]
Property Summary
mixed   $keywords  

[ Top ]
Method Summary
string   getCharsetFieldDeclaration()   Obtain DBMS specific SQL code portion needed to set the CHARACTER SET of a field declaration to be used in statements like CREATE TABLE.
string   getCollationFieldDeclaration()   Obtain DBMS specific SQL code portion needed to set the COLLATION of a field declaration to be used in statements like CREATE TABLE.
string   getIntegerDeclaration()   Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
string   getNativeDeclaration()   Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.
array   getPortableDeclaration()   Maps a native array description of a field to a MDB2 datatype and length

[ Top ]
Properties
mixed   $keywords = array(
'ADD', 'ALL', 'ALTER',
'ANALYZE', 'AND', 'AS',
'ASC', 'ASENSITIVE', 'BEFORE',
'BETWEEN', 'BIGINT', 'BINARY',
'BLOB', 'BOTH', 'BY',
'CALL', 'CASCADE', 'CASE',
'CHANGE', 'CHAR', 'CHARACTER',
'CHECK', 'COLLATE', 'COLUMN',
'CONDITION', 'CONNECTION', 'CONSTRAINT',
'CONTINUE', 'CONVERT', 'CREATE',
'CROSS', 'CURRENT_DATE', 'CURRENT_TIME',
'CURRENT_TIMESTAMP', 'CURRENT_USER', 'CURSOR',
'DATABASE', 'DATABASES', 'DAY_HOUR',
'DAY_MICROSECOND', 'DAY_MINUTE', 'DAY_SECOND',
'DEC', 'DECIMAL', 'DECLARE',
'DEFAULT', 'DELAYED', 'DELETE',
'DESC', 'DESCRIBE', 'DETERMINISTIC',
'DISTINCT', 'DISTINCTROW', 'DIV',
'DOUBLE', 'DROP', 'DUAL',
'EACH', 'ELSE', 'ELSEIF',
'ENCLOSED', 'ESCAPED', 'EXISTS',
'EXIT', 'EXPLAIN', 'FALSE',
'FETCH', 'FLOAT', 'FLOAT4',
'FLOAT8', 'FOR', 'FORCE',
'FOREIGN', 'FROM', 'FULLTEXT',
'GRANT', 'GROUP', 'HAVING',
'HIGH_PRIORITY', 'HOUR_MICROSECOND', 'HOUR_MINUTE',
'HOUR_SECOND', 'IF', 'IGNORE',
'IN', 'INDEX', 'INFILE',
'INNER', 'INOUT', 'INSENSITIVE',
'INSERT', 'INT', 'INT1',
'INT2', 'INT3', 'INT4',
'INT8', 'INTEGER', 'INTERVAL',
'INTO', 'IS', 'ITERATE',
'JOIN', 'KEY', 'KEYS',
'KILL', 'LEADING', 'LEAVE',
'LEFT', 'LIKE', 'LIMIT',
'LINES', 'LOAD', 'LOCALTIME',
'LOCALTIMESTAMP', 'LOCK', 'LONG',
'LONGBLOB', 'LONGTEXT', 'LOOP',
'LOW_PRIORITY', 'MATCH', 'MEDIUMBLOB',
'MEDIUMINT', 'MEDIUMTEXT', 'MIDDLEINT',
'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'MOD',
'MODIFIES', 'NATURAL', 'NOT',
'NO_WRITE_TO_BINLOG', 'NULL', 'NUMERIC',
'ON', 'OPTIMIZE', 'OPTION',
'OPTIONALLY', 'OR', 'ORDER',
'OUT', 'OUTER', 'OUTFILE',
'PRECISION', 'PRIMARY', 'PROCEDURE',
'PURGE', 'RAID0', 'READ',
'READS', 'REAL', 'REFERENCES',
'REGEXP', 'RELEASE', 'RENAME',
'REPEAT', 'REPLACE', 'REQUIRE',
'RESTRICT', 'RETURN', 'REVOKE',
'RIGHT', 'RLIKE', 'SCHEMA',
'SCHEMAS', 'SECOND_MICROSECOND', 'SELECT',
'SENSITIVE', 'SEPARATOR', 'SET',
'SHOW', 'SMALLINT', 'SONAME',
'SPATIAL', 'SPECIFIC', 'SQL',
'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING',
'SQL_BIG_RESULT', 'SQL_CALC_FOUND_ROWS', 'SQL_SMALL_RESULT',
'SSL', 'STARTING', 'STRAIGHT_JOIN',
'TABLE', 'TERMINATED', 'THEN',
'TINYBLOB', 'TINYINT', 'TINYTEXT',
'TO', 'TRAILING', 'TRIGGER',
'TRUE', 'UNDO', 'UNION',
'UNIQUE', 'UNLOCK', 'UNSIGNED',
'UPDATE', 'USAGE', 'USE',
'USING', 'UTC_DATE', 'UTC_TIME',
'UTC_TIMESTAMP', 'VALUES', 'VARBINARY',
'VARCHAR', 'VARCHARACTER', 'VARYING',
'WHEN', 'WHERE', 'WHILE',
'WITH', 'WRITE', 'X509',
'XOR', 'YEAR_MONTH', 'ZEROFILL'
)
[line 35]
API Tags:
Access:  protected


[ Top ]
Methods
getCharsetFieldDeclaration  [line 390]

  string getCharsetFieldDeclaration( string $charset  )

Obtain DBMS specific SQL code portion needed to set the CHARACTER SET of a field declaration to be used in statements like CREATE TABLE.

Parameters:
string   $charset:  name of the charset

API Tags:
Return:  DBMS specific SQL code portion needed to set the CHARACTER SET of a field declaration.
Access:  public


[ Top ]
getCollationFieldDeclaration  [line 402]

  string getCollationFieldDeclaration( string $collation  )

Obtain DBMS specific SQL code portion needed to set the COLLATION of a field declaration to be used in statements like CREATE TABLE.

Parameters:
string   $collation:  name of the collation

API Tags:
Return:  DBMS specific SQL code portion needed to set the COLLATION of a field declaration.
Access:  public


[ Top ]
getIntegerDeclaration  [line 431]

  string getIntegerDeclaration( string $name, string $field  )

Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.

Parameters:
string   $name:  name the field to be declared.
string   $field: 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

unsigned Boolean flag that indicates whether the field should be declared as unsigned integer if possible.

default Integer value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


API Tags:
Return:  DBMS specific SQL code portion that should be used to declare the specified field.
Access:  public


[ Top ]
getNativeDeclaration  [line 135]

  string getNativeDeclaration( array $field  )

Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.

Parameters:
array   $field: 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

length Integer value that determines the maximum length of the text field. If this argument is missing the field should be declared to have the longest length allowed by the DBMS.

default Text value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


API Tags:
Return:  DBMS specific SQL code portion that should be used to declare the specified field.
Access:  public


[ Top ]
getPortableDeclaration  [line 230]

  array getPortableDeclaration( $field  )

Maps a native array description of a field to a MDB2 datatype and length

Parameters:
array   $field:  native field description

API Tags:
Return:  containing the various possible types, length, sign, fixed
Access:  public


[ Top ]