Core_QueryBuilder_Drop
extends Core_QueryBuilder_Statement
in package
DROP Database Abstraction Layer (DBAL)
http://dev.mysql.com/doc/refman/5.5/en/drop-table.html
// Drop multiple tables
$oCore_QueryBuilder_Drop = Core_QueryBuilder::drop('TableName1')
->table('TableName2')
->execute();
Tags
Table of Contents
Properties
- $_cascade : bool
- Use CASCADE
- $_dataBase : mixed
- DataBase
- $_ifExists : bool
- Use IF EXISTS
- $_queryType : mixed
- DataBase Query Type 6 - DROP
- $_restrict : bool
- Use RESTRICT
- $_table : array<string|int, mixed>
- List of tables
- $_temporary : bool
- Use temporary
- $_unbuffered : mixed
- Query without fetching and buffering the result rows
Methods
- __call() : mixed
- Triggered when invoking inaccessible methods in an object context
- __construct() : mixed
- Constructor.
- __set() : self
- Run when writing data to inaccessible properties
- build() : string
- Build the SQL query
- cascade() : self
- Set CASCADE
- clearLimit() : self
- Clear LIMIT
- clearOffset() : self
- Clear OFFSET
- execute() : Core_DataBase
- Execute query
- getDataBase() : Core_DataBase
- Get DataBase
- ifExists() : mixed
- Set IF EXISTS
- restrict() : self
- Set RESTRICT
- setDataBase() : Core_QueryBuilder_Statement
- Set DataBase
- table() : mixed
- Add table name
- temporary() : mixed
- Set TEMPORARY
- unbuffered() : self
- Query without fetching and buffering the result rows
- _buildDrop() : string
- Build table drop list
- _isObjectSelect() : bool
- Is $object Core_QueryBuilder_Select
- _quoteColumns() : array<string|int, mixed>
- Quote columns
- _quoteValues() : array<string|int, mixed>
- Quote arary of values
Properties
$_cascade
Use CASCADE
protected
bool
$_cascade
= \FALSE
$_dataBase
DataBase
protected
mixed
$_dataBase
= \NULL
$_ifExists
Use IF EXISTS
protected
bool
$_ifExists
= \FALSE
$_queryType
DataBase Query Type 6 - DROP
protected
mixed
$_queryType
= 6
$_restrict
Use RESTRICT
protected
bool
$_restrict
= \FALSE
$_table
List of tables
protected
array<string|int, mixed>
$_table
= array()
$_temporary
Use temporary
protected
bool
$_temporary
= \FALSE
$_unbuffered
Query without fetching and buffering the result rows
protected
mixed
$_unbuffered
= \FALSE
Methods
__call()
Triggered when invoking inaccessible methods in an object context
public
__call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
- $name : string
-
method name
- $arguments : array<string|int, mixed>
-
arguments
__construct()
Constructor.
public
__construct([array<string|int, mixed> $args = array() ]) : mixed
Parameters
- $args : array<string|int, mixed> = array()
-
list of arguments
$oCore_QueryBuilder_Drop = Core_QueryBuilder::drop('TableName1') ->execute();
Tags
__set()
Run when writing data to inaccessible properties
public
__set(string $property, string $value) : self
Parameters
- $property : string
-
property name
- $value : string
-
property value
Return values
selfbuild()
Build the SQL query
public
build() : string
Return values
string —The SQL query
cascade()
Set CASCADE
public
cascade([bool $cascade = TRUE ]) : self
Parameters
- $cascade : bool = TRUE
-
CASCADE mode
Return values
self —
$oCore_QueryBuilder_Drop = Core_QueryBuilder::drop('TableName1')->cascade();
clearLimit()
Clear LIMIT
public
clearLimit() : self
Return values
selfclearOffset()
Clear OFFSET
public
clearOffset() : self
Return values
selfexecute()
Execute query
public
execute([ $sql = NULL ]) : Core_DataBase
Parameters
Return values
Core_DataBasegetDataBase()
Get DataBase
public
getDataBase() : Core_DataBase
Return values
Core_DataBaseifExists()
Set IF EXISTS
public
ifExists([bool $ifExists = TRUE ]) : mixed
Parameters
- $ifExists : bool = TRUE
-
IF EXISTS mode
$oCore_QueryBuilder_Drop = Core_QueryBuilder::drop('TableName1')->ifExists();
restrict()
Set RESTRICT
public
restrict([bool $restrict = TRUE ]) : self
Parameters
- $restrict : bool = TRUE
-
RESTRICT mode
Return values
self —
$oCore_QueryBuilder_Drop = Core_QueryBuilder::drop('TableName1')->restrict();
setDataBase()
Set DataBase
public
setDataBase(Core_DataBase $dataBase) : Core_QueryBuilder_Statement
Parameters
- $dataBase : Core_DataBase
Return values
Core_QueryBuilder_Statementtable()
Add table name
public
table(string $tableName) : mixed
Parameters
- $tableName : string
-
table name
$oCore_QueryBuilder_Drop = Core_QueryBuilder::drop()->table('TableName1');
temporary()
Set TEMPORARY
public
temporary([bool $temporary = TRUE ]) : mixed
Parameters
- $temporary : bool = TRUE
-
TEMPORARY mode
$oCore_QueryBuilder_Drop = Core_QueryBuilder::drop('TableName1')->temporary();
unbuffered()
Query without fetching and buffering the result rows
public
unbuffered(bool $unbuffered) : self
Parameters
- $unbuffered : bool
Return values
self_buildDrop()
Build table drop list
protected
_buildDrop(array<string|int, mixed> $tables) : string
Parameters
- $tables : array<string|int, mixed>
-
tables list
Return values
string —The SQL query
_isObjectSelect()
Is $object Core_QueryBuilder_Select
protected
_isObjectSelect( $object) : bool
Parameters
Return values
bool_quoteColumns()
Quote columns
protected
_quoteColumns(array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
- $array : array<string|int, mixed>
Return values
array<string|int, mixed>_quoteValues()
Quote arary of values
protected
_quoteValues(array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
- $array : array<string|int, mixed>