josephwecker / epgsql_pool Goto Github PK
View Code? Open in Web Editor NEWFork of Will Glozer's erlang postgresql pool server, so it can be maintained and polished.
License: BSD 3-Clause "New" or "Revised" License
Fork of Will Glozer's erlang postgresql pool server, so it can be maintained and polished.
License: BSD 3-Clause "New" or "Revised" License
Erlang PostgreSQL Connection Pool * Application epgsql_pool will create any pools defined in the application's 'pools' environment parameter, which is a list of atoms. Each atom must refer to an environment parameter with the same name and value {Size, Opts} where Opts is a property list with the following supported options: host - host to connect to, default "localhost". port - port to connect to, default 5432. username - username to authenticate with, default os:getenv("USER"). password - password to authenticate with, default "". database - database to connect to, no default. .config file example: {epgsql_pool, [{pools, [db1, db2]}, {db1, {10, [{database, "db1"}]}}, {db2, {10, [{database, "db2"}]}}]} * Pool Usage {ok, C} = pgsql_pool:get_connection(Pool, Timeout). Pool - Pid or Name of pool. Timeout - Time, in milliseconds, to wait for a free connection. ok = pgsql_pool:return_connection(Pool, Connection). * Details epgsql_pool monitors the process which called get_connection and returns the allocated connection to the pool if that process dies. If a connection dies, a new one is created and added to the pool in its place.
At line 57 of pgsql_pool.erl a call to pgsql_connection:database() is made.
There's no such function in the current pgsql_connection.erl: http://github.com/wg/epgsql/blob/master/src/pgsql_connection.erl
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.