It looks like the 'pgsql' boss_db adapter (
boss_db_adapter_pgsql.erl) is not passing the database connection to the function it receives as argument. This is the current code for the function:
transaction(Conn, TransactionFun) ->
case pgsql:with_transaction(Conn, fun(_C) -> TransactionFun() end) of
{rollback, Reason} -> {aborted, Reason};
Other -> {atomic, Other}
end.
Is there a reason why the connection is not being passed?
BTW, has anyone used boss_db independently of the chicagoboss project? If so, how did you automate the model compilation with rebar?
Thanks,
Juanjo