Module dream_postgres_driver_pool

Data Types

conn()

conn() = #conn{owner = pid(), socket = gen_tcp:socket() | ssl:sslsocket(), socket_module = ssl | gen_tcp, pool = atom(), parameters = map(), queue = boolean(), trace = boolean(), trace_attributes = [{unicode:unicode_binary(), unicode:unicode_binary() | integer()}], include_statement_span_attribute = boolean(), decode_opts = [], extra = term()}

ref()

ref() = {Pool::pid(), Ref::reference(), TimerRef::reference() | undefined, Holder::ets:tid()}

Function Index

checkin/3
checkout/2
disconnect/4
format_error/1
handle_call/3
handle_info/2
init/1
prepare_pool_config/1Normalizes the pool configuration, refuses a null byte in the password or in a startup parameter, and puts a password string into a function.
start_link/2
stop/4
update/4

Function Details

checkin/3

checkin(X1, Conn, X3) -> any()

checkout/2

checkout(Pool::atom(), Opts::list()) -> {ok, ref(), conn()} | {error, any()}

disconnect/4

disconnect(X1, Err, Conn, X4) -> any()

format_error/1

format_error(X1) -> any()

handle_call/3

handle_call(X1, From, D) -> any()

handle_info/2

handle_info(Checkout, Busy) -> any()

init/1

init(X1) -> any()

prepare_pool_config/1

prepare_pool_config(PoolConfig::dream_postgres_driver:pool_config() | list()) -> {ok, dream_postgres_driver:pool_config()} | {error, {null_byte, password | {parameter, binary()}}}

Normalizes the pool configuration, refuses a null byte in the password or in a startup parameter, and puts a password string into a function. The supervisors keep the pool configuration in their child specs and print it in their status and in their reports: a function prints without its value. A password function from the caller is not changed, and is checked at connect time.

start_link/2

start_link(Pool, PoolConfig) -> any()

stop/4

stop(X1, Err, Conn, X4) -> any()

update/4

update(Pool, Ref, Mod, State) -> any()


Generated by EDoc