我可以在SQLite事务提交后回滚它吗? [英] Can I rollback a SQLite transaction after it has been committed?

查看:1159
本文介绍了我可以在SQLite事务提交后回滚它吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SQLite中有一种方法,在提交之后基本上撤消最新的事务?

Is there a way in SQLite to essentially undo the latest transaction after it has been committed?

我想将数据库恢复到事务之前的状态或保存点。我已经查看了rollback命令,但它似乎只限于回滚待处理的事务。

I'd like to revert the database to the state before a transaction or savepoint. I've looked at the rollback command, but it looks like it is limited to rolling back a pending transaction.

编辑
我可以创建一个名为Undo的保存点,并在开始下一个操作之前等待释放它,或者如果我需要撤消它,则回滚。

Edit Could I create a savepoint named "Undo" and wait to release it before starting the next action, or rollback if I need to undo it?

推荐答案

我不知道你是否使用JDBC 3.0。如果你然后它支持保存点。 http://www.ibm.com/developerworks/java/library/j- jdbcnew /

I am not sure if you are using JDBC 3.0. If you are then it supports savepoints. http://www.ibm.com/developerworks/java/library/j-jdbcnew/

这篇关于我可以在SQLite事务提交后回滚它吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆