You are here

private function Schema::loadFieldsSpec in Drupal driver for SQL Server and SQL Azure 3.0.x

Same name and namespace in other branches
  1. 8 drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php \Drupal\Driver\Database\sqlsrv\Schema::loadFieldsSpec()

Load field spec.

Retrieve an array of field specs from an array of field names.

Parameters

array $fields: Table fields.

mixed $table: Table name.

1 call to Schema::loadFieldsSpec()
Schema::createPrimaryKey in drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php
Create primary key.

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php, line 1198

Class

Schema

Namespace

Drupal\Driver\Database\sqlsrv

Code

private function loadFieldsSpec(array $fields, $table) {
  $result = [];
  $info = $this
    ->queryColumnInformation($table);
  foreach ($fields as $field) {
    $result[$field] = $info['columns'][$field];
  }
  return $result;
}