You are here

protected function Schema::_createKeySql in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php \Drupal\Core\Database\Driver\pgsql\Schema::_createKeySql()
1 call to Schema::_createKeySql()
Schema::_createIndexSql in core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php

File

core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php, line 412
Contains \Drupal\Core\Database\Driver\pgsql\Schema.

Class

Schema
PostgreSQL implementation of \Drupal\Core\Database\Schema.

Namespace

Drupal\Core\Database\Driver\pgsql

Code

protected function _createKeySql($fields) {
  $return = array();
  foreach ($fields as $field) {
    if (is_array($field)) {
      $return[] = 'substr(' . $field[0] . ', 1, ' . $field[1] . ')';
    }
    else {
      $return[] = '"' . $field . '"';
    }
  }
  return implode(', ', $return);
}