Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Database

Hierarchy

  • Database

Implements

Index

Constructors

constructor

Properties

logger

logger: LoggerInstance

options

type

type: DATABASE

Methods

Abstract connect

describe

  • describe(): object
  • Describes the database instance for the framework.

    Returns object

    • name: string
    • status: string
    • context: object

Abstract disconnect

  • disconnect(): Promise<void>
  • Disconnects the current database.

    Returns Promise<void>

drop

  • drop(...args: any[]): Promise<any>
  • Drops the current database schema.

    Parameters

    • Rest ...args: any[]

    Returns Promise<any>

Abstract entities

  • entities(): object
  • Gets a map of database entities and its unique names (such as table or collection names).

    Returns object

    • [name: string]: any

Abstract isConnected

  • isConnected(): boolean
  • Checks if is currently connected to database.

    Returns boolean

migrate

  • migrate(...args: any[]): Promise<any>
  • Migrates the current database schema.

    Parameters

    • Rest ...args: any[]

    Returns Promise<any>

onInit

  • onInit(): Promise<void>
  • Handles the database initialization routine, connecting to remote server.

    Returns Promise<void>

onMount

onReady

  • Handles server post-initialization, not so relevant for a Database component that will be already initialized.

    Parameters

    Returns Promise<void>

onUnmount

  • onUnmount(): void
  • Handles the database unmounting routines and disconnect.

    Returns void

Abstract query

  • query(rawQuery: string, ...args: any[]): Promise<any>
  • Executes a raw query in the database.

    Parameters

    • rawQuery: string
    • Rest ...args: any[]

    Returns Promise<any>

Generated using TypeDoc