aboutsummaryrefslogtreecommitdiffstats
path: root/src/mysqlerl.erl
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2008-03-01 17:51:58 -0500
committerBrian Cully <bjc@kublai.com>2008-03-01 17:51:58 -0500
commit1c18deb43934fbba7d1d1ac3542d8e8d136f8e7d (patch)
tree9af256089efaf43ee6a1469bdfdb73ceef84b7fb /src/mysqlerl.erl
parenta6e20801114898a7f8904071f84702daafc0f0cc (diff)
downloadmysqlerl-1c18deb43934fbba7d1d1ac3542d8e8d136f8e7d.tar.gz
mysqlerl-1c18deb43934fbba7d1d1ac3542d8e8d136f8e7d.zip
mysqlerl provides the interface for the connection, to avoid
trampolining at the cost of some slight non-obviousness. Move protocol to .hrl file as a result.
Diffstat (limited to 'src/mysqlerl.erl')
-rw-r--r--src/mysqlerl.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mysqlerl.erl b/src/mysqlerl.erl
index ddc8857..aae7fda 100644
--- a/src/mysqlerl.erl
+++ b/src/mysqlerl.erl
@@ -4,6 +4,8 @@
-module(mysqlerl).
-author('bjc@kublai.com').
+-include("mysqlerl.hrl").
+
-export([test_start/0, test_msg/0]).
-export([start/0, start/1, stop/0, commit/2, commit/3,
@@ -193,5 +195,5 @@ sql_query(Ref, SQLQuery) ->
%% Returns:
%% {selected, ColNames, Rows} | {error, Reason}
%% Rows = rows()
-sql_query(_Ref, _SQLQuery, _Timeout) ->
- ?NOTIMPLEMENTED.
+sql_query(Ref, SQLQuery, Timeout) ->
+ gen_server:call(Ref, #sql_query{q = SQLQuery}, Timeout).