class Illuminate / Database / Grammar
abstract

Grammar

Uses

Properties

protected

$connection Connection

The connection used for escaping values.

Default: null
protected

$tablePrefix string

The grammar table prefix.

Default: ''

Methods

public

wrapArray ( array $values ) : array

Wrap an array of values.

Parameters

  • $values array
public

wrapTable ( $table ) : string

Wrap a table in keyword identifiers.

Parameters

public

wrap ( $value , $prefixAlias ) : string

Wrap a value in keyword identifiers.

Parameters

protected

wrapAliasedValue ( $value , $prefixAlias ) : string

Wrap a value that has an alias.

Parameters

  • $value string
  • $prefixAlias bool
protected

wrapSegments ( $segments ) : string

Wrap the given value segments.

Parameters

  • $segments array
protected

wrapValue ( $value ) : string

Wrap a single string in keyword identifiers.

Parameters

  • $value string
protected

wrapJsonSelector ( $value ) : string

Wrap the given JSON selector.

Parameters

  • $value string
protected

isJsonSelector ( $value ) : bool

Determine if the given string is a JSON selector.

Parameters

  • $value string
public

columnize ( array $columns ) : string

Convert an array of column names into a delimited string.

Parameters

  • $columns array
public

parameterize ( array $values ) : string

Create query parameter place-holders for an array.

Parameters

  • $values array
public

parameter ( $value ) : string

Get the appropriate query parameter place-holder for a value.

Parameters

  • $value mixed
public

quoteString ( $value ) : string

Quote the given string literal.

Parameters

  • $value string|array
public

escape ( $value , $binary ) : string

Escapes a value for safe SQL embedding.

Parameters

  • $value string|float|int|bool|null
  • $binary bool
public

isExpression ( $value ) : bool

Determine if the given value is a raw expression.

Parameters

  • $value mixed
public

getValue ( $expression ) : string|int|float

Transforms expressions to their scalar types.

Parameters

public

getDateFormat ( ) : string

Get the format for database stored dates.

public

getTablePrefix ( ) : string

Get the grammar's table prefix.

public

setTablePrefix ( $prefix ) : $this

Set the grammar's table prefix.

Parameters

  • $prefix string
public

setConnection ( $connection ) : $this

Set the grammar's database connection.

Parameters