-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symbol "#" is valid for identifiers for Oracle platform #237
Comments
Can this somehow be unit-tested in the |
No, in current test system. I asked to give correct test system for laminas-db in laminas/technical-steering-committee#99 |
Yeah, setting up OracleDB testing on GHA is potentially gonna be painful, but we can add it under See for example: https://github.com/doctrine/dbal/blob/005871fd4f5f938981360b91be6fa11eee64dbb2/.github/workflows/continuous-integration.yml#L131-L158 |
I am still doing tests and fix. trait TraitSetup
{
protected function getDriverConfig()
{
$result = [
'driver' => 'Oci8',
'hostname' => $this->variables['hostname'],
'username' => $this->variables['username'],
'password' => $this->variables['password'],
'charset' => 'AL32UTF8',
// 'platform_options' => [
// 'quote_identifiers' => true
// ],
];
return $result;
}
class CharsetTest extends TestCase
{
public function testSelectAdapterAndDbSelect()
{
$adapter = $this->createAdapterWithQuoteIdentifiers();
$select = new \Laminas\Db\Sql\Select();
$select->from([
't' => 'test_charset'
]);
$select->columns([
'field$',
'field_',
'field#',
]);
$plarform = $adapter->getPlatform();
$sqlString = $select->getSqlString($plarform);// Invalid SQL here
$statement = $adapter->createStatement($sqlString);
$result = $statement->execute(); // Exception here
$this->assertInstanceOf(ResultInterface::class, $result);
} |
I did test and fix in #238
|
Bug Report
Summary
For fix the error, just add symbol "#" in platform pattern
Current behavior
Generated SQL is invalid.
How to reproduce
Re-generate the request above
Expected behavior
Symbol "#" does not quote.
The text was updated successfully, but these errors were encountered: