Hierarchy

  • UpdateOperations

Methods

concat

  • concat(...args: (TString | UpdateFieldOperand<TString>)[]): UpdateConcatOperation
  • The method declares the operation of concatenation for a string field.

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

    Parameters

    Returns UpdateConcatOperation

inc

  • inc(field: UpdateFieldOperand<TFloat>, value: TFloat): UpdateIncOperation
  • The method declares the operation of incrementing a number field.

    const rows = await Application.batch()
       .update() 
       . set('number', (f, op) => op.inc(f.number, 10)) 
       .all(); 
    

    Parameters

    Returns UpdateIncOperation

push

  • push<T>(...items: T[]): UpdateArrayOperation<T>
  • The method declares the operation of adding an app item at the end of an array field.

    const rows = await Application.batch()
       .update() 
       . set('users', (f, op) => op.push(user)) 
       .all(); 
    

    Type parameters

    • T: Type

    Parameters

    • Rest ...items: T[]

    Returns UpdateArrayOperation<T>

remove

  • remove<T>(...items: T[]): UpdateArrayOperation<T>
  • The method declates the operation of deletion app items from an array field.

    const rows = await Application.batch()
       .update() 
       . set('users', (f, op) => op.remove(user)) 
       .all(); 
    

    Type parameters

    • T: Type

    Parameters

    • Rest ...items: T[]

    Returns UpdateArrayOperation<T>