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

SQL persistance #143

Open
wcklr opened this issue Jul 21, 2022 · 1 comment
Open

SQL persistance #143

wcklr opened this issue Jul 21, 2022 · 1 comment

Comments

@wcklr
Copy link

wcklr commented Jul 21, 2022

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
Copy link
Contributor

Hi

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants