You are here

private function Schema::loadFieldsSpec in Drupal driver for SQL Server and SQL Azure 8

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

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

Parameters

array $fields:

mixed $table:

1 call to Schema::loadFieldsSpec()
Schema::createPrimaryKey in drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php
Create a Primary Key for the table, does not drop any prior primary keys neither it takes care of cleaning technical primary column. Only call this if you are sure the table does not currently hold a primary key.

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php, line 491
Definition of Drupal\Driver\Database\sqlsrv\Schema

Class

Schema

Namespace

Drupal\Driver\Database\sqlsrv

Code

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