diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-31 13:34:21 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-31 13:34:21 +0000 |
commit | cf877e5b4fbb8d99edd800a768b4902b47cbf6d3 (patch) | |
tree | 626e6c3661b937015bc203ce521cb356f3ea42da | |
parent | 56d75e8cd5286f97881da8a7b82c3413673751f1 (diff) | |
download | acf-provisioning-cf877e5b4fbb8d99edd800a768b4902b47cbf6d3.tar.bz2 acf-provisioning-cf877e5b4fbb8d99edd800a768b4902b47cbf6d3.tar.xz |
Reorganize code slightly so runsqlcommand is defined before use
-rw-r--r-- | provisioning-model.lua | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/provisioning-model.lua b/provisioning-model.lua index c45cdb7..0408dc9 100644 --- a/provisioning-model.lua +++ b/provisioning-model.lua @@ -34,6 +34,19 @@ local functions -- ################################################################################ -- LOCAL FUNCTIONS + +-- This function is used by scripts, do not change prototype +local runsqlcommand = function(sql, transaction) + mymodule.logevent(sql) + return provdb.runsqlcommand(sql, transaction) +end + +-- This function is used by scripts, do not change prototype +local getselectresponse = function(sql, transaction) + mymodule.logevent(sql) + return provdb.getselectresponse(sql, transaction) +end + local function assert (v, m) if not v then m = m or "Assertion failed!" @@ -114,18 +127,6 @@ local databaseconnect = function() return result end --- This function is used by scripts, do not change prototype -local runsqlcommand = function(sql, transaction) - mymodule.logevent(sql) - return provdb.runsqlcommand(sql, transaction) -end - --- This function is used by scripts, do not change prototype -local getselectresponse = function(sql, transaction) - mymodule.logevent(sql) - return provdb.getselectresponse(sql, transaction) -end - local validateparam validateparam = function(p, allowdefault) if p.type == "group" then |