Skip to content
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

内容块动态查询嵌入 #48

Closed
Vanessa219 opened this issue Sep 26, 2020 · 0 comments
Closed

内容块动态查询嵌入 #48

Vanessa219 opened this issue Sep 26, 2020 · 0 comments
Assignees
Labels
Milestone

Comments

@Vanessa219
Copy link
Member

Vanessa219 commented Sep 26, 2020

需求

卡片编写和完善的时候,需要对同类块进行收集、整理。建议加入宏命令,支持模糊或者精确查询并显示所有符合条件的块,把它们内容依次显示出来,比如

list (("学习经验"))

在页面中显示所有标题为 “学习经验”的块内容

list(("*学习经验"))
在页面中显示所有结束标题为 “学习经验”的块内容

这样对卡片整理、知识汇总非常方便了。

实现

  • 引入查询块!{{ SQL }} ,查询块是叶子块
  • 使用 SQL 子集做 DSL

示例:

查询并嵌入所有内容中包含“待办”文本的块:

!{{ SELECT * FROM blocks WHERE content LIKE '%待办%' }}

渲染:

!((id1))

!((id2))
@88250 88250 changed the title 内容块批量嵌入 内容块批量嵌入(函数库) Sep 27, 2020
@88250 88250 added the Feature label Sep 27, 2020
@88250 88250 self-assigned this Oct 20, 2020
@88250 88250 pinned this issue Oct 20, 2020
@88250 88250 changed the title 内容块批量嵌入(函数库) 内容块查询语言 Oct 22, 2020
@88250 88250 unpinned this issue Oct 23, 2020
@88250 88250 pinned this issue Oct 23, 2020
@88250 88250 changed the title 内容块查询语言 内容块东塔查询嵌入 Oct 26, 2020
@88250 88250 changed the title 内容块东塔查询嵌入 内容块动态查询嵌入 Oct 26, 2020
@88250 88250 unpinned this issue Oct 27, 2020
@88250 88250 pinned this issue Oct 27, 2020
@88250 88250 added this to the 0.4.7 milestone Nov 11, 2020
88250 added a commit to siyuan-note/user-guide-en_US that referenced this issue Nov 16, 2020
88250 added a commit to siyuan-note/user-guide-zh_CN that referenced this issue Nov 16, 2020
@88250 88250 unpinned this issue Nov 16, 2020
88250 added a commit to siyuan-note/user-guide-en_US that referenced this issue Nov 17, 2020
88250 added a commit to siyuan-note/user-guide-zh_CN that referenced this issue Nov 17, 2020
88250 added a commit to siyuan-note/appearance that referenced this issue Nov 17, 2020
88250 added a commit to siyuan-note/user-guide-en_US that referenced this issue Nov 17, 2020
88250 added a commit to siyuan-note/user-guide-zh_CN that referenced this issue Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants