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

Kernel API /api/query/sql support UNION statement #8226

Closed
frostime opened this issue May 10, 2023 · 0 comments
Closed

Kernel API /api/query/sql support UNION statement #8226

frostime opened this issue May 10, 2023 · 0 comments
Assignees
Milestone

Comments

@frostime
Copy link
Contributor

frostime commented May 10, 2023

[v2.8.7] 思源更新后,SQL API 进行查询出现了问题

Describe the problem

我常用模板加 Query 来查询每天在日记里面记录的东西,但是在更新了思源到 2.8.7 版本后,突然无法查询了。

使用的语句如下:

select * from blocks where `subtype` = 'h2' and `hpath` like '%daily note/%/2023-05-10'
UNION
select * from blocks where `type` = 'd' and `hpath` like '%daily note/%/2023-05-10/%'

我特地下载了 2.8.6 版本作为对比,确认是 SQL API 接口的问题:

2.8.6 版本的表现

image

image

2.8.7 版本的表现

image

image

可以看到 data 为 None

附注

比较奇怪的是:其他的 sql 语句都没有问题,就是这一句出问题了。

而且我把这个出问题的 SQL 语句放在嵌入块里执行,反而又没什么问题。

Screenshot or screen recording presentation

No response

Version environment

- Version: 2.8.7
- Operating System: win10
- Browser (if used): No

Log file

日志文件里没有看到相关的记录

image

More information

No response

@88250 88250 changed the title [v2.8.7] 思源更新后,SQL API 进行查询出现了问题 API /api/query/sql support UNION statmant May 10, 2023
@88250 88250 self-assigned this May 10, 2023
@88250 88250 added this to the 2.8.8 milestone May 10, 2023
@88250 88250 changed the title API /api/query/sql support UNION statmant API /api/query/sql support UNION statement May 10, 2023
@88250 88250 closed this as completed May 10, 2023
@88250 88250 changed the title API /api/query/sql support UNION statement Kernel API /api/query/sql support UNION statement May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants