-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api sql调用思源如何保持内容结构和高效 #12260
Comments
可以试试这个接口 /api/block/getBlockTreeInfos #11311 |
感谢, api文档里面没这个接口.可是我发现这个没getChildBlocks 好用,getChildBlocks能直接获取到一个块下面的所有子块..目前的问题就是 还需要通过api遍历所有子块,内容一多效率就很老火.
|
我大概明白了,我们改进一下 getChildBlocks #8249 吧,加入返回 content 和 markdown 字段。 |
这个改动就不拉进版本了。 |
嗯嗯,👍👍👍 |
稍后会发布一个 dev 版,请帮忙测试。 |
|
Ok
…---原始邮件---
发件人: ***@***.***>
发送时间: 2024年8月17日(周六) 下午5:37
收件人: ***@***.***>;
抄送: ***@***.***>;"State ***@***.***>;
主题: Re: [siyuan-note/siyuan] api sql调用思源如何保持内容结构和高效 (Issue #12260)
稍后会发布一个 dev 版,请帮忙测试。
测试了下,没什么问题,顺序都是对得上的
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Is there an existing issue for this?
Can the issue be reproduced with the default theme (daylight/midnight)?
Could the issue be due to extensions?
Describe the problem
目前需要将思源中的特定标签内容通过api导入到知识库系统,但是只能 先获取到标题,然后再通过标题递归出所有的子块,包括多层级的块,再用 getChildBlocks 获取到顺序id,最后再根据获取到的id进行对sql获取的内容排序.
Expected result
这样的效率太低了,每次取一条信息,要递归sql查询很多次,而且容易出错..有没有高效一点的方法,就指定某个id就可以直接取出这个id下面所有层级的内容. 同时内容顺序结构保持不变.其实就是类似 getChildBlocks ,不光是取出id,还有content,markdown.
Screenshot or screen recording presentation
No response
Version environment
Log file
1
More information
No response
The text was updated successfully, but these errors were encountered: