-
Notifications
You must be signed in to change notification settings - Fork 2
Path prefix fixes, directory exists fix, SqlServer compability #1
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
base: main
Are you sure you want to change the base?
Conversation
{ | ||
return (bool) $this->connection->executeQuery(<<<SQL | ||
SELECT EXISTS ( | ||
SELECT CASE WHEN EXISTS ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXISTS already a boolean operator in SQL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but for mssql that is inncorect syntax. You can check this on (https://sqliteonline.com/)
SELECT EXISTS (SELECT 1)
throws: Token error: 'Incorrect syntax near the keyword 'exists'.'
When on Sqlite, PostgreSql, MariaDb, Mysql works like a charm.
Case-When syntax should work on every engine.
But on Oracle still missing from DUAL
. On this could be patched with simple
$this->connection->getDatabasePlatform()->getDummySelectSQL('CASE WHEN EXISTS(...`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getDummySelect wont work. E.g.: DB2.
Currently the bundle supports: sqlite, mysql , mariadb and pgsql.
If we need to add more platform, a refactor is needed to handle platform-specific queries i guess. Not just some if-else in the adapter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package is great, I just miss support for SQLserver.I'm not intrested with others like Oracle or DB2.
I'm not familiar with DB2. Doctrine do sprintf('SELECT %s FROM sysibm.sysdummy1', $expression);
for this platform.
Please create a table definition for SQLServer in the schema folder. See the existing ones for examples. |
43cc926
to
c350011
Compare
fixes writeStream - updating size not working for SqlServer fixes delete - file name was not prefixed change exists - not working propery under SqlServer change writeStream - on exception file name in message was prefixed
fixes exists - not working properly for checking directories
fixes writeStream - updating size not working for SqlServer
fixes delete - file name was not prefixed
change exists - not working propery under SqlServer
change writeStream - on exception file name in message was prefixed