You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---原始邮件---
发件人: ***@***.***>
发送时间: 2023年12月28日(周四) 晚上6:19
收件人: ***@***.***>;
抄送: ***@***.***>;
主题: [siyuan-note/siyuan] 希望加一个API,等待当前所有DB任务都写盘后才返回。 (Issue #10005)
In what scenarios do you need this feature?
有没有可能加一个flash db的API。等待所有pending的任务都给刷盘了。
有时候调用一些API后,虽然成功了,但db里是没有相关数据的。
插件中只能等待,或者间隔地循环尝试。插件引入这种设计,比较难维护。
另外,前端是否也能提供一个接口,等待编辑器里面的事务,也发送到后端。
有时我在编辑器写入内容,到内容出现在db,这个时间不好把握。
如果前端后端都有flash 接口,那就能准确地知道,何时查db,能查到刚刚写入的数据。
Describe the optimal solution
如果加入一个flushdb类似的api.
插件中可以这样用:
await createDoc()
await flushDB()
await queryDB()
Describe the candidate solution
No response
Other information
No response
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
Activity
88250 commentedon Dec 28, 2023
IAliceBobI commentedon Dec 28, 2023
@88250 也行,只是我目前不知道怎么搞。后续我再研究吧。先加内核的。谢谢!
[-]希望加一个API,等待当前所有DB任务都写盘后才返回。[/-][+]Add internal kernel API `/api/sqlite/flushTransaction`[/+]🎨 Add internal kernel API `/api/sqlite/flushTransaction` #10005
/api/sqlite/flushTransaction
siyuan-community/siyuan-sdk#3🎨 Add internal kernel API `/api/sqlite/flushTransaction` #10005
Merge commit '928c1d476a4b398bdee3752cc950aed85838bf8f'