-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Update DB Readme #602
Update DB Readme #602
Conversation
Add example of query parameters in a query, mention there are more helper methods available for query, mention preparedstatements are at play crystal-db/crystal-lang#164
✅ Deploy Preview for crystal-book ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Note to self: after this is committed add an example of creating a PreparedStatement... |
docs/database/README.md
Outdated
Query parameters are accomplished typically using PreparedStatements under the hood, | ||
though this can be disabled via a connection string option `prepared_statements=false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if that statement is correct. I don't think query parameters are technically tied to prepared statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also in a147195
docs/database/README.md
Outdated
@@ -91,6 +93,16 @@ db.query "select name, age from contacts order by age desc" do |rs| | |||
end | |||
``` | |||
|
|||
You can also use query parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Query parameters are already mentioned in more depth a couple lines above. It would probably make sense to move the explanation of query parameters to a separate section and reference that from both exec
and query
sections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK attempted see a147195
Add example of query parameters in a query, mention there are more helper methods available for query, mention preparedstatements are at play (crystal-lang/crystal-db#164).