class MysqlCastSql

MySQL specific cast handling.

Hierarchy

Expanded class hierarchy of MysqlCastSql

3 files declare their use of MysqlCastSql
MysqliCastSql.php in core/modules/mysqli/src/Plugin/views/query/MysqliCastSql.php
MysqlServiceProvider.php in core/modules/mysql/src/MysqlServiceProvider.php
ViewsTest.php in core/modules/mysql/tests/src/Kernel/mysql/ViewsTest.php

File

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

Namespace

Drupal\mysql\Plugin\views\query
View source
class MysqlCastSql implements CastSqlInterface {
  
  /**
   * {@inheritdoc}
   */
  public function getFieldAsInt(string $field) : string {
    return "CAST({$field} AS UNSIGNED)";
  }

}

Members

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

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