Aplus Framework Docs

AlterSchema extends Statement
in package

Class AlterSchema.

Tags
see
https://mariadb.com/kb/en/alter-database/

Table of Contents

$database  : Database
$sql  : array<string|int, mixed>
SQL clauses and parts.
__construct()  : mixed
Statement constructor.
__toString()  : string
charset()  : static
collate()  : static
reset()  : static
Resets SQL clauses and parts.
run()  : int|string
Runs the ALTER SCHEMA statement.
schema()  : static
sql()  : string
Renders the SQL statement.
upgrade()  : static
checkSpecifications()  : void
renderCharset()  : string|null
renderCollate()  : string|null
renderSchema()  : string|null
renderUpgrade()  : string|null

Properties

$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

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
see
Statement::$sql
Return values
static

run()

Runs the ALTER 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

upgrade()

public upgrade() : static
Return values
static

checkSpecifications()

protected checkSpecifications() : void
Return values
void

renderCharset()

protected renderCharset() : string|null
Return values
string|null

renderCollate()

protected renderCollate() : string|null
Return values
string|null

renderSchema()

protected renderSchema() : string|null
Return values
string|null

renderUpgrade()

protected renderUpgrade() : string|null
Return values
string|null

Search results