Skip to content
unreal · database

Embedded SQLite forKBVESQLite

An embedded SQLite database plugin for Unreal Engine — a vendored sqlite3 amalgamation plus a thin RAII wrapper so consumers never touch raw sqlite3_* calls.

One sqlite provider

Never link the engine's SQLiteCore in the same module — duplicate sqlite3_* symbols crash the build and run. KBVESQLite is the single sqlite provider for KBVE code.

  • Not a Mass hot-loop datasource — a persistence boundary only.
  • WAL — many readers + one writer across separate connections.
3.51.3SQLite
UE 5.4Min engine
Win · Linux · MacPlatforms
KBVELicense

What it gives you

Access seam

FKBVESQLiteConnection

RAII connection: Open(path, bUseWAL) / Close / Exec / Prepare / Begin / Commit / Rollback.

FKBVESQLiteStatement

RAII prepared statement: Bind*, Step / Execute / Reset, Column* accessors.

FKBVESettingsStore

Scoped key/value prefs on a connection (kv_settings(scope, key, value), UPSERT) — typed Set/Get String, Int, Float, Bool plus RemoveKey and LoadScope. Agnostic settings persistence; UI is KBVEUI's job.

Integration

Rules & consumers

Add KBVESQLite to your module’s PrivateDependencyModuleNames and dependency_plugins: packages/unreal/KBVESQLite to your ci-registry entry so the CI plugin build stages it.

  • Single sqlite provider — never link the engine’s SQLiteCore in the same module; duplicate sqlite3_* symbols crash the build/run.
  • Persistence boundary, not a Mass hot-loop datasource — one connection is not thread-safe; WAL gives many readers + one writer across separate connections. Load at boundaries, keep the working set in memory/Mass fragments, flush async.

Consumers: FKBVEWorldChunkCache (KBVEWorld), FKBVEInventoryStore + FKBVEItemCatalogStore (KBVEItemDB), FKBVESettingsStore (chuck UchuckSettings window geometry, Saved/KBVE/settings.db).

Questions

Frequently asked

What is the KBVESQLite plugin?

KBVESQLite wraps SQLite as an embedded database plugin for Unreal Engine, bundling a vendored sqlite3 amalgamation with a thin RAII wrapper so consumers never touch raw sqlite3 calls. It exposes FKBVESQLiteConnection, FKBVESQLiteStatement, and a scoped key/value FKBVESettingsStore.

Why must KBVESQLite be the single SQLite provider?

Consumers must never also link the engine's SQLiteCore in the same module, because duplicate sqlite3 symbols crash the build and run. KBVESQLite is the one sqlite provider for KBVE code.

How should KBVESQLite be used in a Mass game loop?

It is a persistence boundary, not a Mass hot-loop datasource. A single connection is not thread-safe; WAL allows many readers and one writer across separate connections, so you load at boundaries, keep the working set in memory or Mass fragments, and flush asynchronously.