SQLGenerator
class SQLGenerator (View source)
Traits
Methods
Add tiny integer column
Add Big integer column
Add Medium integer column
Add timestamp column
Add Foreign KEY constraints
SQLGenerator constructor
Generate the sql
Add new column in the table
Drop table column
Set the engine
Get the engine
Set the collation
Get the collation
Set the charset
Get the charset
Get the define table name
Set the scope
Set the adapter
Details
SQLGenerator
addFloat(string $column, array $attribute = [])
Add float column
SQLGenerator
addDouble(string $column, array $attribute = [])
Add double column
SQLGenerator
addDoublePrimary(string $column)
Add double primary column
SQLGenerator
addFloatPrimary(string $column)
Add float primary column
SQLGenerator
addIncrement(string $column)
Add increment primary column
SQLGenerator
addInteger(string $column, array $attribute = [])
Add integer column
SQLGenerator
addIntegerPrimary(string $column)
Add integer primary column
SQLGenerator
addBigIncrement(string $column)
Add big increment primary column
SQLGenerator
addTinyInteger(string $column, array $attribute = [])
Add tiny integer column
SQLGenerator
addBigInteger(string $column, array $attribute = [])
Add Big integer column
SQLGenerator
addMediumInteger(string $column, array $attribute = [])
Add Medium integer column
SQLGenerator
addMediumIncrement(string $column)
Add Medium integer column
SQLGenerator
addBoolean(string $column, array $attribute = [])
Add boolean column
SQLGenerator
addUuid(string $column, array $attribute = [])
Add UUID column
SQLGenerator
addBinary(string $column, array $attribute = [])
Add BLOB column
SQLGenerator
addIpAddress(string $column, array $attribute = [])
Add ip column
SQLGenerator
addMacAddress(string $column, array $attribute = [])
Add mac column
SQLGenerator
addString(string $column, array $attribute = [])
Add string column
SQLGenerator
addLongString(string $column, array $attribute = [])
Add string column
SQLGenerator
addJson(string $column, array $attribute = [])
Add json column
SQLGenerator
addChar(string $column, array $attribute = [])
Add character column
SQLGenerator
addLongtext(string $column, array $attribute = [])
Add longtext column
SQLGenerator
addText(string $column, array $attribute = [])
Add text column
SQLGenerator
addBlob(string $column, array $attribute = [])
Add blob column
SQLGenerator
addDatetime(string $column, array $attribute = [])
Add datetime column
SQLGenerator
addDate(string $column, array $attribute = [])
Add date column
SQLGenerator
addTime(string $column, array $attribute = [])
Add time column
SQLGenerator
addYear(string $column, array $attribute = [])
Add year column
SQLGenerator
addTimestamp(string $column, array $attribute = [])
Add timestamp column
SQLGenerator
addTimestamps()
Add default timestamps
SQLGenerator
addForeign(string $name, array $attributes = [])
Add Foreign KEY constraints
SQLGenerator
dropForeign(string $name)
Drop constraintes column;
SQLGenerator
addIndex(string $name)
Add table index;
SQLGenerator
dropIndex(string $name)
Drop table index;
SQLGenerator
dropPrimary()
Drop primary column;
SQLGenerator
addUnique(string $name)
Add table unique;
SQLGenerator
dropUnique(string $name)
Drop table unique;
__construct(string $table, string $adapter = 'mysql', string $scope = 'create')
SQLGenerator constructor
string
make()
Generate the sql
SQLGenerator
addColumn(string $name, string $type, array $attributes = [])
Add new column in the table
SQLGenerator
dropColumn(string $name)
Drop table column
void
withEngine(string $engine)
Set the engine
string
getEngine()
Get the engine
void
withCollation(string $collation)
Set the collation
string
getCollation()
Get the collation
void
withCharset(string $charset)
Set the charset
string
getCharset()
Get the charset
string
getTable()
Get the define table name
SQLGenerator
setScope(string $scope)
Set the scope
SQLGenerator
setAdapter(string $adapter)
Set the adapter