Copyright © (C) 2013, Eric Merritt
Authors: Eric Merritt (ericbmerritt@gmail.com).
close_fun() = fun((term()) -> ok)
connect_fun() = fun(() -> term())
connection() = pid() | term()
name() = any()
| get_connection/1 | Get a db connection, wait at most 10 seconds before giving up. |
| get_connection/2 | Get a db connection, wait at most Timeout seconds before giving up. |
| return_connection/2 | Return a db connection back to the connection pool. |
| start_pool/1 | |
| start_pool/5 | |
| start_pools/1 | |
| stop/1 | Stop the pool, close all db connections. |
get_connection(Name::name()) -> {ok, connection()}
Get a db connection, wait at most 10 seconds before giving up.
get_connection(Name::name(), Timeout::non_neg_integer()) -> {ok, connection()}
Get a db connection, wait at most Timeout seconds before giving up.
return_connection(Name::name(), C::connection()) -> ok
Return a db connection back to the connection pool.
start_pool(X1::{name(), proplists:proplist()}) -> {ok, pid()} | {error, term()}
start_pool(Name::name(), Size::non_neg_integer(), Timeout::non_neg_integer(), ConnectFun::connect_fun(), CloseFun::close_fun()) -> {ok, pid()} | {error, term()}
start_pools(Opts::[term()]) -> [{ok, pid()} | {error, term()}]
stop(Name::name()) -> ok
Stop the pool, close all db connections
Generated by EDoc