Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CatalogDB

Hierarchy

  • Dexie
    • CatalogDB

Index

Constructors

constructor

Properties

Collection

Collection<T, Key>: {}

Type parameters

  • T

  • Key

Type declaration

and

  • and(filter: (x: T) => boolean): Collection<T, Key>
  • Parameters

    • filter: (x: T) => boolean
        • (x: T): boolean
        • Parameters

          • x: T

          Returns boolean

    Returns Collection<T, Key>

clone

  • Parameters

    • Optional props: Object

    Returns Collection<T, Key>

count

  • count(): Promise<number>
  • count<R>(thenShortcut: ThenShortcut<number, R>): Promise<R>
  • Returns Promise<number>

  • Type parameters

    • R

    Parameters

    • thenShortcut: ThenShortcut<number, R>

    Returns Promise<R>

delete

  • Returns Promise<number>

distinct

  • Returns Collection<T, Key>

each

  • each(callback: (obj: T, cursor: { key: IndexableType; primaryKey: Key }) => any): Promise<void>
  • Parameters

    • callback: (obj: T, cursor: { key: IndexableType; primaryKey: Key }) => any
        • (obj: T, cursor: { key: IndexableType; primaryKey: Key }): any
        • Parameters

          • obj: T
          • cursor: { key: IndexableType; primaryKey: Key }
            • key: IndexableType
            • primaryKey: Key

          Returns any

    Returns Promise<void>

eachKey

  • eachKey(callback: (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }) => any): Promise<void>
  • Parameters

    • callback: (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }) => any
        • (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }): any
        • Parameters

          • key: IndexableType
          • cursor: { key: IndexableType; primaryKey: Key }
            • key: IndexableType
            • primaryKey: Key

          Returns any

    Returns Promise<void>

eachPrimaryKey

  • eachPrimaryKey(callback: (key: Key, cursor: { key: IndexableType; primaryKey: Key }) => any): Promise<void>
  • Parameters

    • callback: (key: Key, cursor: { key: IndexableType; primaryKey: Key }) => any
        • (key: Key, cursor: { key: IndexableType; primaryKey: Key }): any
        • Parameters

          • key: Key
          • cursor: { key: IndexableType; primaryKey: Key }
            • key: IndexableType
            • primaryKey: Key

          Returns any

    Returns Promise<void>

eachUniqueKey

  • eachUniqueKey(callback: (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }) => any): Promise<void>
  • Parameters

    • callback: (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }) => any
        • (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }): any
        • Parameters

          • key: IndexableType
          • cursor: { key: IndexableType; primaryKey: Key }
            • key: IndexableType
            • primaryKey: Key

          Returns any

    Returns Promise<void>

filter

  • filter(filter: (x: T) => boolean): Collection<T, Key>
  • Parameters

    • filter: (x: T) => boolean
        • (x: T): boolean
        • Parameters

          • x: T

          Returns boolean

    Returns Collection<T, Key>

first

  • first(): Promise<T | undefined>
  • first<R>(thenShortcut: ThenShortcut<T | undefined, R>): Promise<R>
  • Returns Promise<T | undefined>

  • Type parameters

    • R

    Parameters

    • thenShortcut: ThenShortcut<T | undefined, R>

    Returns Promise<R>

keys

  • keys(): Promise<IndexableTypeArray>
  • keys<R>(thenShortcut: ThenShortcut<IndexableTypeArray, R>): Promise<R>
  • Returns Promise<IndexableTypeArray>

  • Type parameters

    • R

    Parameters

    • thenShortcut: ThenShortcut<IndexableTypeArray, R>

    Returns Promise<R>

last

  • last(): Promise<T | undefined>
  • last<R>(thenShortcut: ThenShortcut<T | undefined, R>): Promise<R>
  • Returns Promise<T | undefined>

  • Type parameters

    • R

    Parameters

    • thenShortcut: ThenShortcut<T | undefined, R>

    Returns Promise<R>

limit

  • Parameters

    • n: number

    Returns Collection<T, Key>

modify

  • modify(changeCallback: (obj: T, ctx: { value: T }) => void): Promise<number>
  • modify(changes: {}): Promise<number>
  • Parameters

    • changeCallback: (obj: T, ctx: { value: T }) => void
        • (obj: T, ctx: { value: T }): void
        • Parameters

          • obj: T
          • ctx: { value: T }
            • value: T

          Returns void

    Returns Promise<number>

  • Parameters

    • changes: {}
      • [keyPath: string]: any

    Returns Promise<number>

offset

  • Parameters

    • n: number

    Returns Collection<T, Key>

or

  • Parameters

    • indexOrPrimayKey: string

    Returns WhereClause<T, Key>

primaryKeys

  • primaryKeys(): Promise<Key[]>
  • primaryKeys<R>(thenShortcut: ThenShortcut<Key[], R>): Promise<R>
  • Returns Promise<Key[]>

  • Type parameters

    • R

    Parameters

    • thenShortcut: ThenShortcut<Key[], R>

    Returns Promise<R>

raw

  • Returns Collection<T, Key>

reverse

  • Returns Collection<T, Key>

sortBy

  • sortBy(keyPath: string): Promise<T[]>
  • sortBy<R>(keyPath: string, thenShortcut: ThenShortcut<T[], R>): Promise<R>
  • Parameters

    • keyPath: string

    Returns Promise<T[]>

  • Type parameters

    • R

    Parameters

    • keyPath: string
    • thenShortcut: ThenShortcut<T[], R>

    Returns Promise<R>

toArray

  • toArray(): Promise<Array<T>>
  • toArray<R>(thenShortcut: ThenShortcut<T[], R>): Promise<R>
  • Returns Promise<Array<T>>

  • Type parameters

    • R

    Parameters

    • thenShortcut: ThenShortcut<T[], R>

    Returns Promise<R>

uniqueKeys

  • uniqueKeys(): Promise<IndexableTypeArray>
  • uniqueKeys<R>(thenShortcut: ThenShortcut<IndexableTypeArray, R>): Promise<R>
  • Returns Promise<IndexableTypeArray>

  • Type parameters

    • R

    Parameters

    • thenShortcut: ThenShortcut<IndexableTypeArray, R>

    Returns Promise<R>

until

  • until(filter: (value: T) => boolean, includeStopEntry?: undefined | false | true): Collection<T, Key>
  • Parameters

    • filter: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    • Optional includeStopEntry: undefined | false | true

    Returns Collection<T, Key>

Table

Table<T, Key>: {}

Type parameters

  • T

  • Key

Type declaration

hook

hook: TableHooks<T, Key>

name

name: string

schema

schema: TableSchema

add

  • Parameters

    • item: T
    • Optional key: Key

    Returns Promise<Key>

bulkAdd

  • bulkAdd(items: T[], keys?: IndexableTypeArrayReadonly): Promise<Key>
  • Parameters

    • items: T[]
    • Optional keys: IndexableTypeArrayReadonly

    Returns Promise<Key>

bulkDelete

  • bulkDelete(keys: IndexableTypeArrayReadonly): Promise<void>
  • Parameters

    • keys: IndexableTypeArrayReadonly

    Returns Promise<void>

bulkPut

  • bulkPut(items: T[], keys?: IndexableTypeArrayReadonly): Promise<Key>
  • Parameters

    • items: T[]
    • Optional keys: IndexableTypeArrayReadonly

    Returns Promise<Key>

clear

  • Returns Promise<void>

count

  • count(): Promise<number>
  • count<R>(thenShortcut: ThenShortcut<number, R>): Promise<R>
  • Returns Promise<number>

  • Type parameters

    • R

    Parameters

    • thenShortcut: ThenShortcut<number, R>

    Returns Promise<R>

delete

  • Parameters

    • key: Key

    Returns Promise<void>

each

  • each(callback: (obj: T, cursor: { key: IndexableType; primaryKey: Key }) => any): Promise<void>
  • Parameters

    • callback: (obj: T, cursor: { key: IndexableType; primaryKey: Key }) => any
        • (obj: T, cursor: { key: IndexableType; primaryKey: Key }): any
        • Parameters

          • obj: T
          • cursor: { key: IndexableType; primaryKey: Key }
            • key: IndexableType
            • primaryKey: Key

          Returns any

    Returns Promise<void>

filter

  • filter(fn: (obj: T) => boolean): Collection<T, Key>
  • Parameters

    • fn: (obj: T) => boolean
        • (obj: T): boolean
        • Parameters

          • obj: T

          Returns boolean

    Returns Collection<T, Key>

get

  • get(key: Key): Promise<T | undefined>
  • get<R>(key: Key, thenShortcut: ThenShortcut<T | undefined, R>): Promise<R>
  • get(equalityCriterias: {}): Promise<T | undefined>
  • get<R>(equalityCriterias: {}, thenShortcut: ThenShortcut<T | undefined, R>): Promise<R>
  • Parameters

    • key: Key

    Returns Promise<T | undefined>

  • Type parameters

    • R

    Parameters

    • key: Key
    • thenShortcut: ThenShortcut<T | undefined, R>

    Returns Promise<R>

  • Parameters

    • equalityCriterias: {}
      • [key: string]: IndexableType

    Returns Promise<T | undefined>

  • Type parameters

    • R

    Parameters

    • equalityCriterias: {}
      • [key: string]: IndexableType
    • thenShortcut: ThenShortcut<T | undefined, R>

    Returns Promise<R>

limit

  • Parameters

    • n: number

    Returns Collection<T, Key>

mapToClass

  • mapToClass(constructor: Function): Function
  • Parameters

    • constructor: Function

    Returns Function

offset

  • Parameters

    • n: number

    Returns Collection<T, Key>

orderBy

  • orderBy(index: string | string[]): Collection<T, Key>
  • Parameters

    • index: string | string[]

    Returns Collection<T, Key>

put

  • Parameters

    • item: T
    • Optional key: Key

    Returns Promise<Key>

reverse

  • Returns Collection<T, Key>

toArray

  • toArray(): Promise<Array<T>>
  • toArray<R>(thenShortcut: ThenShortcut<T[], R>): Promise<R>
  • Returns Promise<Array<T>>

  • Type parameters

    • R

    Parameters

    • thenShortcut: ThenShortcut<T[], R>

    Returns Promise<R>

toCollection

  • Returns Collection<T, Key>

update

  • update(key: Key, changes: {}): Promise<number>
  • Parameters

    • key: Key
    • changes: {}
      • [keyPath: string]: any

    Returns Promise<number>

where

  • Parameters

    • index: string | string[]

    Returns WhereClause<T, Key>

  • Parameters

    • equalityCriterias: {}
      • [key: string]: IndexableType

    Returns Collection<T, Key>

Transaction

Transaction: {}

Type declaration

active

active: boolean

db

db: Dexie

idbtrans

idbtrans: IDBTransaction

mode

mode: string

on

storeNames

storeNames: Array<string>

tables

tables: {}

Type declaration

  • [type: string]: Table<any, any>

abort

  • abort(): void
  • Returns void

table

  • table(tableName: string): Table<any, any>
  • table<T>(tableName: string): Table<T, any>
  • table<T, Key>(tableName: string): Table<T, Key>
  • Parameters

    • tableName: string

    Returns Table<any, any>

  • Type parameters

    • T

    Parameters

    • tableName: string

    Returns Table<T, any>

  • Type parameters

    • T

    • Key

    Parameters

    • tableName: string

    Returns Table<T, Key>

Version

Version: {}

Type declaration

stores

  • Parameters

    • schema: {}
      • [key: string]: string | null

    Returns Version

upgrade

WhereClause

WhereClause<T, Key>: {}

Type parameters

  • T

  • Key

Type declaration

above

  • Parameters

    • key: IndexableType

    Returns Collection<T, Key>

aboveOrEqual

  • aboveOrEqual(key: IndexableType): Collection<T, Key>
  • Parameters

    • key: IndexableType

    Returns Collection<T, Key>

anyOf

  • anyOf(keys: IndexableTypeArrayReadonly): Collection<T, Key>
  • anyOf(...keys: IndexableTypeArray): Collection<T, Key>
  • Parameters

    • keys: IndexableTypeArrayReadonly

    Returns Collection<T, Key>

  • Parameters

    • Rest ...keys: IndexableTypeArray

    Returns Collection<T, Key>

anyOfIgnoreCase

  • anyOfIgnoreCase(keys: string[]): Collection<T, Key>
  • anyOfIgnoreCase(...keys: string[]): Collection<T, Key>
  • Parameters

    • keys: string[]

    Returns Collection<T, Key>

  • Parameters

    • Rest ...keys: string[]

    Returns Collection<T, Key>

below

  • Parameters

    • key: IndexableType

    Returns Collection<T, Key>

belowOrEqual

  • belowOrEqual(key: IndexableType): Collection<T, Key>
  • Parameters

    • key: IndexableType

    Returns Collection<T, Key>

between

  • between(lower: IndexableType, upper: IndexableType, includeLower?: undefined | false | true, includeUpper?: undefined | false | true): Collection<T, Key>
  • Parameters

    • lower: IndexableType
    • upper: IndexableType
    • Optional includeLower: undefined | false | true
    • Optional includeUpper: undefined | false | true

    Returns Collection<T, Key>

equals

  • Parameters

    • key: IndexableType

    Returns Collection<T, Key>

equalsIgnoreCase

  • equalsIgnoreCase(key: string): Collection<T, Key>
  • Parameters

    • key: string

    Returns Collection<T, Key>

inAnyRange

  • inAnyRange(ranges: Array<IndexableTypeArrayReadonly>): Collection<T, Key>
  • Parameters

    • ranges: Array<IndexableTypeArrayReadonly>

    Returns Collection<T, Key>

noneOf

  • noneOf(keys: Array<IndexableType>): Collection<T, Key>
  • Parameters

    • keys: Array<IndexableType>

    Returns Collection<T, Key>

notEqual

  • notEqual(key: IndexableType): Collection<T, Key>
  • Parameters

    • key: IndexableType

    Returns Collection<T, Key>

startsWith

  • Parameters

    • key: string

    Returns Collection<T, Key>

startsWithAnyOf

  • startsWithAnyOf(prefixes: string[]): Collection<T, Key>
  • startsWithAnyOf(...prefixes: string[]): Collection<T, Key>
  • Parameters

    • prefixes: string[]

    Returns Collection<T, Key>

  • Parameters

    • Rest ...prefixes: string[]

    Returns Collection<T, Key>

startsWithAnyOfIgnoreCase

  • startsWithAnyOfIgnoreCase(prefixes: string[]): Collection<T, Key>
  • startsWithAnyOfIgnoreCase(...prefixes: string[]): Collection<T, Key>
  • Parameters

    • prefixes: string[]

    Returns Collection<T, Key>

  • Parameters

    • Rest ...prefixes: string[]

    Returns Collection<T, Key>

startsWithIgnoreCase

  • startsWithIgnoreCase(key: string): Collection<T, Key>
  • Parameters

    • key: string

    Returns Collection<T, Key>

courses

courses: Table<CourseTableItem, string>

meta

meta: Table<{ id: 0; time: number }, 0>

Readonly name

name: string

on

sections

sections: Table<SectionTableItem, number>

Readonly tables

tables: Table<any, any>[]

Readonly verno

verno: number

Static Events

Events: any

Static IndexSpec

IndexSpec: {}

Type declaration

Static Promise

Static TableSchema

TableSchema: {}

Type declaration

Static addons

addons: Array<(db: Dexie) => void>

Static currentTransaction

currentTransaction: Transaction

Static default

default: Dexie

Static dependencies

dependencies: { IDBKeyRange: IDBKeyRange; indexedDB: IDBFactory }

Type declaration

  • IDBKeyRange: IDBKeyRange
  • indexedDB: IDBFactory

Static errnames

errnames: { Abort: "AbortError"; Constraint: "ConstraintError"; Data: "DataError"; DataClone: "DataCloneError"; DatabaseClosed: "DatabaseClosedError"; Internal: "InternalError"; InvalidAccess: "InvalidAccessError"; InvalidArgument: "InvalidArgumentError"; InvalidState: "InvalidStateError"; InvalidTable: "InvalidTableError"; MissingAPI: "MissingAPIError"; Modify: "ModifyError"; NoSuchDatabase: "NoSuchDatabaseError"; NotFound: "NotFoundError"; OpenFailed: "OpenFailedError"; QuotaExceeded: "QuotaExceededError"; ReadOnly: "ReadOnlyError"; Schema: "SchemaError"; SubTransaction: "Error"; Syntax: "SyntaxError"; Timeout: "TimeoutError"; TransactionInactive: "TransactionInactiveError"; Unknown: "UnknownError"; Unsupported: "UnsupportedError"; Upgrade: "UpgradeError"; Version: "VersionError"; VersionChange: "VersionChangeError" }

Type declaration

  • Abort: "AbortError"
  • Constraint: "ConstraintError"
  • Data: "DataError"
  • DataClone: "DataCloneError"
  • DatabaseClosed: "DatabaseClosedError"
  • Internal: "InternalError"
  • InvalidAccess: "InvalidAccessError"
  • InvalidArgument: "InvalidArgumentError"
  • InvalidState: "InvalidStateError"
  • InvalidTable: "InvalidTableError"
  • MissingAPI: "MissingAPIError"
  • Modify: "ModifyError"
  • NoSuchDatabase: "NoSuchDatabaseError"
  • NotFound: "NotFoundError"
  • OpenFailed: "OpenFailedError"
  • QuotaExceeded: "QuotaExceededError"
  • ReadOnly: "ReadOnlyError"
  • Schema: "SchemaError"
  • SubTransaction: "Error"
  • Syntax: "SyntaxError"
  • Timeout: "TimeoutError"
  • TransactionInactive: "TransactionInactiveError"
  • Unknown: "UnknownError"
  • Unsupported: "UnsupportedError"
  • Upgrade: "UpgradeError"
  • Version: "VersionError"
  • VersionChange: "VersionChangeError"

Static maxKey

maxKey: Array<Array<void>> | string

Static minKey

minKey: number

Static semVer

semVer: string

Static version

version: number

Methods

backendDB

  • backendDB(): IDBDatabase
  • Returns IDBDatabase

close

  • close(): void
  • Returns void

delete

dynamicallyOpened

  • dynamicallyOpened(): boolean

empty

hasBeenClosed

  • hasBeenClosed(): boolean

hasFailed

  • hasFailed(): boolean
  • Returns boolean

isOpen

  • isOpen(): boolean
  • Returns boolean

open

  • Returns Promise<Dexie>

saveTimeStamp

table

  • table(tableName: string): Table<any, any>
  • table<T>(tableName: string): Table<T, any>
  • table<T, Key>(tableName: string): Table<T, Key>
  • Parameters

    • tableName: string

    Returns Table<any, any>

  • Type parameters

    • T

    Parameters

    • tableName: string

    Returns Table<T, any>

  • Type parameters

    • T

    • Key

    Parameters

    • tableName: string

    Returns Table<T, Key>

timestamp

transaction

  • transaction<U>(mode: TransactionMode, table: Table<any, any>, scope: () => PromiseLike<U> | U): Promise<U>
  • transaction<U>(mode: TransactionMode, table: Table<any, any>, table2: Table<any, any>, scope: () => PromiseLike<U> | U): Promise<U>
  • transaction<U>(mode: TransactionMode, table: Table<any, any>, table2: Table<any, any>, table3: Table<any, any>, scope: () => PromiseLike<U> | U): Promise<U>
  • transaction<U>(mode: TransactionMode, table: Table<any, any>, table2: Table<any, any>, table3: Table<any, any>, table4: Table<any, any>, scope: () => PromiseLike<U> | U): Promise<U>
  • transaction<U>(mode: TransactionMode, table: Table<any, any>, table2: Table<any, any>, table3: Table<any, any>, table4: Table<any, any>, table5: Table<any, any>, scope: () => PromiseLike<U> | U): Promise<U>
  • transaction<U>(mode: TransactionMode, tables: Table<any, any>[], scope: () => PromiseLike<U> | U): Promise<U>
  • Type parameters

    • U

    Parameters

    • mode: TransactionMode
    • table: Table<any, any>
    • scope: () => PromiseLike<U> | U
        • (): PromiseLike<U> | U
        • Returns PromiseLike<U> | U

    Returns Promise<U>

  • Type parameters

    • U

    Parameters

    • mode: TransactionMode
    • table: Table<any, any>
    • table2: Table<any, any>
    • scope: () => PromiseLike<U> | U
        • (): PromiseLike<U> | U
        • Returns PromiseLike<U> | U

    Returns Promise<U>

  • Type parameters

    • U

    Parameters

    • mode: TransactionMode
    • table: Table<any, any>
    • table2: Table<any, any>
    • table3: Table<any, any>
    • scope: () => PromiseLike<U> | U
        • (): PromiseLike<U> | U
        • Returns PromiseLike<U> | U

    Returns Promise<U>

  • Type parameters

    • U

    Parameters

    • mode: TransactionMode
    • table: Table<any, any>
    • table2: Table<any, any>
    • table3: Table<any, any>
    • table4: Table<any, any>
    • scope: () => PromiseLike<U> | U
        • (): PromiseLike<U> | U
        • Returns PromiseLike<U> | U

    Returns Promise<U>

  • Type parameters

    • U

    Parameters

    • mode: TransactionMode
    • table: Table<any, any>
    • table2: Table<any, any>
    • table3: Table<any, any>
    • table4: Table<any, any>
    • table5: Table<any, any>
    • scope: () => PromiseLike<U> | U
        • (): PromiseLike<U> | U
        • Returns PromiseLike<U> | U

    Returns Promise<U>

  • Type parameters

    • U

    Parameters

    • mode: TransactionMode
    • tables: Table<any, any>[]
    • scope: () => PromiseLike<U> | U
        • (): PromiseLike<U> | U
        • Returns PromiseLike<U> | U

    Returns Promise<U>

version

  • version(versionNumber: Number): Version
  • Parameters

    • versionNumber: Number

    Returns Version

vip

  • vip<U>(scopeFunction: () => U): U
  • Type parameters

    • U

    Parameters

    • scopeFunction: () => U
        • (): U
        • Returns U

    Returns U

Static asap

  • asap(fn: Function): void
  • Parameters

    • fn: Function

    Returns void

Static deepClone

  • deepClone<T>(obj: T): T
  • Type parameters

    • T

    Parameters

    • obj: T

    Returns T

Static delByKeyPath

  • delByKeyPath(obj: Object, keyPath: string): void
  • Parameters

    • obj: Object
    • keyPath: string

    Returns void

Static delete

  • delete(dbName: string): Promise<void>
  • Parameters

    • dbName: string

    Returns Promise<void>

Static exists

  • exists(dbName: string): Promise<boolean>
  • Parameters

    • dbName: string

    Returns Promise<boolean>

Static getByKeyPath

  • getByKeyPath(obj: Object, keyPath: string): any
  • Parameters

    • obj: Object
    • keyPath: string

    Returns any

Static getDatabaseNames

  • getDatabaseNames(): Promise<string[]>
  • getDatabaseNames<R>(thenShortcut: ThenShortcut<string[], R>): Promise<R>

Static override

  • override<F>(origFunc: F, overridedFactory: (fn: any) => any): F
  • Type parameters

    • F

    Parameters

    • origFunc: F
    • overridedFactory: (fn: any) => any
        • (fn: any): any
        • Parameters

          • fn: any

          Returns any

    Returns F

Static setByKeyPath

  • setByKeyPath(obj: Object, keyPath: string, value: any): void
  • Parameters

    • obj: Object
    • keyPath: string
    • value: any

    Returns void

Static shallowClone

  • shallowClone<T>(obj: T): T
  • Type parameters

    • T

    Parameters

    • obj: T

    Returns T

Static waitFor

  • waitFor<T>(promise: PromiseLike<T> | T): Promise<T>
  • waitFor<T>(promise: PromiseLike<T> | T, timeoutMilliseconds: number): Promise<T>
  • Type parameters

    • T

    Parameters

    • promise: PromiseLike<T> | T

    Returns Promise<T>

  • Type parameters

    • T

    Parameters

    • promise: PromiseLike<T> | T
    • timeoutMilliseconds: number

    Returns Promise<T>

Generated using TypeDoc