Zuoqiu-Yingyi / widget-query

一个将思源笔记数据库查询结果以表格样式渲染的挂件 | A widget that renders the query results of the Siyuan Notes database in tabular style.
GNU Affero General Public License v3.0
53 stars 7 forks source link

您好有办法子文档搜索的结果保持在文档树中的顺序吗? #31

Closed UFDXD closed 1 year ago

UFDXD commented 2 years ago

我使用这一段代码

SELECT
    '[' || b.content || '](siyuan://blocks/' || b.id || ')' AS __1____pre__文档标题,
    b.updated AS __2____datetime__更新时间,
    b.created AS __3____date__创建日期
FROM
    blocks AS b
WHERE
    b.type = 'd'
    AND b.path LIKE '%/.block{.root_id}/______________-_______.sy'
ORDER BY
    b.updated DESC
Zuoqiu-Yingyi commented 2 years ago

抱歉, 文档树中的排序未入库, 因此无法在数据库中查询并排序~