Problem/Motivation
2.0.1 introduced an incompatibility with postgres. #2767437: Allow sort handler to select the view that stored the order patch uses ISNULL, which is mysql only.
2.0.0 worked fine.
Proposed resolution
COALESCE() might be used instead of ISNULL.
Remaining tasks
Someone should test this in mysql.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3254174-use-coalesce-instead-of-isnull-3.patch | 1.21 KB | penyaskito |
Comments
Comment #2
penyaskitoMight not be the ideal solution, but #3153830-33: DraggableViews not working after update to 2.0.0 was working for me. We might want to keep that in mind for working on this.
Comment #3
penyaskitoAttached patch.
Comment #4
penyaskitoRe-titled
Comment #6
penyaskito#3254205: Tests need to define $defaultTheme https://www.drupal.org/node/3083055 shows that more tests aren't needed, the existing tests already fail with Postgres 12.1
Comment #7
istryker commentedI think we need to test this with microsoft sql as it handles coalesce weirdly
Comment #8
penyaskitoPer their docs, this patch should be ok: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/coalesce-tr...
Sadly we cannot test it on DrupalCI, and I don't have a MS SQL Server for testing it (nor the time or will).
And if I had to chose, I would go definitely with supporting a popular opensource dbms than a proprietary one.
Comment #10
podarokMerged for testing unblocking reasons
Will be tagged in the next release once approved by someone else
Comment #11
podarokTagged https://www.drupal.org/project/draggableviews/releases/2.0.2-rc1 - please test
Comment #12
mmbkThank you for this, just in time, for a new project of mine.
Working fine with Drupal 9.2.10 and postgres 14.1
Comment #13
podarokThanks @mmbk
Updated release notes https://www.drupal.org/project/draggableviews/releases/2.0.2-rc1