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

要存入或要查询的字符串中包含 ' 符号会报错 unrecognized token,这个要怎么解决 #77

Closed
Matcha-xiaobin opened this issue Jan 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Matcha-xiaobin
Copy link

比如我要写入的一个字符串到指定字段,或者说更新某一个字段的内容,内容如下:

希望的力量~字符串'23~

似乎是因为字符串中包含英文的单引号,上面的内容中只有一个单引号。

写入方式通过直接传递实体类的方式:

        database {
            InfoPageDataTable { table ->
                table INSERT infoData
            }
        }

会报错,其它写入方式我未尝试,因为不会。

不仅写入会报错,查询时,上述内容也会报错。

SQL这方面我不太熟,还请大佬指点一下。

@qiaoyuang qiaoyuang added the bug Something isn't working label Jan 24, 2024
@qiaoyuang
Copy link
Collaborator

是个 bug,后面我来修复

@qiaoyuang
Copy link
Collaborator

该问题已经在 #82 中修复,之后所有的字符串参数都采用数组的形式传递给 sqllin-driver, 最终由 SQLite 本身将参数绑定至 SQL 语句,兼容了特殊字符情况,1.3.0 发布后即可获得修复后的版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants