Skip to content
← All projects

// Personal ·

Luna Database

The shared MySQL connection layer every Luna module attaches to, providing a parameterized query builder, connection pooling, and transaction support.

  • Lua
  • GMod
  • MySQL

A small, foundational module wrapping mysqloo behind an OOP Database class: identifier whitelisting and bound parameters rule out raw string interpolation, while a query queue caps concurrent and pending queries so a slow database can’t grow memory unbounded. Other modules declare “database” as a dependency and get automatically wired to a named connection instance once every module has loaded, and a live Lua reload of this file re-points every dependent module to the new connection instead of leaving them on a dead one.