Class: GameDatabase
Defined in: packages/core/src/saves/db.ts:17
Dexie database class for managing game saves and settings. Uses IndexedDB for browser-based persistent storage.
Extends
Dexie
Constructors
Constructor
new GameDatabase(
gameId):GameDatabase
Defined in: packages/core/src/saves/db.ts:27
Creates a new GameDatabase instance
Parameters
gameId
string
Unique identifier for the game, used as database name prefix
Returns
GameDatabase
Overrides
Dexie.constructor
Properties
_allTables
readonly_allTables:object
Defined in: node_modules/dexie/dist/dexie.d.ts:845
Index Signature
[name: string]: Table<any, IndexableType, any>
Inherited from
Dexie._allTables
_createTransaction()
_createTransaction: (
this,mode,storeNames,dbschema,parentTransaction?) =>Transaction
Defined in: node_modules/dexie/dist/dexie.d.ts:850
Parameters
this
Dexie
mode
IDBTransactionMode
storeNames
ArrayLike<string>
dbschema
DbSchema
parentTransaction?
Transaction | null
Returns
Transaction
Inherited from
Dexie._createTransaction
_dbSchema
_dbSchema:
DbSchema
Defined in: node_modules/dexie/dist/dexie.d.ts:852
Inherited from
Dexie._dbSchema
_novip
readonly_novip:Dexie
Defined in: node_modules/dexie/dist/dexie.d.ts:851
Inherited from
Dexie._novip
_options
readonly_options:DexieOptions
Defined in: node_modules/dexie/dist/dexie.d.ts:848
Inherited from
Dexie._options
Collection
Collection:
object
Defined in: node_modules/dexie/dist/dexie.d.ts:898
prototype
prototype:
Collection
Inherited from
Dexie.Collection
core
readonlycore:DBCore
Defined in: node_modules/dexie/dist/dexie.d.ts:849
Inherited from
Dexie.core
name
readonlyname:string
Defined in: node_modules/dexie/dist/dexie.d.ts:841
Inherited from
Dexie.name
on
on:
DbEvents
Defined in: node_modules/dexie/dist/dexie.d.ts:854
Inherited from
Dexie.on
once
once:
DbEventFns
Defined in: node_modules/dexie/dist/dexie.d.ts:855
Inherited from
Dexie.once
saves
saves:
EntityTable<GameSave,"id">
Defined in: packages/core/src/saves/db.ts:19
Table for storing game saves
settings
settings:
EntityTable<GameSettings,"id">
Defined in: packages/core/src/saves/db.ts:21
Table for storing game settings
Table
Table:
object
Defined in: node_modules/dexie/dist/dexie.d.ts:886
prototype
prototype:
Table
Inherited from
Dexie.Table
tables
readonlytables:Table<any,any,any>[]
Defined in: node_modules/dexie/dist/dexie.d.ts:842
Inherited from
Dexie.tables
Transaction
Transaction:
object
Defined in: node_modules/dexie/dist/dexie.d.ts:895
prototype
prototype:
Transaction
Inherited from
Dexie.Transaction
verno
readonlyverno:number
Defined in: node_modules/dexie/dist/dexie.d.ts:843
Inherited from
Dexie.verno
Version
Version:
Function&object
Defined in: node_modules/dexie/dist/dexie.d.ts:892
Type Declaration
prototype
prototype:
ExtendableVersion
Inherited from
Dexie.Version
vip
readonlyvip:Dexie
Defined in: node_modules/dexie/dist/dexie.d.ts:844
Inherited from
Dexie.vip
WhereClause
WhereClause:
object
Defined in: node_modules/dexie/dist/dexie.d.ts:889
prototype
prototype:
WhereClause
Inherited from
Dexie.WhereClause
AbortError
staticAbortError:DexieErrorConstructor
Inherited from
Dexie.AbortError
addons
staticaddons: (db) =>void[]
Defined in: node_modules/dexie/dist/dexie.d.ts:1128
Parameters
db
Dexie
Returns
void
Inherited from
Dexie.addons
BulkError
staticBulkError:BulkErrorConstructor
Defined in: node_modules/dexie/dist/dexie.d.ts:1036
Inherited from
Dexie.BulkError
cache
staticcache:GlobalQueryCache
Defined in: node_modules/dexie/dist/dexie.d.ts:1153
Inherited from
Dexie.cache
ConstraintError
staticConstraintError:DexieErrorConstructor
Inherited from
Dexie.ConstraintError
currentTransaction
staticcurrentTransaction:Transaction
Defined in: node_modules/dexie/dist/dexie.d.ts:1131
Inherited from
Dexie.currentTransaction
DatabaseClosedError
staticDatabaseClosedError:DexieErrorConstructor
Inherited from
Dexie.DatabaseClosedError
DataCloneError
staticDataCloneError:DexieErrorConstructor
Inherited from
Dexie.DataCloneError
DataError
staticDataError:DexieErrorConstructor
Inherited from
Dexie.DataError
debug
staticdebug:boolean|"dexie"
Defined in: node_modules/dexie/dist/dexie.d.ts:1154
Inherited from
Dexie.debug
default
staticdefault:Dexie
Defined in: node_modules/dexie/dist/dexie.d.ts:1152
Inherited from
Dexie.default
dependencies
staticdependencies:DexieDOMDependencies
Defined in: node_modules/dexie/dist/dexie.d.ts:1151
Inherited from
Dexie.dependencies
DexieError
staticDexieError:DexieErrorConstructor
Defined in: node_modules/dexie/dist/dexie.d.ts:1034
Inherited from
Dexie.DexieError
disableBfCache?
staticoptionaldisableBfCache:boolean
Defined in: node_modules/dexie/dist/dexie.d.ts:1137
Inherited from
Dexie.disableBfCache
errnames
staticerrnames:DexieErrors
Defined in: node_modules/dexie/dist/dexie.d.ts:1160
Inherited from
Dexie.errnames
Events()
staticEvents: (ctx?) =>DexieEventSet
Defined in: node_modules/dexie/dist/dexie.d.ts:1158
Parameters
ctx?
any
Returns
DexieEventSet
Inherited from
Dexie.Events
ForeignAwaitError
staticForeignAwaitError:DexieErrorConstructor
Inherited from
Dexie.ForeignAwaitError
InternalError
staticInternalError:DexieErrorConstructor
Inherited from
Dexie.InternalError
InvalidAccessError
staticInvalidAccessError:DexieErrorConstructor
Inherited from
Dexie.InvalidAccessError
InvalidArgumentError
staticInvalidArgumentError:DexieErrorConstructor
Inherited from
Dexie.InvalidArgumentError
InvalidStateError
staticInvalidStateError:DexieErrorConstructor
Inherited from
Dexie.InvalidStateError
InvalidTableError
staticInvalidTableError:DexieErrorConstructor
Inherited from
Dexie.InvalidTableError
maxKey
staticmaxKey:string|void[][]
Defined in: node_modules/dexie/dist/dexie.d.ts:1147
Inherited from
Dexie.maxKey
minKey
staticminKey:number
Defined in: node_modules/dexie/dist/dexie.d.ts:1148
Inherited from
Dexie.minKey
MissingAPIError
staticMissingAPIError:DexieErrorConstructor
Inherited from
Dexie.MissingAPIError
ModifyError
staticModifyError:ModifyErrorConstructor
Defined in: node_modules/dexie/dist/dexie.d.ts:1035
Inherited from
Dexie.ModifyError
NoSuchDatabaseError
staticNoSuchDatabaseError:DexieErrorConstructor
Inherited from
Dexie.NoSuchDatabaseError
NotFoundError
staticNotFoundError:DexieErrorConstructor
Inherited from
Dexie.NotFoundError
on
staticon:GlobalDexieEvents
Defined in: node_modules/dexie/dist/dexie.d.ts:1159
Inherited from
Dexie.on
OpenFailedError
staticOpenFailedError:DexieErrorConstructor
Inherited from
Dexie.OpenFailedError
PrematureCommitError
staticPrematureCommitError:DexieErrorConstructor
Inherited from
Dexie.PrematureCommitError
Promise
staticPromise:PromiseExtendedConstructor
Defined in: node_modules/dexie/dist/dexie.d.ts:1155
Inherited from
Dexie.Promise
QuotaExceededError
staticQuotaExceededError:DexieErrorConstructor
Inherited from
Dexie.QuotaExceededError
ReadOnlyError
staticReadOnlyError:DexieErrorConstructor
Inherited from
Dexie.ReadOnlyError
SchemaError
staticSchemaError:DexieErrorConstructor
Inherited from
Dexie.SchemaError
semVer
staticsemVer:string
Defined in: node_modules/dexie/dist/dexie.d.ts:1130
Inherited from
Dexie.semVer
SubTransactionError
staticSubTransactionError:DexieErrorConstructor
Inherited from
Dexie.SubTransactionError
TimeoutError
staticTimeoutError:DexieErrorConstructor
Inherited from
Dexie.TimeoutError
TransactionInactiveError
staticTransactionInactiveError:DexieErrorConstructor
Inherited from
Dexie.TransactionInactiveError
UnknownError
staticUnknownError:DexieErrorConstructor
Inherited from
Dexie.UnknownError
UnsupportedError
staticUnsupportedError:DexieErrorConstructor
Inherited from
Dexie.UnsupportedError
UpgradeError
staticUpgradeError:DexieErrorConstructor
Inherited from
Dexie.UpgradeError
version
staticversion:number
Defined in: node_modules/dexie/dist/dexie.d.ts:1129
Inherited from
Dexie.version
VersionChangeError
staticVersionChangeError:DexieErrorConstructor
Inherited from
Dexie.VersionChangeError
VersionError
staticVersionError:DexieErrorConstructor
Inherited from
Dexie.VersionError
Methods
backendDB()
backendDB():
IDBDatabase
Defined in: node_modules/dexie/dist/dexie.d.ts:874
Returns
IDBDatabase
Inherited from
Dexie.backendDB
close()
close(
closeOptions?):void
Defined in: node_modules/dexie/dist/dexie.d.ts:864
Parameters
closeOptions?
disableAutoOpen
boolean
Returns
void
Inherited from
Dexie.close
delete()
delete(
closeOptions?):PromiseExtended<void>
Defined in: node_modules/dexie/dist/dexie.d.ts:867
Parameters
closeOptions?
disableAutoOpen
boolean
Returns
PromiseExtended<void>
Inherited from
Dexie.delete
dynamicallyOpened()
dynamicallyOpened():
boolean
Defined in: node_modules/dexie/dist/dexie.d.ts:873
Returns
boolean
Inherited from
Dexie.dynamicallyOpened
hasBeenClosed()
hasBeenClosed():
boolean
Defined in: node_modules/dexie/dist/dexie.d.ts:871
Returns
boolean
Inherited from
Dexie.hasBeenClosed
hasFailed()
hasFailed():
boolean
Defined in: node_modules/dexie/dist/dexie.d.ts:872
Returns
boolean
Inherited from
Dexie.hasFailed
isOpen()
isOpen():
boolean
Defined in: node_modules/dexie/dist/dexie.d.ts:870
Returns
boolean
Inherited from
Dexie.isOpen
open()
open():
PromiseExtended<Dexie>
Defined in: node_modules/dexie/dist/dexie.d.ts:856
Returns
PromiseExtended<Dexie>
Inherited from
Dexie.open
table()
table<
T,TKey,TInsertType>(tableName):Table<T,TKey,TInsertType>
Defined in: node_modules/dexie/dist/dexie.d.ts:857
Type Parameters
T
T = any
TKey
TKey = IndexableType
TInsertType
TInsertType = T
Parameters
tableName
string
Returns
Table<T, TKey, TInsertType>
Inherited from
Dexie.table
transaction()
Call Signature
transaction<
U>(mode,tables,scope):PromiseExtended<U>
Defined in: node_modules/dexie/dist/dexie.d.ts:858
Type Parameters
U
U
Parameters
mode
TransactionMode
tables
readonly (string | Table<any, any, any>)[]
scope
(trans) => U | PromiseLike<U>
Returns
PromiseExtended<U>
Inherited from
Dexie.transaction
Call Signature
transaction<
U>(mode,table,scope):PromiseExtended<U>
Defined in: node_modules/dexie/dist/dexie.d.ts:859
Type Parameters
U
U
Parameters
mode
TransactionMode
table
string | Table<any, any, any>
scope
(trans) => U | PromiseLike<U>
Returns
PromiseExtended<U>
Inherited from
Dexie.transaction
Call Signature
transaction<
U>(mode,table,table2,scope):PromiseExtended<U>
Defined in: node_modules/dexie/dist/dexie.d.ts:860
Type Parameters
U
U
Parameters
mode
TransactionMode
table
string | Table<any, any, any>
table2
string | Table<any, any, any>
scope
(trans) => U | PromiseLike<U>
Returns
PromiseExtended<U>
Inherited from
Dexie.transaction
Call Signature
transaction<
U>(mode,table,table2,table3,scope):PromiseExtended<U>
Defined in: node_modules/dexie/dist/dexie.d.ts:861
Type Parameters
U
U
Parameters
mode
TransactionMode
table
string | Table<any, any, any>
table2
string | Table<any, any, any>
table3
string | Table<any, any, any>
scope
(trans) => U | PromiseLike<U>
Returns
PromiseExtended<U>
Inherited from
Dexie.transaction
Call Signature
transaction<
U>(mode,table,table2,table3,table4,scope):PromiseExtended<U>
Defined in: node_modules/dexie/dist/dexie.d.ts:862
Type Parameters
U
U
Parameters
mode
TransactionMode
table
string | Table<any, any, any>
table2
string | Table<any, any, any>
table3
string | Table<any, any, any>
table4
string | Table<any, any, any>
scope
(trans) => U | PromiseLike<U>
Returns
PromiseExtended<U>
Inherited from
Dexie.transaction
Call Signature
transaction<
U>(mode,table,table2,table3,table4,table5,scope):PromiseExtended<U>
Defined in: node_modules/dexie/dist/dexie.d.ts:863
Type Parameters
U
U
Parameters
mode
TransactionMode
table
string | Table<any, any, any>
table2
string | Table<any, any, any>
table3
string | Table<any, any, any>
table4
string | Table<any, any, any>
table5
string | Table<any, any, any>
scope
(trans) => U | PromiseLike<U>
Returns
PromiseExtended<U>
Inherited from
Dexie.transaction
unuse()
Call Signature
unuse(
__namedParameters):this
Defined in: node_modules/dexie/dist/dexie.d.ts:877
Parameters
__namedParameters
Middleware<{ stack: "dbcore"; }>
Returns
this
Inherited from
Dexie.unuse
Call Signature
unuse(
__namedParameters):this
Defined in: node_modules/dexie/dist/dexie.d.ts:880
Parameters
__namedParameters
name
string
stack
"dbcore"
Returns
this
Inherited from
Dexie.unuse
use()
use(
middleware):this
Defined in: node_modules/dexie/dist/dexie.d.ts:875
Parameters
middleware
Middleware<DBCore>
Returns
this
Inherited from
Dexie.use
version()
version(
versionNumber):Version
Defined in: node_modules/dexie/dist/dexie.d.ts:853
Parameters
versionNumber
number
Returns
Version
Inherited from
Dexie.version
asap()
staticasap(fn):void
Defined in: node_modules/dexie/dist/dexie.d.ts:1146
Parameters
fn
Function
Returns
void
Inherited from
Dexie.asap
deepClone()
staticdeepClone<T>(obj):T
Defined in: node_modules/dexie/dist/dexie.d.ts:1145
Type Parameters
T
T
Parameters
obj
T
Returns
T
Inherited from
Dexie.deepClone
delByKeyPath()
staticdelByKeyPath(obj,keyPath):void
Defined in: node_modules/dexie/dist/dexie.d.ts:1143
Parameters
obj
Object
keyPath
string | string[]
Returns
void
Inherited from
Dexie.delByKeyPath
delete()
staticdelete(dbName):Promise<void>
Defined in: node_modules/dexie/dist/dexie.d.ts:1150
Parameters
dbName
string
Returns
Promise<void>
Inherited from
Dexie.delete
exists()
staticexists(dbName):Promise<boolean>
Defined in: node_modules/dexie/dist/dexie.d.ts:1149
Parameters
dbName
string
Returns
Promise<boolean>
Inherited from
Dexie.exists
extendObservabilitySet()
staticextendObservabilitySet(target,newSet):ObservabilitySet
Defined in: node_modules/dexie/dist/dexie.d.ts:1139
Parameters
target
ObservabilitySet
newSet
ObservabilitySet
Returns
ObservabilitySet
Inherited from
Dexie.extendObservabilitySet
getByKeyPath()
staticgetByKeyPath(obj,keyPath):any
Defined in: node_modules/dexie/dist/dexie.d.ts:1141
Parameters
obj
Object
keyPath
string | string[]
Returns
any
Inherited from
Dexie.getByKeyPath
getDatabaseNames()
Call Signature
staticgetDatabaseNames():Promise<string[]>
Defined in: node_modules/dexie/dist/dexie.d.ts:1133
Returns
Promise<string[]>
Inherited from
Dexie.getDatabaseNames
Call Signature
staticgetDatabaseNames<R>(thenShortcut):Promise<R>
Defined in: node_modules/dexie/dist/dexie.d.ts:1134
Type Parameters
R
R
Parameters
thenShortcut
ThenShortcut<string[], R>
Returns
Promise<R>
Inherited from
Dexie.getDatabaseNames
ignoreTransaction()
staticignoreTransaction<U>(fn):U
Defined in: node_modules/dexie/dist/dexie.d.ts:1136
Type Parameters
U
U
Parameters
fn
() => U
Returns
U
Inherited from
Dexie.ignoreTransaction
liveQuery()
staticliveQuery<T>(fn):Observable<T>
Defined in: node_modules/dexie/dist/dexie.d.ts:1138
Type Parameters
T
T
Parameters
fn
() => T | Promise<T>
Returns
Observable<T>
Inherited from
Dexie.liveQuery
override()
staticoverride<F>(origFunc,overridedFactory):F
Defined in: node_modules/dexie/dist/dexie.d.ts:1140
Type Parameters
F
F
Parameters
origFunc
F
overridedFactory
(fn) => any
Returns
F
Inherited from
Dexie.override
setByKeyPath()
staticsetByKeyPath(obj,keyPath,value):void
Defined in: node_modules/dexie/dist/dexie.d.ts:1142
Parameters
obj
Object
keyPath
string | string[]
value
any
Returns
void
Inherited from
Dexie.setByKeyPath
shallowClone()
staticshallowClone<T>(obj):T
Defined in: node_modules/dexie/dist/dexie.d.ts:1144
Type Parameters
T
T
Parameters
obj
T
Returns
T
Inherited from
Dexie.shallowClone
vip()
staticvip<U>(scopeFunction):U
Defined in: node_modules/dexie/dist/dexie.d.ts:1135
Type Parameters
U
U
Parameters
scopeFunction
() => U
Returns
U
Inherited from
Dexie.vip
waitFor()
staticwaitFor<T>(promise,timeoutMilliseconds?):Promise<T>
Defined in: node_modules/dexie/dist/dexie.d.ts:1132
Type Parameters
T
T
Parameters
promise
T | PromiseLike<T>
timeoutMilliseconds?
number
Returns
Promise<T>
Inherited from
Dexie.waitFor