Simplify OC_DB transaction functions

@icewind1991 @DeepDiver1975 @VicDeo @butonic