Properties

$datetime

$datetime : string

The format for properly saving a DateTime.

Type

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

$components

$components : array

All of the query components in the order they should be built.

Type

array

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

$wrapper

$wrapper : string

The keyword identifier for the database system.

Type

string

Inherited from
LaravelDatabaseGrammar

Tags

None found

$connection

$connection : \Laravel\Database\Connection

The database connection instance for the grammar.

Type

LaravelDatabaseConnection

Inherited from
LaravelDatabaseGrammar

Tags

None found

Methods

select()

select(\Laravel\Database\Query  $query) : string

Compile a SQL SELECT statement from a Query instance.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

insert()

insert(\Laravel\Database\Query  $query, array  $values) : string

Compile a SQL INSERT statement from a Query instance.

This method handles the compilation of single row inserts and batch inserts.

Parameters

LaravelDatabaseQuery $query
array $values

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

insert_get_id()

insert_get_id(\Laravel\Database\Query  $query, array  $values, string  $column) : string

Compile a SQL INSERT and get ID statement from a Query instance.

Parameters

LaravelDatabaseQuery $query
array $values
string $column

Returns

string

Tags

None found

update()

update(\Laravel\Database\Query  $query, array  $values) : string

Compile a SQL UPDATE statement from a Query instance.

Parameters

LaravelDatabaseQuery $query
array $values

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

delete()

delete(\Laravel\Database\Query  $query) : string

Compile a SQL DELETE statement from a Query instance.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

shortcut()

shortcut(string  $sql, array  $bindings) : string

Transform an SQL short-cuts into real SQL for PDO.

Parameters

string $sql
array $bindings

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

__construct()

__construct(\Laravel\Database\Connection  $connection) : void

Create a new database grammar instance.

Parameters

LaravelDatabaseConnection $connection

Inherited from
LaravelDatabaseGrammar

Tags

None found

wrap_table()

wrap_table(string  $table) : string

Wrap a table in keyword identifiers.

Parameters

string $table

Returns

string

Inherited from
LaravelDatabaseGrammar

Tags

None found

wrap()

wrap(string  $value) : string

Wrap a value in keyword identifiers.

Parameters

string $value

Returns

string

Inherited from
LaravelDatabaseGrammar

Tags

None found

parameterize()

parameterize(array  $values) : string

Create query parameters from an array of values.

Returns "?, ?, ?", which may be used as PDO place-holders $parameters = $grammar->parameterize(array(1, 2, 3));

// Returns "?, "Taylor"" since an expression is used
$parameters = $grammar->parameterize(array(1, DB::raw('Taylor')));

Parameters

array $values

Returns

string

final
Inherited from
LaravelDatabaseGrammar

Tags

None found

parameter()

parameter(mixed  $value) : string

Get the appropriate query parameter string for a value.

// Returns a "?" PDO place-holder $value = $grammar->parameter('Taylor Otwell');

// Returns "Taylor Otwell" as the raw value of the expression
$value = $grammar->parameter(DB::raw('Taylor Otwell'));

Parameters

mixed $value

Returns

string

final
Inherited from
LaravelDatabaseGrammar

Tags

None found

columnize()

columnize(array  $columns) : string

Create a comma-delimited list of wrapped column names.

// Returns ""Taylor", "Otwell"" when the identifier is quotes $columns = $grammar->columnize(array('Taylor', 'Otwell'));

Parameters

array $columns

Returns

string

final
Inherited from
LaravelDatabaseGrammar

Tags

None found

components()

components(\Laravel\Database\Query  $query) : array

Generate the SQL for every component of the query.

Parameters

LaravelDatabaseQuery $query

Returns

array

final
Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

concatenate()

concatenate(array  $components) : string

Concatenate an array of SQL segments, removing those that are empty.

Parameters

array $components

Returns

string

final
Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

selects()

selects(\Laravel\Database\Query  $query) : string

Compile the SELECT clause for a query.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

aggregate()

aggregate(\Laravel\Database\Query  $query) : string

Compile an aggregating SELECT clause for a query.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

from()

from(\Laravel\Database\Query  $query) : string

Compile the FROM clause for a query.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

joins()

joins(\Laravel\Database\Query  $query) : string

Compile the JOIN clauses for a query.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

wheres()

wheres(\Laravel\Database\Query  $query) : string

Compile the WHERE clause for a query.

Parameters

LaravelDatabaseQuery $query

Returns

string

final
Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

where_nested()

where_nested(array  $where) : string

Compile a nested WHERE clause.

Parameters

array $where

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

where()

where(array  $where) : string

Compile a simple WHERE clause.

Parameters

array $where

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

where_in()

where_in(array  $where) : string

Compile a WHERE IN clause.

Parameters

array $where

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

where_not_in()

where_not_in(array  $where) : string

Compile a WHERE NOT IN clause.

Parameters

array $where

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

where_between()

where_between(array  $where) : string

Compile a WHERE BETWEEN clause

Parameters

array $where

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

where_not_between()

where_not_between(array  $where) : string

Compile a WHERE NOT BETWEEN clause

Parameters

array $where

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

where_null()

where_null(array  $where) : string

Compile a WHERE NULL clause.

Parameters

array $where

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

where_not_null()

where_not_null(array  $where) : string

Compile a WHERE NULL clause.

Parameters

array $where

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

where_raw()

where_raw(array  $where) : string

Compile a raw WHERE clause.

Parameters

array $where

Returns

string

final
Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

groupings()

groupings(\Laravel\Database\Query  $query) : string

Compile the GROUP BY clause for a query.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

havings()

havings(\Laravel\Database\Query  $query) : string

Compile the HAVING clause for a query.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

orderings()

orderings(\Laravel\Database\Query  $query) : string

Compile the ORDER BY clause for a query.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

limit()

limit(\Laravel\Database\Query  $query) : string

Compile the LIMIT clause for a query.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

offset()

offset(\Laravel\Database\Query  $query) : string

Compile the OFFSET clause for a query.

Parameters

LaravelDatabaseQuery $query

Returns

string

Inherited from
LaravelDatabaseQueryGrammarsGrammar

Tags

None found

wrap_value()

wrap_value(string  $value) : string

Wrap a single string value in keyword identifiers.

Parameters

string $value

Returns

string

Inherited from
LaravelDatabaseGrammar

Tags

None found