cryesql

Port of yesql to Crystal

cryesql

Build Status

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

Repository

cryesql

Owner
Statistic
  • 1
  • 0
  • 0
  • 0
  • 1
  • about 8 years ago
  • March 19, 2016
License

MIT License

Links
Synced at

Sat, 18 May 2024 22:29:51 GMT

Languages