Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MutateModel<Q, T>

A Query that represents a mutation (update or delete) on an entity by ID.

Type parameters

Hierarchy

Index

Constructors

constructor

  • Initialize the query using an Entity type and an Entity instance (a model).

    Parameters

    • colStore: ColumnStore

      Used for accessing columns in tables.

    • tblStore: TableStore

      Used for accessing tables in the database.

    • relStore: RelationshipStore

      Used for accessing relationships between tables.

    • propStore: PropertyMapStore

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

    • escaper: Escaper

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

    • Entity: EntityType<T>

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

    • model: T

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

    Returns MutateModel

Properties

Protected Entity

Entity: EntityType<T>

The type of model to mutate, 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 from

from: From

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

Protected model

model: T

An Entity instance to mutate, 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: Q

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

Abstract execute

Protected Abstract produceQuery

  • produceQuery(from: From): Q

toString

  • toString(): string

Generated using TypeDoc