prorm API Reference
    Preparing search index...

    Class BatchQueryOptimizer

    Batch query optimizer

    Index
    • Optimize batch insert by combining multiple INSERT statements

      Parameters

      • tableName: string

        Name of the table to insert into

      • records: Record<string, any>[]

        Array of records to insert

      • Optionaloptions: Partial<BatchOptions>

        Batch options

      Returns Promise<BatchResult<any>>

    • Optimize batch update

      Parameters

      • tableName: string

        Name of the table to update

      • records: Record<string, any>[]

        Records to update (must have primary key or unique identifier)

      • identifierColumn: string = 'id'

        Column to use for identifying records

      • Optionaloptions: Partial<BatchOptions>

        Batch options

      Returns Promise<BatchResult<any>>

    • Optimize batch delete

      Parameters

      • tableName: string

        Name of the table to delete from

      • identifiers: any[]

        Array of identifiers for records to delete

      • identifierColumn: string = 'id'

        Column to use for identifying records

      • Optionaloptions: Partial<BatchOptions>

        Batch options

      Returns Promise<BatchResult<any>>