prorm API Reference
    Preparing search index...

    Interface WindowFunctionOptions

    Options for window functions

    interface WindowFunctionOptions {
        partitionBy?: string | string[];
        orderBy?: Order;
        windowFrame?: WindowFrame;
        ntileBuckets?: number;
        offset?: number;
        defaultValue?: any;
    }
    Index
    partitionBy?: string | string[]

    PARTITION BY clause - field(s) to partition by

    orderBy?: Order

    ORDER BY clause - field(s) to order by

    windowFrame?: WindowFrame

    Window frame specification

    ntileBuckets?: number

    Number of buckets for NTILE() function

    offset?: number

    Offset for LAG/LEAD functions (number of rows to look ahead/behind)

    defaultValue?: any

    Default value for LAG/LEAD functions when the offset goes beyond the partition