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

Include table_name in scopes to allow for JOIN operations #27

Merged
merged 3 commits into from
Sep 4, 2024
Merged

Include table_name in scopes to allow for JOIN operations #27

merged 3 commits into from
Sep 4, 2024

Conversation

fjaeger
Copy link
Contributor

@fjaeger fjaeger commented Sep 11, 2022

No description provided.

@kenn
Copy link
Owner

kenn commented Sep 13, 2022

If we want to support general composability, wouldn't we want to quote names?

For instance:

connection.quote_table_name_for_assignment(table_name, column_name)

@dmitry
Copy link

dmitry commented Sep 2, 2024

What is necessary to finish with this issue?

@fjaeger
Copy link
Contributor Author

fjaeger commented Sep 2, 2024

I can apply @kenn 's suggestion, if that is generally agreed upon…

@dmitry
Copy link

dmitry commented Sep 2, 2024

@fjaeger I think that will be enough. Another solution to use arel, like:

Arel::Nodes::BitwiseAnd.new(arel_table[attribute], flags.to_i(value)).gt(0)

@kenn
Copy link
Owner

kenn commented Sep 2, 2024

I would also add a test case with a composed join operation?

@fjaeger
Copy link
Contributor Author

fjaeger commented Sep 3, 2024

I applied a refactoring and added a corresponding test

@kenn
Copy link
Owner

kenn commented Sep 3, 2024

Looks like some tests are failing? Would you take a look?

@fjaeger
Copy link
Contributor Author

fjaeger commented Sep 3, 2024

@kenn I doubt that the failing tests are due to this PR's changes. It seems there was a recent release of https://github.com/sparklemotion/sqlite3-ruby which is only used for Ruby3 and which fails to load on the test environment you are using here.

@kenn kenn merged commit 3e9744a into kenn:master Sep 4, 2024
7 of 14 checks passed
@kenn
Copy link
Owner

kenn commented Sep 4, 2024

Released as v2.0.0 — thank you, @fjaeger ! 🎉

https://rubygems.org/gems/active_flag

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