function MysqlCastSql::getFieldAsInt

Same name in other branches
  1. 10 core/modules/mysql/src/Plugin/views/query/MysqlCastSql.php \Drupal\mysql\Plugin\views\query\MysqlCastSql::getFieldAsInt()

Overrides CastSqlInterface::getFieldAsInt

File

core/modules/mysql/src/Plugin/views/query/MysqlCastSql.php, line 15

Class

MysqlCastSql
MySQL specific cast handling.

Namespace

Drupal\mysql\Plugin\views\query

Code

public function getFieldAsInt(string $field) : string {
    return "CAST({$field} AS UNSIGNED)";
}

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