Options
All
  • Public
  • Public/Protected
  • All
Menu

The database plugin class, of which Dimensions uses internally to store data onto the database Must be extended in order to be used as a database plugin

Hierarchy

Index

Constructors

constructor

Properties

Abstract name

name: string

Name of the plugin

Abstract type

type: Type

Type of the plugin. Required in order for Dimensions to know how to use it

Static Database

Database: Database

Static Storage

Storage: Storage

Methods

Abstract deleteUser

  • deleteUser(usernameOrID: string): Promise<any>

Abstract getMatch

  • getMatch(id: NanoID): Promise<any>

Abstract getPlayerMatches

  • getPlayerMatches(playerID: nanoid, governID: nanoid, offset: number, limit: number, order: number): Promise<Array<Match>>

Abstract getTournamentConfigs

Abstract getTournamentConfigsModificationDate

  • getTournamentConfigsModificationDate(tournamentID: nanoid): Promise<Date>

Abstract getUser

  • getUser(usernameOrID: string, publicView?: boolean): Promise<User>

Abstract getUsersInTournament

  • getUsersInTournament(tournamentKeyName: string, offset: number, limit: number): Promise<Array<User>>
  • Gets all users with statistics in a tournament specified by the tournamentKeyName, which is a string that is the key stored in the user's statistics property mapping to the tournament's statistics. This is also the number of rankings.

    Parameters

    • tournamentKeyName: string
    • offset: number

      offset of the users

    • limit: number

      how many users to retrieve

    Returns Promise<Array<User>>

Abstract initialize

  • initialize(dimension: Dimension): Promise<any>

Abstract isAdmin

Abstract loginUser

  • loginUser(username: string, password: string): Promise<any>

Abstract manipulate

  • manipulate(dimension: Dimension): Promise<void>

Abstract registerUser

  • registerUser(username: string, password: string, userData?: any): Promise<any>

Abstract storeMatch

  • storeMatch(match: Match, governID: nanoid): Promise<any>

Abstract storeTournamentConfigs

Abstract updateUser

  • updateUser(usernameOrID: string, update: Partial<User>): Promise<any>

Abstract verifyToken

  • verifyToken(jwt: string): Promise<any>

Object literals

configs

configs: object

Default configs

saveMatches

saveMatches: true = true

saveTournamentMatches

saveTournamentMatches: true = true

Generated using TypeDoc