You are here

public function Scheme::ColumnDetailsGet in Drupal driver for SQL Server and SQL Azure 8.2

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

Parameters

string $table: Name of the table.

array|string $fields: Name of column or list of columns to retrieve information about.

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Scheme.php, line 577

Class

Scheme

Namespace

Drupal\Driver\Database\sqlsrv

Code

public function ColumnDetailsGet($table, $fields) {
  $info = $this
    ->TableDetailsGet($table);
  if (is_array($fields)) {
    $result = array();
    foreach ($fields as $field) {
      $result[$field] = $info['columns'][$field];
    }
    return $result;
  }
  else {
    return $info['columns'][$fields];
  }
}