Class Drupal\views\Plugin\views\query\CastSqlInterface - Source Code

Primary tabs

API docs: https://api.drupal.org/api/drupal/core!modules!views!src!Plugin!views!query!CastSqlInterface.php/11.3.x

GitLab: https://git.drupalcode.org/project/drupal/-/blob/11.3.x/core/modules/views/src/Plugin/views/query/CastSqlInterface.php

Location: /core/modules/views/src/Plugin/views/query/CastSqlInterface.php

    
        
namespace Drupal\views\Plugin\views\query;

/**
 * Defines an interface for defining cast expressions in SQL.
 */
interface CastSqlInterface {

  /**
   * Returns a database expression to cast the field to int.
   *
   * @param string $field
   *   The database field to cast.
   *
   * @return string
   *   The database expression to cast the field to int.
   */
  public function getFieldAsInt(string $field): string;

}