Skip to content

lukyanov/epgsqerl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epgsqerl

An Erlang PostgreSQL client, a mash-up of epgsql, poolboy and sqerl. It uses pgapp to combine epgsql and poolboy.

Build

$ ./rebar3 compile

Try in shell

$ ./rebar3 shell

Make sure you have set up shell.config properly first.

Examples:

% Using sqerl DSL:
> epgsqerl:squery(pool1, {select, 1}).
> epgsqerl:squery(pool1, {select, foo, {from, bar}, {where, {id,'=',1}}}).
> epgsqerl:equery(pool1, {select, foo, {from, bar}, {where, "id=$1"}}, [1]).

% Using raw SQL:
> epgsqerl:squery(pool1, <<"SELECT 1">>).
> epgsqerl:equery(pool1, <<"SELECT foo FROM bar WHERE id=$1">>, [1]).

About

An Erlang PostgreSQL client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages