Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MysqlCastSql.php

function 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)";
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal