/** * info.ts * * Convert [path.ts](./path.ts) data into actual viewable introspection details */ import { Path } from '../load.types'; interface InfoBase { type: string; start: number; end: number; } interface InfoColumn extends InfoBase { type: 'Column'; name: string; source?: string; schema?: string; } interface InfoEnumVariant extends InfoBase { type: 'EnumVariant'; column: InfoColumn; } interface InfoSource extends InfoBase { type: 'Source'; name: string; schema?: string; } interface InfoTable extends InfoBase { type: 'Table'; name: string; schema?: string; } interface InfoSchema extends InfoBase { name: string; type: 'Schema'; } interface InfoCast extends InfoBase { name: string; type: 'Cast'; } interface InfoFunction extends InfoBase { name: string; type: 'Function'; schema?: string; } /** * The closest point of interest at a given position */ export declare type Info = InfoColumn | InfoSource | InfoSchema | InfoTable | InfoEnumVariant | InfoCast | InfoFunction; /** * Determine the closest point of interest ({@link Info}) from a path to a given position in the sql AST */ export declare const pathToInfo: (path: Path) => Info | undefined; export {};