Behaviours: epgsql_command.
Connects to the server and performs all the necessary handshakes.
Special kind of command - it's exclusive: no other commands can run until this one finishes. It also uses some "private" epgsql_sock's APIsconnect_error() = invalid_authorization_specification | invalid_password | {unsupported_auth_method, kerberosV5 | crypt | scm | gss | sspi | {unknown, integer()} | {sasl, [binary()]}} | {sasl_server_final, any()} | epgsql:query_error()
response() = connected | {error, connect_error()}
execute/2 | |
handle_message/4 | |
hide_password/1 | this function wraps plaintext password to a lambda function, so, if
epgsql_sock process crashes when executing connect command, password will
not appear in a crash log. |
init/1 | |
open_socket/2 | |
opts_hide_password/1 | Replace password in Opts map with obfuscated one. |
execute(PgSock, Connect) -> any()
handle_message(X1, Message, Sock, State) -> any()
hide_password(Password::iodata()) -> fun(() -> iodata())
this function wraps plaintext password to a lambda function, so, if
epgsql_sock process crashes when executing connect
command, password will
not appear in a crash log
init(Opts) -> any()
open_socket(SockOpts::[{atom(), any()}], ConnectOpts::epgsql:connect_opts_map()) -> {ok, gen_tcp | ssl, gen_tcp:socket() | ssl:sslsocket()} | {error, any()}
opts_hide_password(Opts) -> any()
Replace password
in Opts map with obfuscated one
Generated by EDoc