You are here

private function DatabaseSchema_sqlsrv::loadFieldsSpec in Drupal driver for SQL Server and SQL Azure 7.2

Same name and namespace in other branches
  1. 7.3 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::loadFieldsSpec()

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

Parameters

array $fields:

mixed $table:

1 call to DatabaseSchema_sqlsrv::loadFieldsSpec()
DatabaseSchema_sqlsrv::createPrimaryKey in sqlsrv/schema.inc
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

sqlsrv/schema.inc, line 507
Database schema code for Microsoft SQL Server database servers.

Class

DatabaseSchema_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;
}