You are here

public function DateSqlInterface::getDateField in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/query/DateSqlInterface.php \Drupal\views\Plugin\views\query\DateSqlInterface::getDateField()
  2. 9 core/modules/views/src/Plugin/views/query/DateSqlInterface.php \Drupal\views\Plugin\views\query\DateSqlInterface::getDateField()

Returns a native database expression for a given field.

Parameters

string $field: The query field that will be used in the expression.

bool $string_date: For certain databases, date format functions vary depending on string or numeric storage.

Return value

string An expression representing a date field with timezone.

3 methods override DateSqlInterface::getDateField()
MysqlDateSql::getDateField in core/modules/views/src/Plugin/views/query/MysqlDateSql.php
Returns a native database expression for a given field.
PostgresqlDateSql::getDateField in core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php
Returns a native database expression for a given field.
SqliteDateSql::getDateField in core/modules/views/src/Plugin/views/query/SqliteDateSql.php
Returns a native database expression for a given field.

File

core/modules/views/src/Plugin/views/query/DateSqlInterface.php, line 28

Class

DateSqlInterface
Defines an interface for handling date queries with SQL.

Namespace

Drupal\views\Plugin\views\query

Code

public function getDateField($field, $string_date);