Commit data changes in functions which modify data

insert(), delete(), update(), insertOrUpdate() functions do not work on transactional database engines like InnoDB as the changes are not committed. query() also does not modify data if INSERT, UPDATE or DELETE statements are used.

Modify functions to commit the changes before returning.