Comparison

plugins/mod_storage_none.lua @ 6283:7cf6d3a2c855

mod_storage_{none,internal,sql}: Return error for unsupported (everything but keyval) store types
author Kim Alvefur <zash@zash.se>
date Fri, 20 Jun 2014 16:22:23 +0200
parent 5425:b00812c6daf8
child 8058:1b35a562528d
comparison
equal deleted inserted replaced
6282:bce801e40484 6283:7cf6d3a2c855
1 local driver = {}; 1 local driver = {};
2 local driver_mt = { __index = driver }; 2 local driver_mt = { __index = driver };
3 3
4 function driver:open(store) 4 function driver:open(store, typ)
5 return setmetatable({ store = store }, driver_mt); 5 if typ and typ ~= "keyval" then
6 return nil, "unsupported-store";
7 end
8 return setmetatable({ store = store, type = typ }, driver_mt);
6 end 9 end
7 function driver:get(user) 10 function driver:get(user)
8 return {}; 11 return {};
9 end 12 end
10 13