Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DatabaseModels

Contains database models and functions for processing objects saved in the database.

Hierarchy

  • DatabaseModels

Index

Constructors

constructor

Properties

Command

Command: Sequelize.Model<any, any>

Model for the Commands table.

Face

Face: Sequelize.Model<any, any>

Model for the Faces table.

RunCondition

RunCondition: Sequelize.Model<any, any>

Model for the RunConditions table.

Status

Status: Sequelize.Model<any, any>

Model for the Statuses table.

Private sequelize

sequelize: ISequelize

Instance of Sequelize.

Accessors

Static SQLiteDateFormat

  • get SQLiteDateFormat(): string

Methods

create

  • create(): Promise<any>
  • Creates database tables if they do not already exist.

    Returns Promise<any>

Static DateToSQLiteFormat

  • DateToSQLiteFormat(date: Date): string
  • Converts a date to the SQLite date string.

    Parameters

    • date: Date

      Date to convert.

    Returns string

Static FromDBCommand

  • FromDBCommand(dbCommand: any, resources: AppResources): Promise<Command>
  • Converts a record in the Commands table into a Command object.

    Parameters

    • dbCommand: any

      Object containing columns/values from the database.

    • resources: AppResources

    Returns Promise<Command>

Static FromDBFace

  • FromDBFace(dbFace: any): Promise<Face>
  • Converts a record in the Faces table into a Face object.

    Parameters

    • dbFace: any

      Object containing columns/values from the database.

    Returns Promise<Face>

Static FromDBRunCondition

  • FromDBRunCondition(dbRunCondition: any): Promise<RunCondition>
  • Converts a record in the RunConditions table into a RunCondition object.

    Parameters

    • dbRunCondition: any

      Object containing columns/values from the database.

    Returns Promise<RunCondition>

Static FromDBStatus

  • FromDBStatus(dbStatus: any): Promise<Status>
  • Converts a record in the Statuses table into a Status object.

    Parameters

    • dbStatus: any

      Object containing columns/values from the database.

    Returns Promise<Status>

Generated using TypeDoc