<commit_before>local datamanager = require "core.storagemanager".olddm;

local host = module.host;

local driver = { name = "internal" };
local driver_mt = { __index = driver };

function driver:open(store)
	return setmetatable({ store = store }, driver_mt);
end
function driver:get(user)
	return datamanager.load(user, host, self.store);
end

function driver:set(user, data)
	return datamanager.store(user, host, self.store, data);
end

module:add_item("data-driver", driver);<commit_msg>mod_storage_internal: Add method for listing stores<commit_after>local datamanager = require "core.storagemanager".olddm;

local host = module.host;

local driver = { name = "internal" };
local driver_mt = { __index = driver };

function driver:open(store)
	return setmetatable({ store = store }, driver_mt);
end
function driver:get(user)
	return datamanager.load(user, host, self.store);
end

function driver:set(user, data)
	return datamanager.store(user, host, self.store, data);
end

function driver:list_stores(username)
	return datamanager.list_stores(username, host);
end

module:add_item("data-driver", driver);
{'fraction_non_alphanumeric': 0.12364620938628158, 'fraction_numerical': 0.0, 'mean_word_length': 6.344370860927152, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4310852', 'n_tokens_mistral': 357, 'n_tokens_neox': 356, 'n_words': 92}