Skip to main content

Godot DataWizard SQLite Toolkit

Godot Toolkit

Godot DataWizard SQLite Toolkit

Ship persistent progression, inventories, and analytics without leaving Godot. DataWizard bundles SQLite with a schema-aware C++ extension, async helpers, and ergonomics tailored for game teams.

DataWiz workflow overview
SQLite 3bundled & tuned
Asyncwriter thread + reader pool
3core building blocks

Production-ready persistence

DataWiz leans on WAL mode, pragma tuning, and pooled connections so your save system keeps pace with gameplay. The GDExtension ships with binaries for Godot 4.4 (Jolt) and safe fallbacks for editor previews.

Schema automation

Describe your data once with DWRecord or DWAutoLoad resources. DataWiz generates tables, unique keys, and indices on demand, keeping the database synchronized with your exported properties.

Typed Godot ergonomics

Hydrate complex dictionaries, arrays, and GUIDs without custom serializers. Helpers in DWTypes keep your resource fields strongly typed while persisting through SQLite.

Quick start

Drop the GDExtension into res://addons/datawiz/, Activate the plugin, then define your records. These four steps get you from install to querying live data.

1. Boot the service

Register the singleton and open your database with a reader pool sized for your project.

@onready var data_wiz: DWService = get_node("/root/DataWiz")

func _ready() -> void:
if data_wiz.open("user://SaveSlot1/data.dw", reader_pool_size = 6):
await data_wiz.connected
data_wiz.log_tuning_snapshot()
else:
push_error(data_wiz.get_last_error())

2. Model your data

Use DWRecord resources to declare columns, primary keys, and unique constraints.

@tool
class_name InventoryRecord
extends DWRecord

#DataWiz Fields
#***************************************************************
static var table_name: String = "Enemies"
static var table_type: DWTypes.TableType = DWTypes.TableType.DATASTORE
static var unique_fields: PackedStringArray = ["id"]
static var index_fields: PackedStringArray = []
#Conditional field to automatically delete from table when Runtime stops.
static var on_exit_cleanup: String = ""
#***************************************************************

@export var slot: int
@export var item_id: String
@export var quantity: int = 1

3. Load records with select()

Pull rows into a typed Array[T] of live resource instances—no manual hydration needed.

# Load all data from db (typed arrays if your classes exist)
var npcs: Array[NPC] = DataWiz.select(NPC.new(), "is_alive = 1")
var factions: Array[Faction] = DataWiz.select(Faction.new())

for n in npcs:
print(n.name, " hp:", n.hp)

# With params:
# var guards: Array[NPC] = DataWiz.select(NPC.new(), "faction = ?", ["Guard"])

4. Persist and iterate

Save a record and fetch it back—write SQL only when you need full control.

var record := InventoryRecord.new()
record.slot = 1
record.item_id = "healing_potion"
record.save_to_db()

var inventory := DataWiz.select(record, "ORDER BY slot ASC")
for entry in inventory:
print(entry.slot, entry.item_id)

Explore the building blocks

Dive into focused component pages for the service singleton, schema resources, Autoload helpers, and utility functions. Each page highlights common usage patterns and the most important APIs.

DWService Singleton

Threaded SQLite orchestrator for Godot 4.4 (Jolt)

Runtime Servicestable

Owns the SQLite connection pool, write queue, and schema cache that power DataWiz persistence.

View reference

DWRecord Resource

Schema-aware Resource base class

Data Modelstable

Declarative table definitions that hydrate into strongly typed Godot Resources.

View reference

DWAutoLoad Node

Persisted singleton state with minimal boilerplate

Autoloadstable

Base node for global state that should round-trip through SQLite using the same schema metadata as DWRecord.

View reference