LaravelDatabaseGrammar

Summary

No public properties found
No constants found
No private methods found
No private properties found
N/A
abstract
File
databasegrammar.php
Package
Default
Class hierarchy
LaravelDatabaseGrammar

Tags

None found

Properties

$wrapper

$wrapper : string

The keyword identifier for the database system.

Type

string

Tags

None found

$connection

$connection : \Laravel\Database\Connection

The database connection instance for the grammar.

Type

LaravelDatabaseConnection

Tags

None found

Methods

__construct()

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

Create a new database grammar instance.

Parameters

LaravelDatabaseConnection $connection

Tags

None found

wrap_table()

wrap_table(string  $table) : string

Wrap a table in keyword identifiers.

Parameters

string $table

Returns

string

Tags

None found

wrap()

wrap(string  $value) : string

Wrap a value in keyword identifiers.

Parameters

string $value

Returns

string

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

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

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

Tags

None found

wrap_value()

wrap_value(string  $value) : string

Wrap a single string value in keyword identifiers.

Parameters

string $value

Returns

string

Tags

None found