I guess everybody who wants to log his or her queries/commands is doing the same,
logUpdate ∷
forall t s r m.
TableToColsWithoutAlias s t r =>
GetCols r =>
MonadEffect m =>
Table t → ({ | r } → Col s Boolean) → ({ | r } → { | r }) → m Unit
logUpdate table pred up = do
let
{ strQuery, params } = showPG $ showUpdate table pred up
log strQuery
log $ unsafeStringify params
log ""
logQuery :: forall s i m. GetCols i => MonadEffect m => FullQuery s { | i } -> m Unit
logQuery q = do
let
{ strQuery, params } = showPG $ showQuery q
log strQuery
log $ unsafeStringify params
log ""
...
I don't know how to do it, but it would be nice to have some sort of tee or errorTee function, which lets me express the statement "I would like to see the generated output".
I guess everybody who wants to log his or her queries/commands is doing the same,
I don't know how to do it, but it would be nice to have some sort of
tee
orerrorTee
function, which lets me express the statement "I would like to see the generated output".