class Illuminate / Database / Query / Grammars / PostgresGrammar

PostgresGrammar

Extends

Properties

protected

$operators string[]

All of the available clause operators.

Default: array
protected

$bitwiseOperators array

The grammar specific bitwise operators.

Default: array

Methods

protected

whereBasic ( Builder $query , $where ) : string

Compile a basic where clause.

Parameters

protected

whereBitwise ( Builder $query , $where ) : string

Compile a bitwise operator where clause.

Parameters

protected

whereDate ( Builder $query , $where ) : string

Compile a "where date" clause.

Parameters

protected

whereTime ( Builder $query , $where ) : string

Compile a "where time" clause.

Parameters

protected

dateBasedWhere ( $type , Builder $query , $where ) : string

Compile a date based where clause.

Parameters

  • $type string
  • $query Builder
  • $where array
public

whereFullText ( Builder $query , $where ) : string

Compile a "where fulltext" clause.

Parameters

protected

validFullTextLanguages ( ) : array

Get an array of valid full text languages.

protected

compileColumns ( Builder $query , $columns ) : string|null

Compile the "select *" portion of the query.

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
protected

compileHaving ( array $having ) : string

Compile a single having clause.

Parameters

  • $having array
protected

compileHavingBitwise ( $having ) : string

Compile a having clause involving a bitwise operator.

Parameters

  • $having array
protected

compileLock ( Builder $query , $value ) : string

Compile the lock into SQL.

Parameters

public

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

Compile an insert ignore statement into SQL.

Parameters

public

compileInsertGetId ( Builder $query , $values , $sequence ) : string

Compile an insert and get ID statement into SQL.

Parameters

  • $query Builder
  • $values array
  • $sequence string
public

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

Compile an update 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

Prepares a JSON column being updated using the JSONB_SET function.

Parameters

  • $key string
  • $value mixed
public

compileUpdateFrom ( Builder $query , $values ) : string

Compile an update from statement into SQL.

Parameters

protected

compileUpdateWheres ( Builder $query ) : string

Compile the additional where clauses for updates with joins.

Parameters

protected

compileUpdateJoinWheres ( Builder $query ) : string

Compile the "join" clause where clauses for an update.

Parameters

public

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

Prepare the bindings for an update statement.

Parameters

  • $bindings array
  • $values array
protected

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

Compile an update statement with joins or limit into SQL.

Parameters

public

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

Prepare the bindings for an update statement.

Parameters

  • $bindings array
  • $values array
public

compileDelete ( Builder $query ) : string

Compile a delete statement into SQL.

Parameters

protected

compileDeleteWithJoinsOrLimit ( Builder $query ) : string

Compile a delete statement with joins or limit into SQL.

Parameters

public

compileTruncate ( Builder $query ) : array

Compile a truncate table statement into SQL.

Parameters

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
protected

wrapJsonBooleanValue ( $value ) : string

Wrap the given JSON boolean value.

Parameters

  • $value string
protected

wrapJsonPathAttributes ( $path ) : array

Wrap the attributes of the given JSON path.

Parameters

  • $path array
protected

parseJsonPathArrayKeys ( $attribute ) : array

Parse the given JSON path attribute for array keys.

Parameters

  • $attribute string
public

substituteBindingsIntoRawSql ( $sql , $bindings ) : string

Substitute the given bindings into the given raw SQL query.

Parameters

  • $sql string
  • $bindings array