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

Breadcrumb

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

function Select::union

Overrides SelectInterface::union

File

core/lib/Drupal/Core/Database/Query/Select.php, line 690

Class

Select
Query builder for SELECT statements.

Namespace

Drupal\Core\Database\Query

Code

public function union(SelectInterface $query, $type = '') {
    // Handle UNION aliasing.
    switch ($type) {
        // Fold UNION DISTINCT to UNION for better cross database support.
        case 'DISTINCT':
        case '':
            $type = 'UNION';
            break;
        case 'ALL':
            $type = 'UNION ALL';
        default:
    }
    $this->union[] = [
        'type' => $type,
        'query' => $query,
    ];
    return $this;
}

API Navigation

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