ported stuff from MDB2
This commit is contained in:
parent
27ae95af91
commit
03e62f95f0
@ -172,6 +172,45 @@ END;
|
||||
$this->dropConstraint($table, $indexName);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A method to return the required SQL string that fits between CREATE ... TABLE
|
||||
* to create the table as a temporary table.
|
||||
*
|
||||
* @return string The string required to be placed between "CREATE" and "TABLE"
|
||||
* to generate a temporary table, if possible.
|
||||
*/
|
||||
public function getTemporaryTableQuery()
|
||||
{
|
||||
return 'GLOBAL TEMPORARY';
|
||||
}
|
||||
/**
|
||||
* getAdvancedForeignKeyOptions
|
||||
* Return the FOREIGN KEY query section dealing with non-standard options
|
||||
* as MATCH, INITIALLY DEFERRED, ON UPDATE, ...
|
||||
*
|
||||
* @param array $definition foreign key definition
|
||||
* @return string
|
||||
* @access protected
|
||||
*/
|
||||
public function getAdvancedForeignKeyOptions(array $definition)
|
||||
{
|
||||
$query = '';
|
||||
if (isset($definition['onDelete'])) {
|
||||
$query .= ' ON DELETE ' . $definition['on_delete'];
|
||||
}
|
||||
if (isset($definition['deferrable'])) {
|
||||
$query .= ' DEFERRABLE';
|
||||
} else {
|
||||
$query .= ' NOT DEFERRABLE';
|
||||
}
|
||||
if (isset($definition['feferred'])) {
|
||||
$query .= ' INITIALLY DEFERRED';
|
||||
} else {
|
||||
$query .= ' INITIALLY IMMEDIATE';
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* create a new table
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user