interface TablesInterface (View source)

Adds tables and fields to the SQL entity query.

Methods

string
addField(string $field, string $type, string $langcode)

Adds a field to a database query.

bool|null
isFieldCaseSensitive(string $field_name)

Determines whether the given field is case sensitive.

Details

string addField(string $field, string $type, string $langcode)

Adds a field to a database query.

Parameters

string $field

If it doesn't contain a dot, then an entity base field name. If it contains a dot, then either field name dot field column or field name dot delta dot field column. Delta can be a numeric value or a "%delta" for any value.

string $type

Join type, can either be INNER or LEFT.

string $langcode

The language code the field values are to be queried in.

Return Value

string

The return value is a string containing the alias of the table, a dot and the appropriate SQL column as passed in. This allows the direct use of this in a query for a condition or sort.

Exceptions

QueryException

bool|null isFieldCaseSensitive(string $field_name)

Determines whether the given field is case sensitive.

This information can only be provided after it was added with addField().

Parameters

string $field_name

The name of the field.

Return Value

bool|null

TRUE if the field is case sensitive, FALSE if not. Returns NULL when the field did not define if it is case sensitive or not.