Skip to content

Commit

Permalink
improve description of squery in README
Browse files Browse the repository at this point in the history
  • Loading branch information
wg committed Jul 17, 2009
1 parent 57b963b commit 4acc379
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README
Expand Up @@ -23,11 +23,15 @@ Erlang PostgreSQL Database Client


* Simple Query * Simple Query


{ok, Columns, Rows} = pgsql:squery(C, Sql). {ok, Columns, Rows} = pgsql:squery(C, "select ...").
{error, Error} = pgsql:squery(C, InvalidSql). {ok, Count} = pgsql:squery(C, "update ...").
{ok, Count, Columns, Rows} = pgsql:squery(C, "insert ... returning ...").

{error, Error} = pgsql:squery(C, "invalid SQL").


Columns - list of column records, see pgsql.hrl for definition. Columns - list of column records, see pgsql.hrl for definition.
Rows - list of tuples, one for each row. Rows - list of tuples, one for each row.
Count - integer count of rows inserted/updated/etc


The simple query protocol returns all columns as text (Erlang binaries) The simple query protocol returns all columns as text (Erlang binaries)
and does not support binding parameters. and does not support binding parameters.
Expand Down

0 comments on commit 4acc379

Please sign in to comment.