MYSQL
MYSQL
Constants for database types
Schema CREATE table class
$db : \Pop\Db\Adapter\AbstractAdapter
Database object
column(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Set the current column
| string | $name | 
constraint(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Set the current constraint
| string | $name | 
addColumn(string $name, string $type, mixed $size = null, mixed $precision = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a column
| string | $name | |
| string | $type | |
| mixed | $size | |
| mixed | $precision | 
addColumnAttribute(string  $attribute) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a custom column attribute
| string | $attribute | 
increment(integer  $start = 1) : \Pop\Db\Sql\Schema\AbstractStructure
                Set the current column as an increment column
| integer | $start | 
defaultIs(mixed  $value) : \Pop\Db\Sql\Schema\AbstractStructure
                Set the current column's default value
| mixed | $value | 
nullable() : \Pop\Db\Sql\Schema\AbstractStructure
Set the current column as nullable
notNullable() : \Pop\Db\Sql\Schema\AbstractStructure
Set the current column as NOT nullable
unsigned() : \Pop\Db\Sql\Schema\AbstractStructure
Set the current column as unsigned
index(string $column, string $name = null, string $type = 'index') : \Pop\Db\Sql\Schema\AbstractStructure
Create an index
| string | $column | |
| string | $name | |
| string | $type | 
unique(string $column = null, string $name = null) : \Pop\Db\Sql\Schema\AbstractStructure
Create a UNIQUE index
| string | $column | |
| string | $name | 
primary(string $column = null, string $name = null) : \Pop\Db\Sql\Schema\AbstractStructure
Create a PRIMARY KEY index
| string | $column | |
| string | $name | 
foreignKey(string $column, string $name = null) : \Pop\Db\Sql\Schema\AbstractStructure
Create a FOREIGN KEY constraint
| string | $column | |
| string | $name | 
references(string  $foreignTable) : \Pop\Db\Sql\Schema\AbstractStructure
                Assign FOREIGN KEY reference table
| string | $foreignTable | 
on(string  $foreignColumn) : \Pop\Db\Sql\Schema\AbstractStructure
                Assign FOREIGN KEY reference table column
| string | $foreignColumn | 
onDelete(string  $action = null) : \Pop\Db\Sql\Schema\AbstractStructure
                Assign FOREIGN KEY ON DELETE action
| string | $action | 
integer(string $name, mixed $size = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add an INTEGER column
| string | $name | |
| mixed | $size | 
int(string $name, mixed $size = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add an INT column
| string | $name | |
| mixed | $size | 
bigInt(string $name, mixed $size = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a BIGINT column
| string | $name | |
| mixed | $size | 
mediumInt(string $name, mixed $size = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a MEDIUMINT column
| string | $name | |
| mixed | $size | 
smallInt(string $name, mixed $size = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a SMALLINT column
| string | $name | |
| mixed | $size | 
tinyInt(string $name, mixed $size = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a TINYINT column
| string | $name | |
| mixed | $size | 
float(string $name, mixed $size = null, mixed $precision = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a FLOAT column
| string | $name | |
| mixed | $size | |
| mixed | $precision | 
real(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a REAL column
| string | $name | 
double(string $name, mixed $size = null, mixed $precision = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a DOUBLE column
| string | $name | |
| mixed | $size | |
| mixed | $precision | 
decimal(string $name, mixed $size = null, mixed $precision = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a DECIMAL column
| string | $name | |
| mixed | $size | |
| mixed | $precision | 
numeric(string $name, mixed $size = null, mixed $precision = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a NUMERIC column
| string | $name | |
| mixed | $size | |
| mixed | $precision | 
date(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a DATE column
| string | $name | 
time(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a TIME column
| string | $name | 
datetime(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a DATETIME column
| string | $name | 
timestamp(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a TIMESTAMP column
| string | $name | 
year(string $name, mixed $size = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a YEAR column
| string | $name | |
| mixed | $size | 
text(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a TEXT column
| string | $name | 
tinyText(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a TINYTEXT column
| string | $name | 
mediumText(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a MEDIUMTEXT column
| string | $name | 
longText(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a LONGTEXT column
| string | $name | 
blob(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a BLOB column
| string | $name | 
mediumBlob(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a MEDIUMBLOB column
| string | $name | 
longBlob(string  $name) : \Pop\Db\Sql\Schema\AbstractStructure
                Add a LONGBLOB column
| string | $name | 
char(string $name, integer $size = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a CHAR column
| string | $name | |
| integer | $size | 
varchar(string $name, integer $size = null) : \Pop\Db\Sql\Schema\AbstractStructure
Add a VARCHAR column
| string | $name | |
| integer | $size | 
__construct(\Pop\Db\Adapter\AbstractAdapter  $db) 
                Constructor
Instantiate the SQL object
| \Pop\Db\Adapter\AbstractAdapter | $db | 
db() : \Pop\Db\Adapter\AbstractAdapter
Get the current database adapter object (alias method)
getDb() : \Pop\Db\Adapter\AbstractAdapter
Get the current database adapter object
setIdQuoteType(string  $type = self::NO_QUOTE) : \Pop\Db\Sql\AbstractSql
                Set the quote ID type
| string | $type | 
setPlaceholder(string  $placeholder) : \Pop\Db\Sql\AbstractSql
                Set the placeholder
| string | $placeholder | 
ifNotExists() : \Pop\Db\Sql\Schema\Create
Set the IF NOT EXISTS flag
setEngine(string  $engine) : \Pop\Db\Sql\Schema\Create
                Set the IF NOT EXISTS flag
| string | $engine |