Path prefix fixes, directory exists fix, SqlServer compability#1
Path prefix fixes, directory exists fix, SqlServer compability#1trusek wants to merge 1 commit intoWebGardenGroup:mainfrom
Conversation
| { | ||
| return (bool) $this->connection->executeQuery(<<<SQL | ||
| SELECT EXISTS ( | ||
| SELECT CASE WHEN EXISTS ( |
There was a problem hiding this comment.
EXISTS already a boolean operator in SQL.
There was a problem hiding this comment.
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.
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.
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