Software /
code /
prosody
Comparison
plugins/mod_storage_sql.lua @ 5122:b41c33dc7c36
mod_storage_*: Don't explicitly set driver name, to ease copying/renaming modules.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 12 Sep 2012 23:46:10 +0500 |
parent | 5121:b5a5643f8572 |
child | 5133:1443d1c37c6c |
comparison
equal
deleted
inserted
replaced
5121:b5a5643f8572 | 5122:b41c33dc7c36 |
---|---|
363 --local stmt, err = getsql("SELECT * FROM `prosody` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", key or ""); | 363 --local stmt, err = getsql("SELECT * FROM `prosody` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", key or ""); |
364 | 364 |
365 return nil, "not-implemented" | 365 return nil, "not-implemented" |
366 end | 366 end |
367 | 367 |
368 local driver = { name = "sql" }; | 368 local driver = {}; |
369 | 369 |
370 function driver:open(store, typ) | 370 function driver:open(store, typ) |
371 if not typ then -- default key-value store | 371 if not typ then -- default key-value store |
372 return setmetatable({ store = store }, keyval_store); | 372 return setmetatable({ store = store }, keyval_store); |
373 end | 373 end |