Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BatchedPushOperation<T>

This operation pushes a list of objects to the database.

Usage

See Datastore.pushBatched.

Type parameters

  • T: Model<T>

    The model of the Datastore. T must extend from Model.

Hierarchy

  • BatchedPushOperation

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private _store

_store: Datastore<T>

The datastore where the operation takes place.

Private _toAdd

_toAdd: T[] = []

Array of objects to push.

Methods

item

  • item(value: T): this
  • Add a single item to the list of items to push.

    Parameters

    • value: T

      An item to push.

    Returns this

    Returns this operation again, to make chaining methods possible.

items

  • items(values: T[]): this
  • Add an array of items to the list of items to push.

    Parameters

    • values: T[]

      A list of items to push.

    Returns this

    Returns this operation again, to make chaining methods possible.

push

  • push(): Promise<T[]>

run

  • run(): Promise<T[]>

Generated using TypeDoc