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

Separating creation of query from execution of it #15

Open
1 of 5 tasks
ivergara opened this issue May 4, 2021 · 1 comment
Open
1 of 5 tasks

Separating creation of query from execution of it #15

ivergara opened this issue May 4, 2021 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ivergara
Copy link
Collaborator

ivergara commented May 4, 2021

Currently, we have helper functions that actually build the query and then immediately execute returning the retrieved data and the query itself.

I suggest that those functions only return the statement, which would be called at initialization time storing it in an instance attribute of the constraint and then in retrieve it executes it.

My rationale to do this is the following case. I want to create the constraint and I want to obtain the SQL query that said constraint will produce without having to actually perform the test (or more exactly the retrieval). This is particularly interesting for explorative use of this library and when the execution of the query could take a long time, e.g., more than 10 minutes.

This has no priority, just a suggested idea, which also establishes better the responsibility of the retrieve method.

  • AggregateNumericRangeEquality
  • Uniques
  • NRows
  • ...
  • Add selection as abstractmethod in Constraint base class.
@ivergara ivergara added enhancement New feature or request good first issue Good for newcomers labels May 4, 2021
@kevinkleinQC
Copy link

Sounds cool!

@ivergara ivergara transferred this issue from another repository Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants