Class DataModel

Abstract data model

Hierarchy

  • DataModel

Constructors

  • Constructor

    Parameters

    • source: string

      Name of the data source

    • table: string

      Name of the table

    • primaryKey: string

      Name of the primary key

    Returns DataModel

Properties

Methods

  • Checks if a property changed

    Returns

    true if the property changed

    Parameters

    • prop: string

      Name of the property

    Returns boolean

  • Deletes the model from the database

    Returns Promise<boolean>

  • Atomic increment

    Parameters

    • field: never

      The field to increment

    • inc: number

      The amount to increment

    Returns Promise<void>

  • Initializes the data access object.

    Returns void

  • Inserts a new entry in the database.

    Returns Promise<void>

  • Saves the changes of this model on the database.

    Parameters

    Returns Promise<boolean>

Generated using TypeDoc