dbcontrollerfunctions.lua 895 Bytes
Newer Older
1 2
module(..., package.seeall)

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

7
function listtables(self)
8
	return self.model.list_tables(self, self.clientdata)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
end

function viewtable(self)
	return self.model.list_table_entries(self, self.clientdata)
end

function deletetableentry(self)
	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

function updatetableentry(self)
	return self.handle_form(self, self.model.get_table_entry, self.model.update_table_entry, self.clientdata, "Update", "Update Table Entry", "Entry updated")
end

function createtableentry(self)
	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