Artifact 0c08de88e066ef2d6cf59c4be3d7ce2aa7df32c9:
- File examples/simple.lua — part of check-in [2ad6aad5b6] at 2013-03-30 23:33:11 on branch trunk — Add update_hook example; fix examples for Lua 5.2. (user: e size: 366)
local sqlite3 = require("lsqlite3") local db = sqlite3.open_memory() db:exec[[ CREATE TABLE test (id INTEGER PRIMARY KEY, content); INSERT INTO test VALUES (NULL, 'Hello World'); INSERT INTO test VALUES (NULL, 'Hello Lua'); INSERT INTO test VALUES (NULL, 'Hello Sqlite3') ]] for row in db:nrows("SELECT * FROM test") do print(row.id, row.content) end