PHP Класс MysqlDataSourceProvider, recess

Автор: Kris Jordan ([email protected])
Наследование: implements IPdoDataSourceProvider
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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