queryverse / queryverse/QuerySQLite.jl

error using the in operator

未关闭
#33 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Julia
星标
4
派生
2
平均合并
2 天 3 小时
30 天内合并 PR
1

描述

I was trying to do a filter for a value in an array. Here's an example using the Chinook db:

using Query, QuerySQLite
database = Database(joinpath(pathof(QuerySQLite) |> dirname |> dirname, "test", "Chinook_Sqlite.sqlite"))
database.Track |> @filter(_.AlbumId in [1,5,9])

which returns the error:

SQLite.SQLiteException("no such table: 1, 5, 9")

and piping to get_sql has [ ] around the array, where SQL needs parens ( ).

If we run:

using SQLite, DataFrames
result = DBInterface.execute(db,"SELECT * FROM (Track) WHERE AlbumId IN (1, 5, 9)") |> DataFrame

we get the expected results.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

复现 issue 中的 Chinook 示例,并检查 get_sql 为与 in 运算符一起使用的数组生成的 SQL。将其与可正常工作的 DBInterface 查询进行比较;当过滤器输出带括号的有效 SQLite IN 语法并返回预期行时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
julia, sqlite
领域
databases
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。