import { BaseSchemaApiFunction, BaseSchemaApiItem, GenericSchemaItemBase } from './base'; /** * Supported function bundles */ export type SqlBundleType = "date" | "numeric" | "string"; /** * Supported sql profile names */ export type SqlProfileType = "Field Calculation"; export type SqlValueType = "Datetime" | "Number" | "String"; /** * Narrowed schema item type for sql */ export type SqlSchemaItemBase = GenericSchemaItemBase; /** * Narrowed api function type for sql */ export type SqlApiFunction = BaseSchemaApiFunction & { /** * The name of the function. */ name: string; /** * SQL functions may be "special registers" that are not called like regular functions. * For example, CURRENT_DATE is a special register. * These functions are not called with parentheses or arguments. */ isSpecialRegister?: boolean; /** * The set of keywords that are used in the function. */ keywords?: SchemaKeyword[]; }; /** * Narrowed api item type for sql. Sql does not have constants so all sql items are "functions". */ export type SqlApiItem = BaseSchemaApiItem; /** * Describes a keyword used in a function */ interface SchemaKeyword { /** * The name of the keyword. */ name: string; /** * The description for the keyword. */ description: string; /** * (optional) position of the keyword in the function signature, default is to interlace with parameters */ position?: number; } export {};