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

Fix Sequel deprecation warnings #577

Merged
merged 1 commit into from
Sep 16, 2017

Conversation

matchbookmac
Copy link
Contributor

@matchbookmac matchbookmac commented Sep 15, 2017

Why

Sequel throws deprecation warnings when using its older symbol-splitting syntax (:table__column).
Additionally, Model.table_name in sequel can return a non-String/Symbol value.

How

Uses ::Sequel.qualify to join table_name and column.
Uses the Sequel::SQL::QualifiedIdentifier returned from Chewy::Type::Adapter::Sequel#full_column_name appropriately in the relevant scope filters.

Notes

I see there is already a PR for this (#542), but it looks like the build isn't passing.

Sequel throws deprication warnings when using its older symbol qualifying syntax (`table__column`).
Additionally, `Model.table_name` in `sequel` can return a non-`String` value.

Uses `::Sequel.qualify` to join `table_name` and `column`.
Uses the `Sequel::SQL::QualifiedIdentifier` returned from `Chewy::Type::Adapter::Sequel#full_column_name` appropriately in the relevant `scope` filters.
@matchbookmac matchbookmac changed the title Fix Sequel deprication warnings Fix Sequel deprecation warnings Sep 15, 2017
@pyromaniac
Copy link
Contributor

Awesome, thanks!

@pyromaniac pyromaniac merged commit 791811b into toptal:master Sep 16, 2017
@matchbookmac
Copy link
Contributor Author

Happy to help!

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