Home

Awesome

Yayql

Simple SQL Templating helper inspired by Yesql

This is very rough prototype, but it can do this:

See the examples down below.

I've learned that the essential parts of an actually working system are:

Build

Use the sqlite3 CLI tool to interact with the DB directly

Play

Example 1:

$ pry -r'lib/yayql.rb'
> make_query('queries/get_users.sql')
> get_users(Engine.connection)

Example 2:

$ pry -r'lib/yayql.rb'
# > make_query('queries/get_users_2.sql')
# > get_users_2(Engine.connection, {name: "'Dave'")