PHP Class phpDataMapper_Adapter_Mysql, phpDataMapper

Inheritance: extends phpDataMapper_Adapter_PDO
Afficher le fichier Open project: vlucas/phpDataMapper

Protected Properties

Свойство Type Description
$_charset
$_collate
$_engine Driver-Specific settings
$_fieldTypeMap @todo Have to improve this to allow custom types, callbacks, and validation
$format_date Format for date columns, formatted for PHP's date() function
$format_datetime
$format_time

Méthodes publiques

Méthode Description
characterSet ( $charset, $collate = 'utf8_unicode_ci' ) Set character set and MySQL collate string
dsn ( ) : string Get DSN string for PDO to connect with
engine ( $engine = null ) Set database engine (InnoDB, MyISAM, etc)
migrateSyntaxFieldCreate ( string $fieldName, array $fieldInfo ) : string Syntax for each column in CREATE TABLE command
migrateSyntaxFieldUpdate ( string $fieldName, array $fieldInfo, $add = false ) : string Syntax for each column in CREATE TABLE command
migrateSyntaxTableCreate ( string $table, array $formattedFields, array $columnsSyntax ) : string Syntax for CREATE TABLE with given fields and column syntax
migrateSyntaxTableUpdate ( string $table, array $formattedFields, array $columnsSyntax ) : string Syntax for ALTER TABLE with given fields and column syntax

Méthodes protégées

Méthode Description
getColumnsForTable ( String $table, $source ) : Array Get columns for current table

Method Details

characterSet() public méthode

Set character set and MySQL collate string
public characterSet ( $charset, $collate = 'utf8_unicode_ci' )

dsn() public méthode

Get DSN string for PDO to connect with
public dsn ( ) : string
Résultat string

engine() public méthode

Set database engine (InnoDB, MyISAM, etc)
public engine ( $engine = null )

getColumnsForTable() protected méthode

Get columns for current table
protected getColumnsForTable ( String $table, $source ) : Array
$table String Table name
Résultat Array

migrateSyntaxFieldCreate() public méthode

Syntax for each column in CREATE TABLE command
public migrateSyntaxFieldCreate ( string $fieldName, array $fieldInfo ) : string
$fieldName string Field name
$fieldInfo array Array of field settings
Résultat string SQL syntax

migrateSyntaxFieldUpdate() public méthode

Syntax for each column in CREATE TABLE command
public migrateSyntaxFieldUpdate ( string $fieldName, array $fieldInfo, $add = false ) : string
$fieldName string Field name
$fieldInfo array Array of field settings
Résultat string SQL syntax

migrateSyntaxTableCreate() public méthode

Syntax for CREATE TABLE with given fields and column syntax
public migrateSyntaxTableCreate ( string $table, array $formattedFields, array $columnsSyntax ) : string
$table string Table name
$formattedFields array Array of fields with all settings
$columnsSyntax array Array of SQL syntax of columns produced by 'migrateSyntaxFieldCreate' function
Résultat string SQL syntax

migrateSyntaxTableUpdate() public méthode

Syntax for ALTER TABLE with given fields and column syntax
public migrateSyntaxTableUpdate ( string $table, array $formattedFields, array $columnsSyntax ) : string
$table string Table name
$formattedFields array Array of fields with all settings
$columnsSyntax array Array of SQL syntax of columns produced by 'migrateSyntaxFieldUpdate' function
Résultat string SQL syntax

Property Details

$_charset protected_oe property

protected $_charset

$_collate protected_oe property

protected $_collate

$_engine protected_oe property

Driver-Specific settings
protected $_engine

$_fieldTypeMap protected_oe property

@todo Have to improve this to allow custom types, callbacks, and validation
protected $_fieldTypeMap

$format_date protected_oe property

Format for date columns, formatted for PHP's date() function
protected $format_date

$format_datetime protected_oe property

protected $format_datetime

$format_time protected_oe property

protected $format_time