Squill

A subset of SQL. No complex installation required.

Work in Progress API / Library

Download (82 KB)

How do I install this?

Squill is a mod library that implements a subset of SQL for Luanti (formerly known as Minetest).

Squill lets mod developers take advantage of SQL without having to worry about making mods harder to install for regular players: On large servers that need the performance of a real SQL engine, server admins can set up your mod to use a proper SQL database (or configure Squill's built-in SQLite wrapper, if your mod indicates that it supports it). And on smaller servers and singleplayer worlds, server owners and players can just install Squill, and your mod can use Squill's pure Lua SQL implementation, albeit with less scalability.

Squill has compatibility layers a few common Lua SQL libraries to make it easier to port mods that already use a SQL database.

Goals 🔗

  • No additional installation steps (mod security, external libraries, etc)
  • Reasonable performance for small-ish databases
  • The ability to use both Squill (for singleplayer and smaller servers) and SQLite (for large servers which go out of their way to set it up) without too much special code.
  • No hard limit on the amount of data stored (unlike core.serialize()), although storing a lot of data will be slow.
  • Faster startup time than running core.parse_json() on a giant file.

Non-goals 🔗

  • Implement every SQL feature
  • Scalability - if you have very large tables, expect high memory usage and low performance.

Documentation 🔗

See the README for the rest of the documentation.

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.