Skip to content
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

FEATURE: Support SQL Server (and more?) #30

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

kdambekalns
Copy link
Member

This switches the hard-coded SQL against Doctrine DBAL query builder use.

This makes the queue work on SQL Server and potentially more databases supported by Doctrine DBAL.

Copy link
Member Author

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this locally against MariaDB 10.5, SQLite and SQL Server 2022.

README.md Outdated Show resolved Hide resolved
Tests/Functional/Queue/DoctrineQueueTest.php Show resolved Hide resolved
Copy link
Collaborator

@bwaidelich bwaidelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, great addition!
No time to test atm, but I left some (partly rather unqualified) comments already

Classes/Queue/DoctrineQueue.php Outdated Show resolved Hide resolved
Classes/Queue/DoctrineQueue.php Outdated Show resolved Hide resolved
Classes/Queue/DoctrineQueue.php Outdated Show resolved Hide resolved
Classes/Queue/DoctrineQueue.php Show resolved Hide resolved
Classes/Queue/DoctrineQueue.php Show resolved Hide resolved
@kdambekalns
Copy link
Member Author

BTW, this is (slightly) related, it adds a test that invokes a formerly untested code path: Flowpack/jobqueue-common#62

- add return types
- add types to method arguments
- drop unneeded doc comments
This switches the hard-coded SQL against Doctrine DBAL query builder
use.

This makes the queue work on SQL Server and potentially more databases
supported by Doctrine DBAL.
- simplify query builder use
- add some sprintf
- rename some variables
- amend docblocks
@kdambekalns kdambekalns force-pushed the feature/mssql-compatibility branch from 1a8faab to ba14187 Compare January 19, 2024 19:19
@kdambekalns
Copy link
Member Author

Thanks @bwaidelich – I improved the code!

Copy link
Collaborator

@bwaidelich bwaidelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great, +1 by reading!

@kdambekalns
Copy link
Member Author

Have been testing this the last two days, LGTM.

@kdambekalns kdambekalns merged commit ecac565 into Flowpack:main Jan 23, 2024
@kdambekalns kdambekalns deleted the feature/mssql-compatibility branch January 23, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants