- Added identifier escaping to match differents PDO drivers
This commit is contained in:
1 parent
def8decb4e
commit
3ff97f3bf0
8 files changed
+71
-30
No files matched your search
@@ -123,4 +123,15 @@ class MySQL implements AdapterInterface {
|
||||
$this->charset = $configuration['charset'];
|
||||
}
|
||||
}
|
||||
|
||||
public function escapeIdentifier(string $segment, int $type) : string
|
||||
{
|
||||
switch($type) {
|
||||
case static::IDENTIFIER_DATABASE:
|
||||
case static::IDENTIFIER_TABLE:
|
||||
case static::IDENTIFIER_FIELD:
|
||||
return "`" . str_replace("`", "``", $segment) . "`";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user