Skip to content

Latest commit

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

QuickDB

QuickDB is a lightweight key-value database designed for Minecraft Bedrock Script API.
It supports two storage backends:

  • Dynamic Properties
  • Scoreboard

Both storages share the same API, so you can switch storage types without changing your code.


How Caching Works

When a database is created, it loads all existing data into memory (RAM).

Example process:

  1. The database scans the storage (Scoreboard or Dynamic Property).
  2. All matching keys are loaded into an internal cache.
  3. Future operations read from this cache instead of scanning storage again.

Because of this:

  • get() is very fast
  • has() is very fast
  • keys(), values(), entries() do not need to scan storage again

When data changes:

  • set() updates storage + cache
  • delete() removes storage + cache

This keeps both storage and cache synchronized.


Storage Types

Storage TypeBackend UsedDescription
localDynamicDBStores data using dynamic properties
dynamicDynamicDBSame as local
globalScoreboardDBStores data using scoreboard
scoreboardScoreboardDBSame as global

Example:

constdb=newQuickDB("playerData");// default using local or dynamicconstglobalDB=newQuickDB("playerData","global");// global database, different cache with local or dynamic database, use this to sync database with other addons you wanna make like plugin structures

Methods

MethodDescriptionExample
set(key, value)Save or update a valuedb.set("coins", 100)
get(key)Get value from cachedb.get("coins")
has(key)Check if key existsdb.has("coins")
delete(key)Remove key from databasedb.delete("coins")
keys()Get all keysdb.keys()
values()Get all valuesdb.values()
entries()Get key-value pairsdb.entries()

Example Usage

constdb=newQuickDB("coins");db.set("player1",100);constcoins=db.get("player1");console.log(coins);

Summary

QuickDB works by:

  1. Loading data from storage
  2. Storing it in an internal cache
  3. Using the cache for fast access
  4. Keeping storage and cache synchronized

This makes database operations fast and efficient for Minecraft Script API projects.

About

Fast Peformance, Database Using DynamicProperty for Minecraft Bedrock ScriptAPI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages