PHP 클래스 Spot\Adapter\Sqlite

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

보호된 프로퍼티들

프로퍼티 타입 설명
$_charset not supported
$_collate only UTF_8 supported
$_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

공개 메소드들

메소드 설명
connection ( ) : object Get database connection
escapeField ( $field ) Escape/quote direct user input
migrate ( String $table, array $fields, array $options = [] ) Migrate table structure changes to database
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
truncateDatasource ( $datasource ) Truncate a database table Should delete all rows and reset serial/auto_increment keys to 0

보호된 메소드들

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

메소드 상세

connection() 공개 메소드

Get database connection
public connection ( ) : object
리턴 object PDO

escapeField() 공개 메소드

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

getColumnsForTable() 보호된 메소드

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

migrate() 공개 메소드

Migrate table structure changes to database
public migrate ( String $table, array $fields, array $options = [] )
$table String Table name
$fields array Fields and their attributes as defined in the mapper
$options array Options that may affect migrations or how tables are setup

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

shouldUpdateMigrateField() 보호된 메소드

protected shouldUpdateMigrateField ( $formattedField, $columnInfo )

truncateDatasource() 공개 메소드

Truncate a database table Should delete all rows and reset serial/auto_increment keys to 0
public truncateDatasource ( $datasource )

프로퍼티 상세

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

not supported
protected $_charset

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

only UTF_8 supported
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