DropTable
extends Statement
in package
Class DropTable.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Statement constructor.
- __toString() : string
- commentToSave() : static
- ifExists() : static
- renderWait() : string|null
- reset() : static
- Resets SQL clauses and parts.
- run() : int|string
- Runs the DROP TABLE statement.
- sql() : string
- Renders the SQL statement.
- table() : static
- temporary() : static
- wait() : static
- renderCommentToSave() : string|null
- renderIfExists() : string|null
- renderTables() : string
- renderTemporary() : string|null
Properties
$database
protected
Database
$database
$sql
SQL clauses and parts.
protected
array<string, mixed>
$sql
= []
Methods
__construct()
Statement constructor.
public
__construct(Database $database) : mixed
Parameters
- $database : Database
__toString()
public
__toString() : string
Return values
stringcommentToSave()
public
commentToSave(string $comment) : static
Parameters
- $comment : string
Return values
staticifExists()
public
ifExists() : static
Return values
staticrenderWait()
public
renderWait() : string|null
Return values
string|nullreset()
Resets SQL clauses and parts.
public
reset([string|null $sql = null ]) : static
Parameters
- $sql : string|null = null
-
A part name or null to reset all
Tags
Return values
staticrun()
Runs the DROP TABLE statement.
public
run() : int|string
Return values
int|string —The number of affected rows
sql()
Renders the SQL statement.
public
sql() : string
Return values
stringtable()
public
table(string $table, string ...$tables) : static
Parameters
- $table : string
- $tables : string
Return values
statictemporary()
public
temporary() : static
Return values
staticwait()
public
wait(int $seconds) : static
Parameters
- $seconds : int
Return values
staticrenderCommentToSave()
protected
renderCommentToSave() : string|null
Return values
string|nullrenderIfExists()
protected
renderIfExists() : string|null
Return values
string|nullrenderTables()
protected
renderTables() : string
Return values
stringrenderTemporary()
protected
renderTemporary() : string|null