a python database helper to make the CRUD very easy ... Enjoy!
#table method takes 1 param which is the name of the table
# the all() method doesn`t take any params
DB().table("table_name").all()
#where method takes only 2 params which is the column name and the value of it
DB().table("table_name").where('id',1).get()
#another example with or where
DB().table("table_name").where('id',1).orWhere('username','zed').get()
#another example with whereNot this will get all records which not equal this value
DB().table("table_name").whereNOT('id',1).get()
DB().table("table_name").where('name','zed').orderBy('id','desc').limit(5).get()
##Example
users = DB().table("users").all()
for user in users:
print(user)
DB().table("table_name").create({"username":"zed","email":"zed@mail.com","password":"123456"})
DB().table("table_name").where('id',2).update({"username":"zed_magdy","password":"122222"})
#find method takes 1 param wich is the "id"
DB().table("table_name").find(1).delete()