- Added identifier escaping to match differents PDO drivers

This commit is contained in:
Dave Mc Nicoll committed 2020-04-09 13:20:07 -04:00
1 parent def8decb4e
commit 3ff97f3bf0
8 files changed
+71 -30

No files matched your search

+11
View File
@@ -185,4 +185,15 @@ class MsSQL implements AdapterInterface {
$this->traceOn = $configuration['trace_on'];
}
}
public function escapeIdentifier(string $segment, int $type) : string
{
switch($type) {
case static::IDENTIFIER_SCHEMA:
case static::IDENTIFIER_DATABASE:
case static::IDENTIFIER_TABLE:
case static::IDENTIFIER_FIELD:
return "[" . str_replace(["[", "]"], [ "[[", "]]" ], $segment) . "]";
}
}
}