Tables
class Tables implements TablesInterface (View source)
Adds tables and fields to the SQL entity query.
Properties
| protected SelectInterface | $sqlQuery | ||
| protected array | $entityTables | Entity table array. |
|
| protected array | $fieldTables | Field table array, key is table name, value is alias. |
|
| protected EntityTypeManagerInterface | $entityTypeManager | The entity type manager. |
|
| protected EntityFieldManagerInterface | $entityFieldManager | The entity field manager. |
|
| protected array | $caseSensitiveFields | List of case sensitive fields. |
Methods
Adds a field to a database query.
Determines whether the given field is case sensitive.
Joins the entity table, if necessary, and returns the alias for it.
Ensure the field table is joined if necessary.
Adds a join to a given table.
Gets the schema for the given table.
Add the next entity base table.
Details
__construct(SelectInterface $sql_query)
No description
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.
This information can only be provided after it was added with addField().
protected string
ensureEntityTable(string $index_prefix, string $property, string $type, string $langcode, string $base_table, string $id_field, array $entity_tables)
Joins the entity table, if necessary, and returns the alias for it.
protected string
ensureFieldTable(string $index_prefix, FieldStorageDefinitionInterface $field, string $type, string $langcode, string $base_table, string $entity_id_field, string $field_id_field, string $delta)
Ensure the field table is joined if necessary.
protected string
addJoin(string $type, string $table, string $join_condition, string $langcode, string|null $delta = NULL)
Adds a join to a given table.
protected array|false
getTableMapping(string $table, string $entity_type_id)
Gets the schema for the given table.
protected string
addNextBaseTable(EntityType $entity_type, string $table, string $sql_column, FieldStorageDefinitionInterface $field_storage)
Add the next entity base table.
For example, when building the SQL query for