[erlang-questions] API design and pgapp

David Welton <>
Tue Sep 5 18:21:37 CEST 2017


Hi,

I'm jumping back into the world of Erlang, and among other things,
work on pgapp, a higher level interface for Postgres.

This came up, lately: https://github.com/epgsql/pgapp/issues/22

Which seems to pit two things against one another:

* On one hand, using the process registry to keep track of the Conn
(connection) is not very Erlang-y and might introduce errors.

* That said, it's also nice for things to be composable in the sense
that you can write, say, update_stats() either within the transaction
or outside and have it 'just work' without having to provide both an
update_stats() and update_stats(Conn).

Thoughts? Thanks!
-- 
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/


More information about the erlang-questions mailing list