Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.04 KB

README.md

File metadata and controls

29 lines (23 loc) · 1.04 KB

Build Status Coverage Status GitHub tag Hex.pm

equery: erlang postgresql sql generator library


Description

Library for postgresql sql generation.

Simple Example

1> Schema = #{
    fields => #{
        id => #{},
        name => #{}
    },
    table => <<"users">>}.
2> Q = q:from(Schema).
3> Q2 = q:where(fun([#{id := Id}]) -> Id > 3 end, Q).
4> qast:to_sql(qsql:select(Q2)).
{<<"select \"__table-0\".\"id\",\"__table-0\".\"name\" from \"users\" as \"__table-0\" where (\"__table-0\".\"id\" > $1)">>,
 [3]}

More description will be later...