1
0
mirror of synced 2025-02-20 14:13:15 +03:00

ported stuff from MDB2

This commit is contained in:
zYne 2007-06-13 21:58:22 +00:00
parent 27ae95af91
commit 03e62f95f0

View File

@ -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
*