final class MysqlSqlEscaper (View source)

Renders MySQL literals, expressions, and identifiers for schema compilation.

Methods

__construct(MysqlIdentifierEscaper $identifierEscaper)

Creates an escaper using the configured MySQL identifier rules.

string
value(mixed $value)

Converts a scalar, nullable value, or explicit SQL expression to a MySQL literal.

string
string
identifier(string $identifier)

Escapes one identifier for use in generated MySQL DDL.

string
string
table(string $table)

Escapes a table name and applies its configured prefix.

string

Details

__construct

__construct(MysqlIdentifierEscaper $identifierEscaper)

Creates an escaper using the configured MySQL identifier rules.

Parameters

MysqlIdentifierEscaper $identifierEscaper

value

string value(mixed $value)

Converts a scalar, nullable value, or explicit SQL expression to a MySQL literal.

Parameters

mixed $value

Return Value

string

identifier

string identifier(string $identifier)

Escapes one identifier for use in generated MySQL DDL.

Parameters

string $identifier

Return Value

string

table

string table(string $table)

Escapes a table name and applies its configured prefix.

Parameters

string $table

Return Value

string