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

Breadcrumb

  1. Drupal Core 11.1.x

MysqlCastSql.php

Namespace

Drupal\mysql\Plugin\views\query

File

core/modules/mysql/src/Plugin/views/query/MysqlCastSql.php

View source
<?php

namespace Drupal\mysql\Plugin\views\query;

use Drupal\views\Plugin\views\query\CastSqlInterface;

/**
 * MySQL specific cast handling.
 */
class MysqlCastSql implements CastSqlInterface {
    
    /**
     * {@inheritdoc}
     */
    public function getFieldAsInt(string $field) : string {
        return "CAST({$field} AS UNSIGNED)";
    }

}

Classes

Title Deprecated Summary
MysqlCastSql MySQL specific cast handling.

API Navigation

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