Software /
code /
prosody
Comparison
plugins/mod_storage_sql.lua @ 5056:a125daa42ad4
mod_storage_sql: Return connection from connect even if already connected (thanks IRON)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 30 Jul 2012 18:50:46 +0100 |
parent | 5055:d466d2088a61 |
child | 5121:b5a5643f8572 |
child | 5130:051d352ed03c |
comparison
equal
deleted
inserted
replaced
5055:d466d2088a61 | 5056:a125daa42ad4 |
---|---|
77 module:log("debug", "Successfully connected to database"); | 77 module:log("debug", "Successfully connected to database"); |
78 dbh:autocommit(false); -- don't commit automatically | 78 dbh:autocommit(false); -- don't commit automatically |
79 connection = dbh; | 79 connection = dbh; |
80 | 80 |
81 connections[dburi] = dbh; | 81 connections[dburi] = dbh; |
82 return connection; | 82 end |
83 end | 83 return connection; |
84 end | 84 end |
85 | 85 |
86 local function create_table() | 86 local function create_table() |
87 if not module:get_option("sql_manage_tables", true) then | 87 if not module:get_option("sql_manage_tables", true) then |
88 return; | 88 return; |