TwistPHP Documentation

TableStructure

File path: dist/twist/Core/Models/Database/TableStructure.model.php
Namespace: Twist\Core\Models\Database
Extends:

Type: Model

TableStructure — Simply create tables in an object orientated way with no need to write a mysql query

Example Usage

<?php
//Set the variables for the example
$strTable 'foo';
$strDatabase null;

//Call the function copyTo with the example vars
$resTableStructure = new \Twist\Core\Models\Database\TableStructure();
$resTableStructure -> copyTo($strTable$strDatabase);

Method List

Method Access Returns
__constructconstructvoid
__destructpublicvoid
copyTopublicvoid
collationpublicvoid
getCollationCharsetprotectedvoid
charsetprotectedvoid
enginepublicvoid
commentpublicvoid
autoIncrementpublicvoid
primaryKeypublicvoid
dropPrimaryKeypublicvoid
addUniqueKeypublicvoid
addIndexpublicvoid
dropUniqueKeypublicvoid
dropIndexpublicvoid
columnpublicvoid
isColumnpublicvoid
addColumnpublicvoid
alterColumnpublicvoid
setColumnDataprotectedvoid
renameColumnpublicvoid
dropColumnpublicvoid
setColumnOrderpublicvoid
commitpublicvoid
sqlpublicvoid
sqlAlterpublicvoid
generatePrimaryKeyprotectedvoid
generateUniqueKeyprotectedvoid
generateIndexesprotectedvoid
generateColumnSQLprotectedvoid
getColumnTypeprotectedvoid
generateAlterQueryprotectedvoid