lxp vs sqlite for structured, but fast database-like format?
#2
If your structured data follows more or less the same structure for every object, then your best bet is definitely SQLite.
Lxp can only parse XML files, but it cannot write them, so you'd need to write a serializer, and of course the actual storage (files / DB) for the data.
Therefore I'd strongly recommend using SQLite, since it's easier Smile

Should you need an example, have a look at the Gallery plugin. It defines a Lua class that handles the SQLite-related tasks, hiding all the SQL details inside.
https://github.com/mc-server/Gallery/blo...SQLite.lua
The GalExport plugin goes even a bit further and shares the same database with the Gallery plugin, altering it for its own data. The approach is the same - create a class that hides the SQL ugliness behind nice function calls:
https://github.com/madmaxoft/GalExport/b...SQLite.lua
Reply
Thanks given by:


Messages In This Thread
RE: lxp vs sqlite for structured, but fast database-like format? - by xoft - 04-16-2015, 05:46 PM



Users browsing this thread: 1 Guest(s)