add support for transaction
fix delete in transaction and add getRecords and deleteAll