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

Extend get and get! Methods to Support Raw SQL Subquery Filtering #270

Open
treagod opened this issue Oct 22, 2024 · 0 comments
Open

Extend get and get! Methods to Support Raw SQL Subquery Filtering #270

treagod opened this issue Oct 22, 2024 · 0 comments
Assignees
Milestone

Comments

@treagod
Copy link
Contributor

treagod commented Oct 22, 2024

Description

Following up on Issue #44, where the ability to filter records using raw SQL subquery predicates was added to the filter method, it would be useful to implement similar functionality for the get and get! methods.

Currently, a workaround like Post.filter("access_token = ?", access_token).first is required to achieve this, but it would be more convenient and intuitive to allow raw subquery predicates directly within the get and get! methods.

Tasks

Modify the get and get! methods to accept raw SQL subquery predicates, similar to how the filter method works.
Allow these predicates to be passed along with parameters in either positional or named form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants