interface CastSqlInterface

Same name and namespace in other branches
  1. 11.x core/modules/views/src/Plugin/views/query/CastSqlInterface.php \Drupal\views\Plugin\views\query\CastSqlInterface

Defines an interface for defining cast expressions in SQL.

Hierarchy

Expanded class hierarchy of CastSqlInterface

All classes that implement CastSqlInterface

1 file declares its use of CastSqlInterface
MysqlCastSql.php in core/modules/mysql/src/Plugin/views/query/MysqlCastSql.php

File

core/modules/views/src/Plugin/views/query/CastSqlInterface.php, line 8

Namespace

Drupal\views\Plugin\views\query
View source
interface CastSqlInterface {
  
  /**
   * Returns a database expression to cast the field to int.
   *
   * @param $field string
   *   The database field to cast.
   *
   * @return string
   */
  public function getFieldAsInt(string $field) : string;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
CastSqlInterface::getFieldAsInt public function Returns a database expression to cast the field to int. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.