class Illuminate / Database / Query / Grammars / MySqlGrammar
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

MySqlGrammar

Extends

Properties

protected

$operators string[]

The grammar specific operators.

Default: array

Methods

protected

whereNull ( Builder $query , $where ) : string

Add a "where null" clause to the query.

Parameters

protected

whereNotNull ( Builder $query , $where ) : string

Add a "where not null" clause to the query.

Parameters

public

whereFullText ( Builder $query , $where ) : string

Compile a "where fulltext" clause.

Parameters

protected

compileIndexHint ( Builder $query , $indexHint ) : string

Compile the index hints for the query.

Parameters

public

compileInsertOrIgnore ( Builder $query , array $values ) : string

Compile an insert ignore statement into SQL.

Parameters

protected

compileJsonContains ( $column , $value ) : string

Compile a "JSON contains" statement into SQL.

Parameters

  • $column string
  • $value string
protected

compileJsonContainsKey ( $column ) : string

Compile a "JSON contains key" statement into SQL.

Parameters

  • $column string
protected

compileJsonLength ( $column , $operator , $value ) : string

Compile a "JSON length" statement into SQL.

Parameters

  • $column string
  • $operator string
  • $value string
public

compileJsonValueCast ( $value ) : string

Compile a "JSON value cast" statement into SQL.

Parameters

  • $value string
public

compileRandom ( $seed ) : string

Compile the random statement into SQL.

Parameters

  • $seed string|int
protected

compileLock ( Builder $query , $value ) : string

Compile the lock into SQL.

Parameters

public

compileInsert ( Builder $query , array $values ) : string

Compile an insert statement into SQL.

Parameters

protected

compileUpdateColumns ( Builder $query , array $values ) : string

Compile the columns for an update statement.

Parameters

public

compileUpsert ( Builder $query , array $values , array $uniqueBy , array $update ) : string

Compile an "upsert" statement into SQL.

Parameters

  • $query Builder
  • $values array
  • $uniqueBy array
  • $update array
protected

compileJsonUpdateColumn ( $key , $value ) : string

Prepare a JSON column being updated using the JSON_SET function.

Parameters

  • $key string
  • $value mixed
protected

compileUpdateWithoutJoins ( Builder $query , $table , $columns , $where ) : string

Compile an update statement without joins into SQL.

Parameters

  • $query Builder
  • $table string
  • $columns string
  • $where string
public

prepareBindingsForUpdate ( array $bindings , array $values ) : array

Prepare the bindings for an update statement.

Parameters

  • $bindings array
  • $values array
protected

compileDeleteWithoutJoins ( Builder $query , $table , $where ) : string

Compile a delete query that does not use joins.

Parameters

  • $query Builder
  • $table string
  • $where string
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

wrapJsonBooleanSelector ( $value ) : string

Wrap the given JSON selector for boolean values.

Parameters

  • $value string