anchor.diff:  
   delete(Conn, Id) when is_list(Id) ->
       {_, TableName, IdColumn, TableId} = boss_sql_lib:infer_type_from_id(Id),
  -    Res = pgsql:equery(Conn, ["DELETE FROM ", TableName, " WHERE ", IdColumn, " = $1"], [TableId]),
  -    case Res of
  -        {ok, _Count} -> 
  -            pgsql:equery(Conn, "DELETE FROM counters WHERE name = $1", [Id]),
  +    Res = epgsql:equery(Conn, ["DELETE FROM ", TableName, " WHERE ", IdColumn, " = $1"], [TableId]),
  +    case Res of
  +        {ok, _Count} ->
  +            epgsql:equery(Conn, "DELETE FROM counters WHERE name = $1", [Id]),
               ok;
           {error, Reason} -> {error, Reason}
       end.
  
positive.code:     end.
  
  push(Conn, Depth) ->
      case Depth of 0 -> pgsql:squery(Conn, "BEGIN"); _ -> ok end,
      pgsql:squery(Conn, "SAVEPOINT savepoint"++integer_to_list(Depth)).
  
  pop(Conn, Depth) ->
      pgsql:squery(Conn, "ROLLBACK TO SAVEPOINT savepoint"++integer_to_list(Depth - 1)).
  
  dump(_Conn) -> "".
  
  execute(Conn, Commands) ->
      pgsql:squery(Conn, Commands).
  
  execute(Conn, Commands, Params) ->
      pgsql:equery(Conn, Commands, Params).
  
  transaction(Conn, TransactionFun) ->
      case pgsql:with_transaction(Conn, fun(_C) -> TransactionFun() end) of
          {rollback, Reason} -> {aborted, Reason};
          Other -> {atomic, Other}
      end.
  
  get_migrations_table(Conn) ->
      Res = pgsql:equery(Conn, "SELECT * FROM schema_migrations", []),
      case Res of
          {ok, _Columns, ResultRows} ->
              ResultRows;
  
negative.code:             {error, Reason}
      end.
  
  find(Conn, Type, Conditions, Max, Skip, Sort, SortOrder) when is_atom(Type),
  							      is_list(Conditions),
                                                                is_integer(Max) orelse Max =:= all,
  							      is_integer(Skip),
                                                                is_atom(Sort),
  							      is_atom(SortOrder) ->
      case boss_record_lib:ensure_loaded(Type) of
          true ->
              Query = build_select_query(Type, Conditions, Max, Skip, Sort, SortOrder),
              Res = epgsql:equery(Conn, Query, []),
              case Res of
                  {ok, Columns, ResultRows} ->
                      FilteredRows = case {Max, Skip} of
  