From 58f975e29b8e72aed1a8c3fbf365d562a3d02852 Mon Sep 17 00:00:00 2001 From: Jesse Gumm Date: Wed, 16 Jul 2014 16:10:34 -0500 Subject: [PATCH] Add execute/3 to mysql adapter --- src/db_adapters/boss_db_adapter_mysql.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/db_adapters/boss_db_adapter_mysql.erl b/src/db_adapters/boss_db_adapter_mysql.erl index 1079731b..e1fe7cf0 100644 --- a/src/db_adapters/boss_db_adapter_mysql.erl +++ b/src/db_adapters/boss_db_adapter_mysql.erl @@ -2,7 +2,7 @@ -behaviour(boss_db_adapter). -export([init/1, terminate/1, start/1, stop/0, find/2, find/7, find_by_sql/4]). -export([count/3, counter/2, incr/3, delete/2, save_record/2]). --export([push/2, pop/2, dump/1, execute/2, transaction/2]). +-export([push/2, pop/2, dump/1, execute/2, execute/3, transaction/2]). -export([get_migrations_table/1, migration_done/3]). -compile(export_all). start(_) -> @@ -201,6 +201,9 @@ dump(_Conn) -> "". execute(Pid, Commands) -> fetch(Pid, Commands). +execute(Pid, Commands, Params) -> + fetch(Pid, Commands, Params). + transaction(Pid, TransactionFun) when is_function(TransactionFun) -> do_transaction(Pid, TransactionFun).