Right after defstate mount states are of type mount.core.DerefableState that implements IDeref, no matter whether :cljc mode is on or off.
This is how bind-connection sees it when it's called to generate functions from queries.sql, making them call deref on the connection every time.
In the default :clj mode after the first start a state turns into the real value, which, in case of database connections, is not IDeref, just a plain map.
After the stop, it turns into mount.core.NotStartedState, which is also not IDeref.
I used mount in tests to reproduce this situation.
Closes #49.
Right after
defstate
mount states are of typemount.core.DerefableState
that implementsIDeref
, no matter whether:cljc
mode is on or off. This is howbind-connection
sees it when it's called to generate functions fromqueries.sql
, making them callderef
on the connection every time.In the default
:clj
mode after the first start a state turns into the real value, which, in case of database connections, is notIDeref
, just a plain map. After the stop, it turns intomount.core.NotStartedState
, which is also notIDeref
.I used mount in tests to reproduce this situation.