Grammar
abstract class Grammar (View source)
Traits
Properties
static protected array | $macros | The registered string macros. |
from Macroable |
protected Connection | $connection | The connection used for escaping values. |
Methods
Mix another object into the class.
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Wrap an array of values.
Wrap a table in keyword identifiers.
Wrap a value that has an alias.
Wrap a table that has an alias.
Wrap the given value segments.
Wrap a single string in keyword identifiers.
Wrap the given JSON selector.
Determine if the given string is a JSON selector.
Convert an array of column names into a delimited string.
Create query parameter place-holders for an array.
Get the appropriate query parameter place-holder for a value.
Quote the given string literal.
Escapes a value for safe SQL embedding.
Determine if the given value is a raw expression.
Get the format for database stored dates.
Details
string
wrapTable(Expression|string $table, string|null $prefix = null)
Wrap a table in keyword identifiers.
protected string
wrapAliasedTable(string $value, string|null $prefix = null)
Wrap a table that has an alias.
string
escape(string|float|int|bool|null $value, bool $binary = false)
Escapes a value for safe SQL embedding.
string|int|float
getValue(Expression|string|int|float $expression)
Transforms expressions to their scalar types.
string
getTablePrefix()
deprecated
deprecated Use DB::getTablePrefix()
Get the grammar's table prefix.