dbcontrollerfunctions.lua 958 Bytes
Newer Older
1
local mymodule = {}
2

3
function mymodule.listdatabases(self)
4 5 6
	return self.model.list_databases(self, self.clientdata)
end

7
function mymodule.listtables(self)
8
	return self.model.list_tables(self, self.clientdata)
9 10
end

11
function mymodule.viewtable(self)
12 13 14
	return self.model.list_table_entries(self, self.clientdata)
end

15
function mymodule.deletetableentry(self)
16 17 18
	return self.handle_form(self, self.model.get_delete_table_entry, self.model.delete_table_entry, self.clientdata, "Delete", "Delete Table Entry", "Table Entry deleted")
end

19
function mymodule.updatetableentry(self)
20 21 22
	return self.handle_form(self, self.model.get_table_entry, self.model.update_table_entry, self.clientdata, "Update", "Update Table Entry", "Entry updated")
end

23
function mymodule.createtableentry(self)
24 25
	return self.handle_form(self, self.model.get_new_table_entry, self.model.create_table_entry, self.clientdata, "Create", "Create New Table Entry", "Entry created")
end
26 27

return mymodule