我需要检查我的res
fromdbSendQuery()
是否结束。
我的代码是这样的:
db <- dbConnect(drv=SQLite(),flags=SQLITE_RW,dbname="db.sqlite",synchronous = "off")
dbBegin(db)
res <- dbSendQuery(db,"Update Operation SET Name = 'teste' where Id = 1")
if("my SendQuery is over"){
dbClearResult(res)
dbCommit(db)
dbDisconnect(db)
}
Run Code Online (Sandbox Code Playgroud)
我需要知道什么时候结束才能将其发送到提交然后断开连接。
更新 1 我是我的系统,对于上面的示例,可能会同时发生超过 1 个用户。然后,当数据库中的第一个连接结束时,我需要完成他的请求并为其他连接提供编写查询的可能性。