sequel

Version, currently master branch1 version
  • master branchlatestAug 2, 2016

github.com/jonahgeorge/sqb

Shitty Query Builder

0 stars
0 dependents
License: not declared

Installation

# Add this to your shard.yml
dependencies:
  sequel:
    github: jonahgeorge/sqb
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
no constraint declared

Dependencies

Runtime Dependencies

  • sqlite3*github: crystal-lang/crystal-sqlite3

Documentation

Read the API documentation

Generated from the source of the current release. The first visit to a release that has never been documented starts its build.

README

# SQB: Shitty Query Builder

Please don't use this.

```crystal
require "../src/sequel"

DB = Sequel.connect("sqlite://data.db")
DB.run <<-SQL
CREATE TABLE IF NOT EXISTS users (
  id INTEGER,
  first_name TEXT,
  last_name TEXT,
  PRIMARY KEY (id)
);
SQL

users = DB[:users]

users.insert({first_name: "Jonah", last_name: "George"})
users.insert({first_name: "Kathrine", last_name: "Gifford"})

puts users.all
puts users.where({first_name: "Jonah"})
```