PHP 클래스 MysqlDataSourceProvider, recess

저자: Kris Jordan ([email protected])
상속: implements IPdoDataSourceProvider
파일 보기 프로젝트 열기: KrisJordan/recess 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$mysqlToRecessMappings
$pdo
$recessToMysqlMappings

공개 메소드들

메소드 설명
cascadeTableDescriptor ( string $table, RecessTableDescriptor $descriptor ) Sanity check and semantic sugar from higher level representation of table pushed down to the RDBMS representation of the table.
createTableSql ( RecessTableDescriptor $definition ) Given a Table Definition, return the CREATE TABLE SQL statement in the MySQL's syntax.
dropTable ( string $table ) Drop a table from MySql database.
emptyTable ( string $table ) Empty a table from MySql database.
executeSqlBuilder ( SqlBuilder $builder, string $action, PdoDataSource $source ) : boolean
fetchAll ( PDOStatement $statement ) : array Fetch all returns columns typed as Recess expects: i.e. Dates become Unix Time Based and TinyInts are converted to Boolean
getColumns ( string $table ) : array(string) List the column names of a table alphabetically.
getMysqlToRecessMappings ( )
getRecessToMysqlMappings ( )
getRecessType ( $mysqlType )
getStatementForBuilder ( SqlBuilder $builder, $action, PdoDataSource $source )
getTableDescriptor ( string $table ) : RecessTableDescriptor Retrieve the a table's RecessTableDescriptor.
getTables ( ) : array(string) List the tables in a data source.
init ( PDO $pdo ) Initialize with a reference back to the PDO object.

메소드 상세

cascadeTableDescriptor() 공개 메소드

Sanity check and semantic sugar from higher level representation of table pushed down to the RDBMS representation of the table.
public cascadeTableDescriptor ( string $table, RecessTableDescriptor $descriptor )
$table string
$descriptor RecessTableDescriptor

createTableSql() 공개 메소드

Given a Table Definition, return the CREATE TABLE SQL statement in the MySQL's syntax.
public createTableSql ( RecessTableDescriptor $definition )
$definition RecessTableDescriptor

dropTable() 공개 메소드

Drop a table from MySql database.
public dropTable ( string $table )
$table string Name of table.

emptyTable() 공개 메소드

Empty a table from MySql database.
public emptyTable ( string $table )
$table string Name of table.

executeSqlBuilder() 공개 메소드

public executeSqlBuilder ( SqlBuilder $builder, string $action, PdoDataSource $source ) : boolean
$builder SqlBuilder
$action string
$source PdoDataSource
리턴 boolean

fetchAll() 공개 메소드

TODO: Refactor this into the query code so that MySql does the type conversion instead of doing it slow and manually in PHP.
public fetchAll ( PDOStatement $statement ) : array
$statement PDOStatement
리턴 array fetchAll() of statement

getColumns() 공개 메소드

List the column names of a table alphabetically.
public getColumns ( string $table ) : array(string)
$table string Table whose columns to list.
리턴 array(string)

getMysqlToRecessMappings() 정적인 공개 메소드

static public getMysqlToRecessMappings ( )

getRecessToMysqlMappings() 정적인 공개 메소드

static public getRecessToMysqlMappings ( )

getRecessType() 공개 메소드

public getRecessType ( $mysqlType )

getStatementForBuilder() 공개 메소드

public getStatementForBuilder ( SqlBuilder $builder, $action, PdoDataSource $source )
$builder SqlBuilder
$source PdoDataSource

getTableDescriptor() 공개 메소드

Retrieve the a table's RecessTableDescriptor.
public getTableDescriptor ( string $table ) : RecessTableDescriptor
$table string Name of table.
리턴 RecessTableDescriptor

getTables() 공개 메소드

List the tables in a data source.
public getTables ( ) : array(string)
리턴 array(string)

init() 공개 메소드

Initialize with a reference back to the PDO object.
public init ( PDO $pdo )
$pdo PDO

프로퍼티 상세

$mysqlToRecessMappings 보호되어 있는 정적으로 프로퍼티

protected static $mysqlToRecessMappings

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

protected $pdo

$recessToMysqlMappings 보호되어 있는 정적으로 프로퍼티

protected static $recessToMysqlMappings