Getting 'Could not load toolkit script: luasql.sqlite3' error when trying to setup DB connection
I'm trying to connect to a local sqlite database to locally store which collections my plugin is touching. All works well, when I run my code through the command line, but I received the following error when trying to run the plugin via Lightroom:
Could not load toolkit script: luasql.sqlite3.
I've seeded the database with data outside of the plugin. I'm currently working on just getting my plugin to connect to the database and output the simple select query. Next step will be to write to it.
Obviously luasql.sqlite3 can't be found via Lightroom, but I'm not sure how to best address the issue. Here is my code that works via command line. Any assistance would be appreciated.
luasql = require "luasql.sqlite3"
env = luasql.sqlite3()
db = env:connect('testing.db')
cursor = assert(db:execute('Select * from CollectionTable'))
row = {}
while cursor:fetch(row) do
print(table.concat(row, '|'))
end
cursor:close()
db:close()
env:close()
