prorm API Reference
    Preparing search index...

    Interface CTEOption

    A single Common Table Expression definition used by SelectOptions.cte.

    interface CTEOption {
        name: string;
        query: string | SelectOptions;
        recursive?: boolean;
        columns?: string[];
    }
    Index
    name: string

    Name the CTE is referenced by in the main query (and in itself, for recursive CTEs).

    query: string | SelectOptions

    The CTE body: either a raw SQL string or a nested SelectOptions to be compiled.

    recursive?: boolean

    Marks this CTE as recursive, causing WITH RECURSIVE to be used.

    columns?: string[]

    Optional explicit column list: name (col1, col2, ...) AS (...).