On 25 Oct 2015, at 10:05am, Lev <leventelist at gmail.com> wrote:

> Untill now my architecture does all the SQLite work in C, and pass simple
> variables on Lua's stack.
> 
> Today morning I've got an idea to push only the database connection object.
> The database is opened in the C code, however I only have a single thread, so
> no other entity is accessing the database at the same time.

Can you use LuaSQLite3 or Lua-Sqlite3 to open a connection initially ?

<http://lua.sqlite.org/index.cgi/index>
<http://www.mroth.net/lua-sqlite3/>

> Other solution would be to pass the filename of the database, but then I have
> to close the connection. Must I?

You can have a C connection and a Lua connection at the same time, as long as 
you don't need to perform operations in both at the same time.

Simon.

Reply via email to