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

Use Query Builder for better support across platforms. #176

Merged
merged 1 commit into from
Aug 25, 2017

Conversation

jenkoian
Copy link
Contributor

@jenkoian jenkoian commented Aug 24, 2017

Not all drivers supported FOR UPDATE queries so this change changes the
raw SQL to use the query builder thus allowing DBAL to construct the
appropriate query per platform. It then grabs the SQL and appends the
read lock SQL but grabs the SQL part from the correct platform as
to not break portability.

@makasim
Copy link
Member

makasim commented Aug 24, 2017

@jenkoian what platform are you going to use?

@jenkoian
Copy link
Contributor Author

@makasim I'm running into #170 all the time on dev, so was hoping to use SQLite.

@makasim
Copy link
Member

makasim commented Aug 24, 2017

FYI: It has not ever tested agains SQLite. We used it with mysql and postgresql.

I'll try to find some time next week to fix #170.

@makasim
Copy link
Member

makasim commented Aug 24, 2017

It looks good but could you please look at travis, it complains about something.
Ignore failed test if they are kafka related

@makasim
Copy link
Member

makasim commented Aug 24, 2017

FOR UPDATE is a write lock, and you change it to getReadLockSQL which is not the same.

@jenkoian
Copy link
Contributor Author

@makasim ok will change to getWriteLockSQL

Not all drivers supported FOR UPDATE queries so this changes changes the
raw SQL to use the query builder thus allowing DBAL to construct hte
appropriate query per platform. It then grabs the SQL and appends the
read lock SQL but grabs the SQL part from the correct platform thus as
to not break portability.
@jenkoian
Copy link
Contributor Author

@makasim updated to use getReadLockSQL and ran the cs fixer to hopefully fix the build.

@jenkoian
Copy link
Contributor Author

@makasim the remaining build failure seem to be SQS related, possibly to do with this warning? WARNING: The ENQUEUE_AWS__SQS__KEY variable is not set. Defaulting to a blank string.

@makasim
Copy link
Member

makasim commented Aug 24, 2017

@jenkoian that ok. travis does not add secret envs to a build if a build is initialized by a not authorized person.

@makasim makasim merged commit fab67ff into php-enqueue:master Aug 25, 2017
@jenkoian jenkoian deleted the dbal-qb branch August 25, 2017 07:00
ASKozienko pushed a commit that referenced this pull request Nov 2, 2018
Use Query Builder for better support across platforms.
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.

2 participants