我有以下代码:
db.transaction(
function runQuery(tx) {
tx.executeSql(
'delete from meetings where id='+id
);
log('delete from meetings where id='+id);
},
function(e) {
log('failed to delete from database: '+e.code);
},
function() {
log('meeting deleted from db: '+id);
setTimeout(callback, 1);
}
);
在回调中,我查询了会议表,我刚刚删除的行仍然存在。这是超时是否为 1、1000 或其他。
我如何告诉 phonegap 请关闭事务以便数据库正确同步?