You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 2 pieces of code, the one like the example of the README.md and the other the code that is on #113 . I have these questions:
How do I define the tables in order to make them compatible with the sqlite_tbl? Initially I thought that when I connect the DB and define the tables these tables would be created (like an ORM) but it seems like doesn't work like that. So, when I declare a "luatable" type in a column what type should I declare in the SQL definition? text, varchar or something else?
sqlite {} creates a logical object, which by the way is now changed because of reasons mentioned in this commit 8e47074.
sqlite {} is an abstraction over sqlite.new which only create sqlite object without opening the connection, unlike sqlite:open, however, opts.keep_open should ensure that it keeps connection open
How do I define the tables in order to make them compatible with the sqlite_tbl? Initially I thought that when I connect the DB and define the tables these tables would be created (like an ORM) but it seems like doesn't work like that.
You can call sqlite.tbl() to create new table object and later pass it to sqlite {} or sqlite:extend {}, and what sqlite.tbl expect is the table shape compatible to create sqlite_tbl object
So, when I declare a "luatable" type in a column what type should I declare in the SQL definition? text, varchar or something else?
I don't understand what you meant here
Repository owner locked and limited conversation to collaborators on Sep 28, 2021
Activity
kkharji commentedon Sep 21, 2021
Okay there are few points to take here.
sqlite {}creates a logical object, which by the way is now changed because of reasons mentioned in this commit 8e47074.sqlite {}is an abstraction oversqlite.newwhich only create sqlite object without opening the connection, unlikesqlite:open, however, opts.keep_open should ensure that it keeps connection openYou can call
sqlite.tbl()to create new table object and later pass it tosqlite {}orsqlite:extend {}, and whatsqlite.tblexpect is the table shape compatible to create sqlite_tbl objectI don't understand what you meant here