prorm API Reference
    Preparing search index...

    Interface StreamOptions

    Options for streaming query results

    interface StreamOptions {
        batchSize?: number;
        highWaterMark?: number;
        model?: ModelStatic<any>;
        mapToModel?: boolean;
        transaction?: Transaction;
        logging?: boolean | ((sql: string, time?: number) => void);
    }
    Index
    batchSize?: number

    Batch size for fetching records

    1000
    
    highWaterMark?: number

    High watermark for the stream internal buffer

    1000
    
    model?: ModelStatic<any>

    Model to use for mapping raw results to model instances

    mapToModel?: boolean

    Map raw query results to a model instance

    false
    
    transaction?: Transaction

    Transaction to use for the query

    logging?: boolean | ((sql: string, time?: number) => void)

    Logging function