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

Breadcrumb

  1. Drupal Core 11.1.x

CastSql.php

Namespace

Drupal\views\Plugin\views\query

File

core/modules/views/src/Plugin/views/query/CastSql.php

View source
<?php

namespace Drupal\views\Plugin\views\query;


/**
 * Cast handling in SQL.
 */
class CastSql implements CastSqlInterface {
    
    /**
     * {@inheritdoc}
     */
    public function getFieldAsInt(string $field) : string {
        return "CAST({$field} AS INTEGER)";
    }

}

Classes

Title Deprecated Summary
CastSql Cast handling in SQL.

API Navigation

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