[Sputnik-list] LuaSQL Versium Plugin
Yuri Takhteyev
yuri at sims.berkeley.edu
Tue Mar 4 02:22:41 GMT+2 2008
(Whoops, sent from the wrong address, so it will bounce. Resending.)
Nice! I got it running with Xavante myself and wrote up step-by-step
instructions at http://sputnik.freewisdom.org/en/SQL_Storage in case
someone else wants to try.
The somewhat unfortunate thing is that there is no rock for luasql, so
you have to use the Kepler installer and set --with-optional=luasql.
I'll beg for a rock on the Kepler list.
Will this is licensed under MIT/X?
A comment on the code:
function LuaSQLVersiumStorage:get_node_history(id, prefix)
...
-- TODO: This doesn't return the raw representation at the moment
return history
end
I take responsibility for failing to provide a clear spec and sending
you and Sérgio to reverse engineer simple.lua... get_node_history()
does not _need_ to return the raw representation (which would be
implementation specific anyway and of no use to versium).
get_node_history() in simple.lua returns raw_representation as a
second parameter only so that it this function could be re-used when
saving the node. In retrospect, that probably wasn't a good idea,
from the readability point of view. I'll change it to two functions:
get_node_history() which would return just the history and local
_get_node_history_with_raw_representation().
> In theory this _should_ work with any of the LuaSQL drivers as long as
> you specify the right driver and connection parameters. Simply
> install the correct rock from the CVS repository, and go go go! I've
> noticed quite a speed increase using even the unoptimized MySQL.
Which CVS repository? They have a LuaSQL rock in CVS but not in the
luarocks repository?
- yuri
--
http://sputnik.freewisdom.org/
More information about the Sputnik-list
mailing list