-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Kernel API /api/query/sql
support ||
operator
#9662
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
Comments
一个更简单的示例: SELECT * from blocks where created like "20231115" || "%" 似乎是字符串连接出错了 |
一个更简单的示例: SELECT memo from blocks where memo like "2023111" || "5" 这必然会查到无意义的结果,而无需你真的在 memo 填写 20231115 |
/api/query/sql
parsing
/api/query/sql
parsing/api/query/sql
support ||
operator
88250
added a commit
that referenced
this issue
Nov 15, 2023
88250
added a commit
that referenced
this issue
Nov 15, 2023
能用的,只是不带 LIMIT 的话性能会比原来差(原来是预加 LIMIT,现在是查询后结果集中 LIMIT)。 |
似乎 limit 语句不能单独换行,否则对查询结果有影响。 @88250 |
给我一下 SQL 我测试看看,谢谢。
…---Original---
From: ***@***.***>
Date: Fri, Nov 17, 2023 18:52 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [siyuan-note/siyuan] Kernel API `/api/query/sql` support `||`operator (Issue #9662)
似乎 limit 语句不能单独换行,否则对查询结果有影响。 @88250
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
SELECT
(select count(1) from refs as r where r.def_block_id = b.id ) as 被引数,
(select count(1) from refs as r where r.root_id = b.id ) as 正引数
FROM blocks as b
WHERE type = 'd'
limit 228;
…------------------ 原始邮件 ------------------
发件人: "siyuan-note/siyuan" ***@***.***>;
发送时间: 2023年11月17日(星期五) 晚上6:59
***@***.***>;
***@***.******@***.***>;
主题: Re: [siyuan-note/siyuan] Kernel API `/api/query/sql` support `||` operator (Issue #9662)
给我一下 SQL 我测试看看,谢谢。
---Original---
From: ***@***.***>
Date: Fri, Nov 17, 2023 18:52 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [siyuan-note/siyuan] Kernel API `/api/query/sql` support `||`operator (Issue #9662)
似乎 limit 语句不能单独换行,否则对查询结果有影响。 @88250
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
88250
added a commit
that referenced
this issue
Nov 17, 2023
88250
added a commit
that referenced
this issue
Nov 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kernal API SQL 未能查询到预期的结果
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
给定下述 SQL 查询
在 Navicat 中连接思源 db,直接结果是正常的:搜索今天所有创建的文档

但是在思源中基于后端 API 查询的时候,就无法查询成功
Query 挂件也是查不到任何东西

Expected result
和 Navicat 中的查询保持一致。
Screenshot or screen recording presentation
No response
Version environment
Log file
日志中没有什么有用的信息。
More information
No response
The text was updated successfully, but these errors were encountered: