You are here

public static function DatabaseUtils::GetMSSQLType in Drupal driver for SQL Server and SQL Azure 7.2

Same name and namespace in other branches
  1. 7.3 sqlsrv/utils.inc \DatabaseUtils::GetMSSQLType()

Returns the spec for a MSSQL data type definition.

Parameters

mixed $type:

1 call to DatabaseUtils::GetMSSQLType()
DatabaseSchema_sqlsrv::defaultValueExpression in sqlsrv/schema.inc
Get the SQL expression for a default value.

File

sqlsrv/utils.inc, line 124

Class

DatabaseUtils

Code

public static function GetMSSQLType($type) {
  $matches = array();
  if (preg_match('/^[a-zA-Z]*/', $type, $matches)) {
    return reset($matches);
  }
  return $type;
}