@braindb/remark-dataview
Version:
markdown-graph-content-layer-database
34 lines (33 loc) • 903 B
TypeScript
import nodeSql from "node-sql-parser";
import { List, Root } from "mdast";
export declare const processMeta: (meta?: string) => Record<string, any>;
export declare function parse(query: string): nodeSql.Select;
type Column = {
dv: false;
name: string;
} | {
dv: true;
name: string;
func: string;
args: string[];
};
export declare function transform(query: nodeSql.Select): {
query: string;
columns: Column[];
};
export declare const generateTable: (columns: Column[], rows: any[]) => "empty" | "wrong result" | {
type: string;
align: string[];
children: {
type: string;
children: {
type: string;
children: any;
}[];
}[];
};
type GenerateListOptions = {
root_class?: string;
};
export declare const generateList: (columns: Column[], rows: any[], options?: GenerateListOptions) => List | Root;
export {};