cryesql
cryesql
Port of Clojure yesql to Crystal.
Work in progress
Usage
Automatically create methods for queries defined in a .sql
file with magic comments via the def_queries
macro.
Given the file users.sql
:
-- name: select_users
SELECT * FROM users
Invoke def_queries("users.sql", db)
, where db
is a reference to a valid DB object, to autogenerate a method named select_users
that will run the SELECT * FROM users
query on the db
object and return the result.
Installation
Add this to your application's shard.yml
:
dependencies:
cryesql:
github: spalladino/cryesql
Contributors
- Santiago Palladino Santiago Palladino - creator, maintainer
Repository
cryesql
Owner
Statistic
- 1
- 0
- 0
- 0
- 1
- over 8 years ago
- March 19, 2016
License
MIT License
Links
Synced at
Sun, 17 Nov 2024 18:20:43 GMT
Languages