Closed vomus closed 7 months ago
Your first example, 'assert' is normally a built in Lua function. Try:
DBI = require "DBI" assert(DBI)
The code you are see calling assert.is_not_nil is likely part of the test suite, which overrides assert with the luassert library to simplify test cases. If you are new to Lua and/or LuaDBI I recommend staying with the builtin assert() function.
Second example, you are missing either single or double quotes, try:
name_to_module['MySQL']
Also make sure your database driver modules are installed as well (dbd.mysql, etc. The exact package name varies with your distribution.)
Thanks, it seems to work now...
Hi! I am somewhat new to Lua but I need to run a few scripts from inside a luatex. I have a luadbi installed from a package for my distribution but does not seem to be able to run it even following test example:
I went to look at the code and tried the following:
How come this does not work if it is taken from DBI.lua? Is there anything I am doing incorrectly?