Prepared Statements
Full immunity against SQL injection with cached query execution plans in MariaDB.
coe_databaseHigh-Velocity MariaDB Node 26 ACID Persistence
Asynchronous Connection Pooling on Node.js 24 LTS / Node 26 (libnode26) without Blocking Lua Threads
coe_supervisorcoe_logging
coe_database
4 exports · 0 commands
Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.
The persistence foundation of the COE Framework runs on Node.js 24 LTS / Node 26 (libnode26) with optimized connection pooling, native prepared statements, and ACID transaction support. Unlike legacy solutions that stall under load, coe_database guarantees sub-millisecond query execution even with hundreds of concurrent requests.
Executes in a 64-bit multi-threaded environment, leveraging Node.js 24 LTS / Node 26 (libnode26) to isolate database operations from the game tick and rendering pipelines.
Full immunity against SQL injection with cached query execution plans in MariaDB.
Support for BEGIN/COMMIT/ROLLBACK with automatic rollbacks upon unexpected exceptions.
Automatically provisions and migrates table schemas on boot without manual SQL imports.
Non-blocking asynchronous promises keep player physics and events totally fluid.
Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:
Operates strictly within layers L1–L3 (domain, HAL, and server-authoritative application logic). Visual interactions and management flows are delegated to centralized ecosystem apps (coe_ui / coe_tablet), guaranteeing 0.00 ms idle client overhead in FiveM DX12.
Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:
exports.coe_database:Transaction(statements, callback)
exports.coe_database:Execute(sql, parameters, callback)
CoeMigrations.Run()
Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.
exports['coe_database']:Query(sql, parameters, callback)
→ void
Executes a parameterized SELECT query (using positional `?` placeholders).
| Parameter | Type |
|---|---|
sql | string |
parameters | any[] |
callback | CoeDatabaseCallback |
exports['coe_database']:Query(sql, parameters, callback)exports['coe_database']:Execute(sql, parameters, callback)
→ void
Executes a parameterized INSERT, UPDATE, DELETE, or DDL statement.
| Parameter | Type |
|---|---|
sql | string |
parameters | any[] |
callback | CoeDatabaseCallback |
exports['coe_database']:Execute(sql, parameters, callback)exports['coe_database']:Transaction(statements, callback)
→ void
Executes multiple statements within an atomic database transaction (all-or-nothing rollback).
| Parameter | Type |
|---|---|
statements | { |
callback | CoeDatabaseCallback |
exports['coe_database']:Transaction(statements, callback)exports['coe_database']:IsReady()
→ boolean
Verifies if the database connection pool is active and ready for operations.
No parameters.
local result = exports['coe_database']:IsReady()This module registers no commands: it is driven by exports and events.