PHP 클래스 Spot\Adapter\Mysql

상속: extends Spot\Adapter\PDO\BaseAbstract, implements Spot\Adapter\AdapterInterface
파일 보기 프로젝트 열기: vlucas/spot

보호된 프로퍼티들

프로퍼티 타입 설명
$_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

공개 메소드들

메소드 설명
characterSet ( $charset, $collate = 'utf8_unicode_ci' ) Set character set and MySQL collate string
engine ( $engine = null ) Set database engine (InnoDB, MyISAM, etc)
escapeField ( $field ) Escape/quote direct user input
formatMigrateOptions ( array $options ) Ensure migration options are full and have all keys required
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, array $options ) : string Syntax for CREATE TABLE with given fields and column syntax
migrateSyntaxTableUpdate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : string Syntax for ALTER TABLE with given fields and column syntax

보호된 메소드들

메소드 설명
getColumnsForTable ( String $table, $source ) : Array Get columns for current table

메소드 상세

characterSet() 공개 메소드

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

engine() 공개 메소드

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

escapeField() 공개 메소드

Escape/quote direct user input
public escapeField ( $field )

formatMigrateOptions() 공개 메소드

Ensure migration options are full and have all keys required
public formatMigrateOptions ( array $options )
$options array

getColumnsForTable() 보호된 메소드

Get columns for current table
protected getColumnsForTable ( String $table, $source ) : Array
$table String Table name
리턴 Array

migrateSyntaxFieldCreate() 공개 메소드

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
리턴 string SQL syntax

migrateSyntaxFieldUpdate() 공개 메소드

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
리턴 string SQL syntax

migrateSyntaxTableCreate() 공개 메소드

Syntax for CREATE TABLE with given fields and column syntax
public migrateSyntaxTableCreate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : 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
$options array Options that may affect migrations or how tables are setup
리턴 string SQL syntax

migrateSyntaxTableUpdate() 공개 메소드

Syntax for ALTER TABLE with given fields and column syntax
public migrateSyntaxTableUpdate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : 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
$options array
리턴 string SQL syntax

프로퍼티 상세

$_charset 보호되어 있는 프로퍼티

protected $_charset

$_collate 보호되어 있는 프로퍼티

protected $_collate

$_engine 보호되어 있는 프로퍼티

Driver-Specific settings
protected $_engine

$_fieldTypeMap 보호되어 있는 프로퍼티

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

$_format_date 보호되어 있는 프로퍼티

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

$_format_datetime 보호되어 있는 프로퍼티

protected $_format_datetime

$_format_time 보호되어 있는 프로퍼티

protected $_format_time