Module helper_connection

This module incapsulates functions these are responsible for connection to MySQL server.

Copyright © 2010-2014 Alexei Krasnopolski

Version: 1.2.4

Introduced in: 2010-10-08

Authors: Alexei Krasnopolski (krasnop@bellsouth.net) [web site: http://krasnopolski.org/].

Description

This module incapsulates functions these are responsible for connection to MySQL server. Function open_connection establishes socket connection to server and proceedes handshake with authorization. Function change_user keeps connection opened but it changes authorization.

Function Index

change_user/4Changes user for the connection.
open_connection/1 Open ip/tcp socket connection to remote MySQL server.

Function Details

open_connection/1

open_connection(Datasource_definition::#datasource{}) -> #connection{} | #mysql_error{}

Open ip/tcp socket connection to remote MySQL server. The function returns a record that contains all information about the connection or error message if request is failed.

change_user/4

change_user(Connection::#connection{}, User::string(), Password::string(), Db::string) -> #connection{} | #mysql_error{}

Changes user for the connection. Returns new Connection record or error record.


Generated by EDoc, Mar 19 2014, 23:27:00.