Skip to content

SQL string escaping error #182

@LintaoAmons

Description

@LintaoAmons

when insert a text column with content like a()(regex: \w\(\)) will cause error

local has_sqlite, sqlite = pcall(require, "sqlite")
local tbl = require("sqlite.tbl")

local nodes_tbl = tbl("testaaa", {
	id = true,
	content = "text",
})

DB = sqlite({
	uri = "<PREFIX>/test.db",
	nodes = nodes_tbl,
})

nodes_tbl:insert({
	id = 1,
	content = "a()",
})

-- when insert a text column with content like `a()`(regex: `\w\(\)`) will cause error

LintaoAmons/bookmarks.nvim#69

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions