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

Fixing the usage for crystal-db methods #750

Merged
merged 1 commit into from
Oct 16, 2021
Merged

Fixing the usage for crystal-db methods #750

merged 1 commit into from
Oct 16, 2021

Conversation

jwoertink
Copy link
Member

Fixes #741

@@ -74,7 +74,7 @@ abstract class Avram::Database
end

# Methods without a block
{% for crystal_db_alias in [:exec, :scalar, :query, :query_all, :query_one, :query_one?, :query_each] %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query_each requires a block

@@ -91,7 +91,7 @@ abstract class Avram::Database
{% end %}

# Methods with a block
{% for crystal_db_alias in [:query, :query_all, :query_one, :query_each] %}
{% for crystal_db_alias in [:query, :query_all, :query_one, :query_one?, :query_each] %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query_one? also has a block form.

@jwoertink jwoertink merged commit 74b56e1 into master Oct 16, 2021
@jwoertink jwoertink deleted the issues/741 branch October 16, 2021 19:38
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.

I think this query_each would fail
1 participant