Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DatabaseObject

A DatabaseObject is the database-representation of an object.

author

Nicolas Schmidt <@nsc-de>

see

DatabaseObject.data - the data of the array

see

DatabaseObject.length - the array length

see

DatabaseObject.constructor() - the constructor

see

DatabaseObject.set() - sets a value from the DatabaseObject

see

DatabaseObject.setDefault() - sets a default value from the DatabaseObject

see

DatabaseObject.setDefaults() - sets defaults for the DatabaseObject

see

DatabaseObject.get() - gets a value from the DatabaseObject

see

DatabaseObject.getNormal() - gets a value from the DatabaseObject and normalizes it

see

DatabaseObject.update() - updates a value from the DatabaseObject

see

DatabaseObject.contains() - checks if the DatabaseObject contains a value

see

DatabaseObject.generateId() - Generates an id using a namespace

Hierarchy

Index

Constructors

constructor

Accessors

data

length

  • get length(): number

Methods

contains

  • contains(key: string | Array<string | number>): boolean
  • Checks if the DatabaseObject contains a value

    author

    Nicolas Schmidt <@nsc-de>

    see

    DatabaseObject - 👩‍👦 the parent class

    Parameters

    • key: string | Array<string | number>

      the path to apply the value to

    Returns boolean

    the value at the position of the position

generateId

  • generateId(name: string): number
  • Generates an using a namespace

    author

    Nicolas Schmidt <@nsc-de>

    see

    DatabaseObject - 👩‍👦 the parent class

    Parameters

    • name: string

      the name to generate a namespace from

    Returns number

    the generated id

get

  • Gets a value from the DatabaseObject.

    author

    Nicolas Schmidt <@nsc-de>

    see

    DatabaseObject - 👩‍👦 the parent class

    Parameters

    • key: string | Array<string | number>

      the path to get

    Returns DatabaseValue

    the value at the position

getNormal

set

  • Sets a value from the DatabaseObject.

    author

    Nicolas Schmidt <@nsc-de>

    see

    DatabaseObject - 👩‍👦 the parent class

    Parameters

    • key: string | Array<string | number>

      the path to apply the value to

    • value: DatabaseInsertable

      the value to apply to the given path

    Returns this

    the DatabaseObject itself, so you can chain operations like that

setDefault

setDefaults

update

Generated using TypeDoc