Comparison

plugins/mod_storage_internal.lua @ 4088:0e5585910583

Merge 0.8->trunk
author Matthew Wild <mwild1@gmail.com>
date Fri, 07 Jan 2011 04:42:01 +0000
parent 4085:7699cef04740
child 5033:c64b5081bfa8
comparison
equal deleted inserted replaced
4082:eeab15f8aa35 4088:0e5585910583
1 local datamanager = require "core.storagemanager".olddm;
2
3 local host = module.host;
4
5 local driver = { name = "internal" };
6 local driver_mt = { __index = driver };
7
8 function driver:open(store)
9 return setmetatable({ store = store }, driver_mt);
10 end
11 function driver:get(user)
12 return datamanager.load(user, host, self.store);
13 end
14
15 function driver:set(user, data)
16 return datamanager.store(user, host, self.store, data);
17 end
18
19 module:add_item("data-driver", driver);