Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeleteModel<T>

A class for deleting models by ID.

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

Properties

Protected Entity

Entity: EntityType<T>

The type of model to delete, which is the constructor of a Table-decorated class.

Protected colStore

colStore: ColumnStore

Used for accessing columns in tables.

Protected escaper

escaper: Escaper

An Escaper matching the database type (e.g. MySQLEscaper or MSSQLEscaper). Used when escaping column names in compiled conditions.

Protected executer

executer: Executer

An Executer instance that matches the database type (e.g. MySQLExecuter).

Protected from

from: From

A From instance that is used to create a Query of type Q.

Protected model

model: T

An Entity instance to delete, which must have the primary key set.

Protected propStore

propStore: PropertyMapStore

Used for pulling table property maps (used in conjunction with the relStore to get remote columns).

Protected query

query: Delete

A Query instance (e.g. Update or Delete that is used in toString, buildQuery, and execute.

Protected relStore

Used for accessing relationships between tables.

Protected tblStore

tblStore: TableStore

Used for accessing tables in the database.

Methods

buildQuery

execute

  • execute(): Promise<T>

Protected produceQuery

toString

  • toString(): string

Generated using TypeDoc