Public Member Functions | |
| __construct ($con) | |
| getSqlCreate ($model) | |
| getSqlIndexes ($model) | |
| getSqlDelete ($model) | |
Public Attributes | |
| $mappings | |
| $defaults | |
Private Attributes | |
| $con = null | |
This class is for MySQL, you can create a class on the same model for another database engine.
| Pluf_DB_Schema_MySQL::__construct | ( | $ | con | ) |
| Pluf_DB_Schema_MySQL::getSqlCreate | ( | $ | model | ) |
Get the SQL to generate the tables of the given model.
| Object | Model |
| Pluf_DB_Schema_MySQL::getSqlIndexes | ( | $ | model | ) |
Get the SQL to generate the indexes of the given model.
| Object | Model |
| Pluf_DB_Schema_MySQL::getSqlDelete | ( | $ | model | ) |
Get the SQL to drop the tables corresponding to the model.
| Object | Model |
| Pluf_DB_Schema_MySQL::$mappings |
Initial value:
array(
'varchar' => 'varchar(%s)',
'sequence' => 'mediumint(9) unsigned not null auto_increment',
'boolean' => 'bool',
'date' => 'date',
'datetime' => 'datetime',
'file' => 'varchar(150)',
'manytomany' => null,
'foreignkey' => 'mediumint(9) unsigned',
'text' => 'longtext',
'html' => 'longtext',
'time' => 'time',
'integer' => 'integer',
'email' => 'varchar(150)',
'password' => 'varchar(150)',
'float' => 'numeric(%s, %s)',
'blob' => 'blob',
)
| Pluf_DB_Schema_MySQL::$defaults |
Initial value:
array(
'varchar' => "''",
'sequence' => null,
'boolean' => 1,
'date' => 0,
'datetime' => 0,
'file' => "''",
'manytomany' => null,
'foreignkey' => 0,
'text' => "''",
'html' => "''",
'time' => 0,
'integer' => 0,
'email' => "''",
'password' => "''",
'float' => 0.0,
'blob' => "''",
)
Pluf_DB_Schema_MySQL::$con = null [private] |