sql query builder library for crystal-lang
Add this to your application's shard.yml:
dependencies:
query-builder:
github: izniburak/query-builderrequire "query-builder"
builder = Query::Builder.new
p builder.table("test").where("id", 17).or_where("language", "crystal").get
# Output:
# "SELECT * FROM test WHERE id = '17' OR language = 'crystal' LIMIT 1"
p builder.query("SELECT id, title FROM test_table WHERE id = ? AND title = ? ORDER BY id DESC LIMIT 10", [17, "Crystal"])
# Output:
# "SELECT id, title FROM test_table WHERE id = '17' AND title = 'Crystal' ORDER BY id DESC LIMIT 10"Coming soon...
- Fork it ( https://github.com/izniburak/query-builder/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- izniburak İzni Burak Demirtaş - creator, maintainer