CreateSchema
extends Statement
in package
Class CreateSchema.
Tags
Table of Contents
- $database : Database
- $sql : array<string|int, mixed>
- SQL clauses and parts.
- __construct() : mixed
- Statement constructor.
- __toString() : string
- charset() : static
- collate() : static
- ifNotExists() : static
- orReplace() : static
- reset() : static
- Resets SQL clauses and parts.
- run() : int|string
- Runs the CREATE SCHEMA statement.
- schema() : static
- sql() : string
- Renders the SQL statement.
- renderCharset() : string|null
- renderCollate() : string|null
- renderIfNotExists() : string|null
- renderOrReplace() : string|null
- renderSchema() : string
Properties
$database
protected
Database
$database
$sql
SQL clauses and parts.
protected
array<string|int, mixed>
$sql
= []
Methods
__construct()
Statement constructor.
public
__construct(Database $database) : mixed
Parameters
- $database : Database
Return values
mixed —__toString()
public
__toString() : string
Return values
string —charset()
public
charset(string $charset) : static
Parameters
- $charset : string
Return values
static —collate()
public
collate(string $collation) : static
Parameters
- $collation : string
Return values
static —ifNotExists()
public
ifNotExists() : static
Return values
static —orReplace()
public
orReplace() : static
Return values
static —reset()
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
static —run()
Runs the CREATE SCHEMA statement.
public
run() : int|string
Return values
int|string —The number of affected rows
schema()
public
schema(string $schemaName) : static
Parameters
- $schemaName : string
Return values
static —sql()
Renders the SQL statement.
public
sql() : string
Return values
string —renderCharset()
protected
renderCharset() : string|null
Return values
string|null —renderCollate()
protected
renderCollate() : string|null
Return values
string|null —renderIfNotExists()
protected
renderIfNotExists() : string|null
Return values
string|null —renderOrReplace()
protected
renderOrReplace() : string|null
Return values
string|null —renderSchema()
protected
renderSchema() : string