UNPKG

@uwdata/mosaic-sql

Version:

SQL query construction and analysis.

54 lines 2.2 kB
import { type ParamLike } from '../types.js'; import { type ExprNode, SQLNode } from './node.js'; import { ParamNode } from './param.js'; export type FrameValue = ExprNode | number | null; export type FrameExtent = [FrameValue, FrameValue] | ParamLike; export type FrameScope = 'PRECEDING' | 'FOLLOWING' | 'CURRENT ROW'; export type FrameType = 'ROWS' | 'RANGE' | 'GROUPS'; export type FrameExclude = 'NO OTHERS' | 'CURRENT ROW' | 'TIES' | 'GROUP'; export declare const ROWS = "ROWS"; export declare const RANGE = "RANGE"; export declare const GROUPS = "GROUPS"; export declare const PRECEDING = "PRECEDING"; export declare const FOLLOWING = "FOLLOWING"; export declare const CURRENT_ROW = "CURRENT ROW"; export declare const UNBOUNDED = "UNBOUNDED"; export declare class WindowFrameNode extends SQLNode { /** The frame type, one of ROWS, RANGE, or GROUPS. */ readonly frameType: FrameType; /** The window frame extent. */ readonly extent: [unknown, unknown] | ParamNode; /** The window frame exclusion criteria. */ readonly exclude?: FrameExclude; /** * Instantiate a window frame definition node. * @param frameType The frame type, one of ROWS, RANGE, or GROUPS. * @param extent The window frame extent. * @param exclude The window frame exclusion criteria. */ constructor(frameType: FrameType, extent: FrameExtent, exclude?: FrameExclude); /** * Generate a SQL query string for this node. */ toString(): string; } export declare class WindowFrameExprNode extends SQLNode { /** The window frame extent. */ readonly scope: FrameScope; /** * The window frame extent expression. This value should be null * in the case of current row or unbounded extent values. */ readonly expr: FrameValue | null; /** * Instantiate a window frame definition node. * @param scope The frame scope, one of PRECEDING, FOLLOWING, or CURRENT ROW. * @param expr The window frame extent expression. */ constructor(scope: FrameScope, expr?: FrameValue | null); /** * Generate a SQL query string for this node. */ toString(): string; } //# sourceMappingURL=window-frame.d.ts.map