Skip to content

Choose a tag to compare

@Malkverbena Malkverbena released this 25 Sep 02:19

MySQL module for Godot 4, rewritten from scratch on top of Boost.MySQL.

This version breaks compatibility with earlier versions. None of the old classes or methods carry over unchanged. Update your project against the API in documentation/usage.md before upgrading.

Use it on a headless Godot server or an internal tool, never in a game shipped to players. See "Intended use" in documentation/features.md.

Requirements

  • Godot 4.6 or later, built from source with the module (custom_modules=).
  • Boost boost-1.92.0 and OpenSSL openssl-4.0.2, built separately. See documentation/instructions.md.
  • A MySQL or MariaDB server.

What's included

  • Classes: MySQLConfig, MySQLSession, MySQLResult, MySQLTransaction, MySQLStreamingCursor, MySQLAsyncOperation, MySQLPool.
  • Three ways to run SQL: execute_text, execute_formatted (values escaped by Boost.MySQL) and execute_prepared (per-connection statement cache). Also execute_script (off by default) and multiple resultsets.
  • Asynchronous calls on a dedicated I/O thread per session, with MySQLAsyncOperation.cancel().
  • Streaming, synchronous (execute_streaming) and asynchronous (async_execute_streaming).
  • Transactions with automatic rollback, and a thread-safe connection pool.
  • TLS certificate validation on by default.
  • Explicit errors everywhere, no exceptions. A fatal error drops the connection instead of reusing it.
  • Limits: max_result_bytes, max_buffer_size, async_timeout_ms, cancel_timeout_ms, async_batch_rows.
  • Type mapping for every MySQL type, including DATE/TIME/DATETIME as Dictionary (also accepted as parameters) and three JSON modes.
  • An example project (examples/) and a benchmark project with measured results (benchmark/).

Testing status

  • Linux: integration test 206/206 against MySQL 8.4, unit tests 39/39, ASan+UBSan and TSan clean for the module.
  • Windows (MinGW-w64 cross-build, run under Wine) and Android (arm64, two devices): passed on earlier builds of this rewrite, not re-tested after the latest changes (asynchronous streaming, cancel(), fatal-error handling).
  • Export templates (template_debug/template_release): not re-tested after the latest changes.
  • macOS and a native MSVC build: not tested.
  • iOS is not supported for now.