-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lightningmdb serpent #4
Comments
Hi! Far out. I assumed all this stuff was going to /dev/null. (tee hee.) First, this is only tested against 5.3 so no guarantees, but happy to take a look. Second, I've been away from this for a couple of months now so I'll need a little bit to pick it up again. And third, It's all still very alpha level. I'll get my head into it tonight and hopefully have something soon. 👍 |
So I had marked the lightningmdb library to only run on 5.2 or greater. I have no idea why, as the readme on https://github.com/shmul/lightningmdb indicates it runs on 5.1 as well. I pushed that fix (2351b89), but you're not out of the woods yet. I rely heavily on meta-tables for the change tracking and I fear I'm not very good at them. If you run db-test.lua in 5.3 it returns the correct results. If you run it in 5.1, the code seems to commit everything to the database, but the output seem to be meta-table functions: russellh@g1 ~/G/lua-persist> lua53 test/db-test.lua
Words db init table count 3
readonly disabled
boys names: 7.0
readonly disabled
Christopher 1
William 1
Richard 1
Joeseph 1
Stephen 1
Adam 1
Russell 1
readonly disabled
Christopher 1
William 1
Richard 1
Joeseph 1
Stephen 1
Adam 1
Russell 1
count two 3
Numbers Database Count 2
{
__databases = true,
["insurance-policies"] = true
} --[[table: 0x80169e140]]
russellh@g1 ~/G/lua-persist> lua51 test/db-test.lua
Words db init table count 3
readonly disabled
boys names: 7
readonly disabled
commit function: 0x8018df970
status function: 0x8018df9d0
readonly disabled
commit function: 0x8018dfdc0
status function: 0x8018dfe20
count two 3
Numbers Database Count 2
{
__databases = true,
["insurance-policies"] = true
} --[[table: 0x8018bfe80]]
To create a 'changetracker' table, I set the actual table to read only and return a proxy table. See database.lua starting at line 407. Note the proxy table has functions named commit and status (lines 517 and 519). I'm not sure what to do about that as I don't play in 5.1. Thoughts? |
I just saw this update. I will look into this tomorrow. I appreciate your responses. I'm not much of a Lua person but I will try to play and see the differences. |
Hello,
I'm trying to familiarize with your software (found it via an openldap email of yours) but I hit a wall. Any pointers?
I've done:
Cloned, compiled and installed LMDB libraries https://github.com/LMDB/lmdb.git
Installed luarocks as mentioned in the README (lfs = luafilesystem, I assume?)
and run your tests:
My version of Lua is
Any help is appreciated.
The text was updated successfully, but these errors were encountered: