Skip to content

:insert{table, table} doesn't work as expected. #12

@kkharji

Description

@kkharji

Reproduce:

local table1 = { ... }
local table2 = { ... }
local db = sql.open(path)
db:insert{ table1, table2 }
assert.are.same("table", type(db:eval("select * from table1")))

After doing the insertation indvidiually, It errored out that one of the table
had undefined field in the sqlite table schema. However, after fixing that and
trying to re-run insert{}, same issue.

Expected

  • It errors out as it would with indvidiual insertation.
  • It insert multiple row in multiple tables successfully.

Suggestions

  • Check if all table fields are vaild fields based on the table schema.

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