ApplicationBatchUpdateBuilder allows you to do basic configuration of batch update: set updated fields.

Type parameters

Hierarchy

Methods

set

  • set<K>(f: K, v: UpdateClosure<UpdatableItem<TFull>, RemoveIndex<T>[K]>): ApplicationBatchUpdater<TFull, Omit<RemoveIndex<T>, K>, P>
  • The method allows setting rules for updating fields of app items in a collection.

    Type parameters

    • K: keyof UpdatableItem<T>

    Parameters

    • f: K

      Name of the app item field that is being updated.

    • v: UpdateClosure<UpdatableItem<TFull>, RemoveIndex<T>[K]>

      Value of the updated field.

      const rows = await Application. batch()
          .update() 
          .set('str0', _ => 'test') 
          .set('str1', f =>  f.str) 
          .set('str2', (f, op) => op.concat(f.str0, '+', f.str1)) 
          . all(); 
      

    Returns ApplicationBatchUpdater<TFull, Omit<RemoveIndex<T>, K>, P>