PHP Class LazyRecord\SqlBuilder\MysqlBuilder

Inheritance: extends BaseBuilder
Show file Open project: corneltek/lazyrecord

Public Methods

Method Description
buildColumnSql ( LazyRecord\Schema\SchemaInterface $schema, DeclareColumn $column ) Override buildColumnSql to support inline reference.
buildForeignKeyConstraint ( Relationship $rel ) Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-foreign-key-constraints.html for correct foreign key definition.
createTable ( LazyRecord\Schema\SchemaInterface $schema )
dropTable ( LazyRecord\Schema\SchemaInterface $schema )
finalize ( )
prepare ( )

Method Details

buildColumnSql() public method

MySQL Syntax: reference_definition: REFERENCES tbl_name (index_col_name,...) [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE] [ON DELETE reference_option] [ON UPDATE reference_option] reference_option: RESTRICT | CASCADE | SET NULL | NO ACTION A reference example: PRIMARY KEY (idEmployee) , CONSTRAINT fkEmployee_Addresses FOREIGN KEY fkEmployee_Addresses (idAddresses) REFERENCES schema.Addresses (idAddresses) ON DELETE NO ACTION ON UPDATE NO ACTION FOREIGN KEY (order_uuid) REFERENCES orders(uuid)
public buildColumnSql ( LazyRecord\Schema\SchemaInterface $schema, DeclareColumn $column )
$schema LazyRecord\Schema\SchemaInterface
$column LazyRecord\Schema\DeclareColumn

buildForeignKeyConstraint() public method

Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-foreign-key-constraints.html for correct foreign key definition.
public buildForeignKeyConstraint ( Relationship $rel )
$rel LazyRecord\Schema\Relationship\Relationship

createTable() public method

public createTable ( LazyRecord\Schema\SchemaInterface $schema )
$schema LazyRecord\Schema\SchemaInterface

dropTable() public method

public dropTable ( LazyRecord\Schema\SchemaInterface $schema )
$schema LazyRecord\Schema\SchemaInterface

finalize() public method

public finalize ( )

prepare() public method

public prepare ( )