public static function Utils::getMssqlType in Drupal driver for SQL Server and SQL Azure 3.0.x
Same name and namespace in other branches
- 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Utils.php \Drupal\Driver\Database\sqlsrv\Utils::GetMSSQLType()
- 8 drivers/lib/Drupal/Driver/Database/sqlsrv/Utils.php \Drupal\Driver\Database\sqlsrv\Utils::GetMSSQLType()
Returns the spec for a MSSQL data type definition.
Parameters
string $type: Data type.
Return value
string Data type spec.
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Utils.php, line 78
Class
- Utils
- Utility function for the SQL Server driver.
Namespace
Drupal\Driver\Database\sqlsrvCode
public static function getMssqlType($type) {
$matches = [];
if (preg_match('/^[a-zA-Z]*/', $type, $matches)) {
return reset($matches);
}
return $type;
}