Capacitor-Community:Sqlite更新查询不起作用,dbchanges返回为零。

huangapple go评论59阅读模式
英文:

Capacitor-Community:Sqlite update query not working and dbchanges returning zero

问题

我正在使用Capacitor-Community sqlite来开发我的Android应用。

查询:

private String persistenceGetFileVersionUpdatequery(String fileName) {
    return "Update LastSync Set lastfileversion = 'Alter_V4';";
}

使用方法execSQL并返回的响应为

{"changes":0}

如何解决上述问题?

谢谢。

英文:

I am using Capacitor-Community sqlite for my AndroidApp.

query:

private String persistenceGetFileVersionUpdatequery(String fileName) {
        return "Update LastSync Set lastfileversion = 'Alter_V4';";
    }

Using method execSQL and return response is

{"changes":0}

how to solve above issue?

Thanks.

答案1

得分: 1

我还没有测试过 execSQL 方法,但我正在使用 run 方法,这个方法是有效的。

英文:

I haven't tested the execSQL method but I'm using the run method which does work.

huangapple
  • 本文由 发表于 2020年9月7日 17:49:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/63775168.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定