Skip to content

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

@Matcha-xiaobin

Description

@Matcha-xiaobin

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

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

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

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

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

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

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions