Type parameters

Hierarchy

  • ApplicationBatchDeleteBuilder

Methods

all

  • all(): Promise<number>
  • The method runs batch deletion.

    Returns the number of actually deleted items according to ApplicationBatchDeleteBuilder.size, starting with ApplicationBatchDeleteBuilder.from. By default the size of the deleted items is limited to 10 entries. To delete more items, use the method ApplicationBatchDeleteBuilder.size.

    const searchResults  = await Application.batch()
        .delete() 
        .where((f, g) => g.and (  
            f.__deletedAt.eq(null), 
            f.str.eq(null) 
        )) 
        .all();  
    

    Returns Promise<number>

from

  • from(n: number): this
  • The method allows you to skip a specified number of items to be deleted.

    Parameters

    • n: number

    Returns this

notify

  • notify(enabled: boolean): this
  • The method configures sending notifications when items are deleted.

    Parameters

    • enabled: boolean

    Returns this

size

  • size(n: number): this
  • The method allows you to set a limit on the number of items to be deleted.

    Parameters

    • n: number

    Returns this

sort

  • sort(field: keyof TFull, ascending?: undefined | false | true): this
  • The method allows sorting the items to be deleted.

    If the results need to be sorted by different parameters, you can call the method sequentially several times.

    Parameters

    • field: keyof TFull
    • Optional ascending: undefined | false | true

    Returns this

where

  • where(fc: FilterClosure<TFull>): this
  • The method allows you to set a filter for the items to be deleted from the collection.

    Parameters

    • fc: FilterClosure<TFull>

    Returns this