Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UpdateModel<T>

A Query that represents an UPDATE query and is used for updating an entity.

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

Properties

Protected Entity

Entity: EntityType<T>

The type of model to update, 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 update, 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: Update

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

Protected createUpdateModel

execute

  • execute(): Promise<T>

Protected Abstract produceQuery

toString

  • toString(): string

Generated using TypeDoc