LJIT2SQLite
LJIT2SQLite copied to clipboard
Whats line 19 in `sqlite3_ffi.lua` for?
local codes = require("sqlite-ffi.codes");
I noticed it because it couldnt find the file. However, noticed the variable isnt actually used, and it loads, at least if i remove it.
it refers to codes.lua, the require path is just wrong (did I do that? I don't remember)
it'd be able to find it if you had named the module sqlite-ffi, otherwise you need to add a little magic for require paths within the module to work right:
-- if it's init.lua use this
local current_folder = (...):gsub('%.init$', '') .. "."
-- if it's anything else use this
local current_folder = (...):gsub('%.[^%.]+$', '') .. "."
local codes = require(current_folder .. "codes")
Took the (just the)ffi here, but it is not entirely recognizable anymore.. Obeys "my rules" regarding classes now. (one class per file, just set Class.__index =Class
, have a Class:new()
→ instance
and instance:init()
.. i may make it more specific yet..) It also has two options, one that works with lua5.3 too.