Informix not escape column and table name
LivraghiFrancesco opened this issue · 1 comments
LivraghiFrancesco commented
I'm working with an Informix DB engine and I discovered that, in the CRUD operations, Informix generates an error if the colums and table names are escaped. I have updated the function escapeIdentifier(...)
as shown below:
public function escapeIdentifier(string $string, bool $quote = true): string
{
....
if ($quote) {
switch ($this->dbEngine) {
case 'mssql':
return '[' . $str . ']';
case 'mysql':
return '`' . $str . '`';
case 'informix':
return $str;
default:
return '"' . $str . '"';
}
}
return $str;
}
The solution it is under test and it seems work perfectly!
Best regards
Francesco
SignpostMarv commented
Seems like you need to explicitly enable delimiters with informix ?
DELIMIDENT: When set to Y, specifies that strings set off by double quotation marks are delimited identifiers
~ IBM Knowledgebase