lunarmodules / luasql

LuaSQL is a simple interface from Lua to a DBMS.
http://lunarmodules.github.io/luasql
535 stars 192 forks source link

SQL persistance #143

Open wcklr opened 1 year ago

wcklr commented 1 year ago

A short post from SQL persistance.lua

local sqlite3 = require("lsqlite3")

local db = sqlite3.open(app.dir() .. "/foo.db")

db:exec[[ CREATE TABLE test (id INTEGER PRIMARY KEY AUTOINCREMENT, content); ]]

print(db:errmsg())

db:exec[[ INSERT INTO test (content) VALUES ('corrupt#8513'); ]]

print(db:errmsg())

for row in db:nrows("SELECT * FROM test") do print(row.id, row.content) end

db:close()

a screenshot

Screenshot_20220720-224336-1.jpg

tomasguisasola commented 1 year ago

Hi

I didn't understand what you mean with this issue. What is the problem?