Squill

Description

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.

Releases

2025-04-26

Download

2025-04-26 02:14 UTC

2025-04-26 🔗

  • Fix crash
  • Add DEFAULT columns

2025-04-20

Download

2025-04-20 02:17 UTC

2025-04-20 🔗

  • Add ability to SELECT FROM another SELECT
  • Allow nested SELECTs inside nested SELECTs
  • Only call begin_stmt once
  • Pretty print nested functions properly
  • Remove unrequired or

2025-04-19

Download

2025-04-19 02:13 UTC

2025-04-19 🔗

  • Split code generation into a separate class
  • Don't allow reading columns in LIMIT
  • Add UNION
  • Make codegen.lua write function end
  • Fix union distinct
  • Fix name of get_col_ref argument
  • Refactor so that classes make logical sense
  • Remove old comment
  • Add GLOB
  • Make math functions work with null
  • Make ORDER BY work with UNION

2025-04-18

Download

2025-04-18 02:13 UTC

2025-04-18 🔗

  • Remove unused code

2025-04-17

Download

2025-04-17 02:13 UTC

2025-04-17 🔗

  • Allow LIMIT with bind parameters and add hack to compatibility layer
  • Make AUTOINCREMENT start at 1
  • Improve last_insert_rowid hack
  • Fix multiple conditions on one column somtimes being lost
  • Don't add strict keyword when dumping tables
  • Make USING work properly
  • Actually make USING work properly (hopefully)
All releases

Information

Provides

squill

Dependencies

Required
No required dependencies
Optional
flow mtt

Information

Type
Mod
Technical Name
squill
Languages
English
License
LGPL-2.1-or-later
Maintenance State
Work in Progress
Added
2025-04-01 00:28 UTC
Maintainers
Luke