Anybody else having trouble with counters? What am I doing wrong?
> boss_db:incr("foo").
** exception exit: {{{case_clause,{ok,0}},
[{boss_db_adapter_pgsql,incr,3,
[{file,"src/db_adapters/boss_db_adapter_pgsql.erl"},
{line,92}]},
{boss_db_controller,handle_call,3,
[{file,"src/boss_db_controller.erl"},{line,150}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,580}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]},
{gen_server,call,[<0.343.0>,{incr,"foo",1},30000]}}
in function gen_server:call/3 (gen_server.erl, line 190)
in call from boss_pool:call/3 (src/boss_pool.erl, line 12)
Postgres has this:
# \d counters
Table "public.counters"
Column | Type | Modifiers
--------+------------------------+-----------
name | character varying(255) | not null
value | integer | default 0
Indexes:
"counters_pkey" PRIMARY KEY, btree (name)
Thanks,
- ken