Closed selcarpa closed 8 months ago
看这份README中说不建议直接使用,虽然我确实是直接使用的,因为openDatabase最终还是返回的一个DatabaseConnection。 我暂时没有详细阅读源码,不确定这种方式是否能同步使用sqllin dsl的事务呢?
可以,有 driver 级别的 transaction API。我写不建议使用主要是因为有 sqllin-dsl 的存在,大多数时候没有必要直接使用 sqllin-driver
好的,感谢,希望也添加一下相关说明。
哪部分的说明?driver 层详细的 API 使用文档吗
对的,包含刚才提到的是否有事务之类的
获取Outlook for Androidhttps://aka.ms/AAb9ysg
From: Yuang Qiao @.> Sent: Wednesday, November 8, 2023 2:43:38 PM To: ctripcorp/SQLlin @.> Cc: selcarpa @.>; State change @.> Subject: Re: [ctripcorp/SQLlin] (Feature Request)有计划提供执行原生sql的api吗? (Issue #62)
哪部分的说明?driver 层详细的 API 使用文档吗
― Reply to this email directly, view it on GitHubhttps://github.com/ctripcorp/SQLlin/issues/62#issuecomment-1801187616, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGCTABR2GVMGYIAVUUIYA4DYDMSZVAVCNFSM6AAAAAA7CKTBRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRGE4DONRRGY. You are receiving this because you modified the open/close state.Message ID: @.***>
可以,有空的时候我可以再添加一些内容。其实 transaction 属于 SQLite 的能力,sqllin-driver 拥有完整的 SQLite 能力,sqllin-dsl 只是在其之上实现了 SQL 语句的 DSL 化,sqllin-dsl 不会包含任何底层 SQLite API 级别的实现。
将所有的sql语句dsl化可能有点耗时间,但有没有计划提供类似这种形式直接执行sql的方式(并提供事务支持)。
完整代码