anchor.diff:  count(Conn, Type, Conditions) ->
       ConditionClause = build_conditions(Type, Conditions),
       TableName = boss_record_lib:database_table(Type),
  -    {ok, _, [{Count}]} = pgsql:equery(Conn,
  +    {ok, _, [{Count}]} = epgsql:equery(Conn,
           ["SELECT COUNT(*) AS count FROM ", TableName, " WHERE ", ConditionClause]),
       Count.
   
   counter(Conn, Id) when is_list(Id) ->
  -    Res = pgsql:equery(Conn, "SELECT value FROM counters WHERE name = $1", [Id]),
  +    Res = epgsql:equery(Conn, "SELECT value FROM counters WHERE name = $1", [Id]),
       case Res of
           {ok, _, [{Value}]} -> Value;
           {error, _Reason} -> 0
       end.
   
   incr(Conn, Id, Count) ->
  -    Res = pgsql:equery(Conn, "UPDATE counters SET value = value + $1 WHERE name = $2 RETURNING value",
  +    Res = epgsql:equery(Conn, "UPDATE counters SET value = value + $1 WHERE name = $2 RETURNING value",
           [Count, Id]),
       case Res of
           {ok, _, _, [{Value}]} -> Value;
           {error, _Reason} ->
  -            Res1 = pgsql:equery(Conn, "INSERT INTO counters (name, value) VALUES ($1, $2) RETURNING value",
  +            Res1 = epgsql:equery(Conn, "INSERT INTO counters (name, value) VALUES ($1, $2) RETURNING value",
                   [Id, Count]),
               case Res1 of
                   {ok, _, _, [{Value}]} -> Value;
  
positive.code:     end.
  
  create_table(Conn, TableName, TableDefinition) when is_atom(TableName) ->
      Res = pgsql:squery(Conn, ["CREATE TABLE ", atom_to_list(TableName), " ( ", tabledefinition_to_sql(TableDefinition), " )"]),
      case Res of
          {ok, [], []} ->
              ok;
  
negative.code:             Record1        = maybe_populate_id_value(Record),
              Type        = element(1, Record1),
              {Query,Params}    = build_insert_query(Record1),
          Res            = epgsql:equery(Conn, Query, Params),
              case Res of
                  {ok, _, _, [{Id}]} ->
                      {ok, Record1:set(id, lists:concat([Type, "-", id_value_to_string(Id)]))};
  