import { type Nql, type NqlBudget, type NqlField, type NqlFilterExpression, type NqlPreSelectExpression, type NqlTable, type NqlWhere } from "./types"; /** * Retrieves the WHERE clause from the given NQL (Nested Query Language) string and returns a parsed NqlWhereClause object. * * @param {string} nql - The NQL string to extract the WHERE clause from. * @returns {NqlWhereClause} - The parsed NqlWhereClause object representing the WHERE clause. * @throws {Error} - Throws an error if no WHERE clause is found in the NQL string. */ export declare function getWhere(nql: string): NqlWhere; /** * Retrieves the tables from the given NQL (Nested Query Language) string and returns an array of parsed NqlTable objects. * * @param {string} nql - The NQL string to extract the tables from. * @returns {NqlTable[]} - An array of parsed NqlTable objects representing the tables. * @throws {Error} - Throws an error if no FROM clause is found in the NQL string. */ export declare function getFrom(nql: string): NqlTable[]; /** * Parses a field string into an NqlField object or a plain string if parsing fails. * * @param {string} fieldStr - The field string to parse. * @returns {NqlField | string} - The parsed NqlField object or the original field string if parsing fails. */ export declare function getFilterExpressionFromString(str: string): NqlFilterExpression; /** * Parses the pre-select expression from the given NQL (Natural Query Language) string. * * @function getPreSelect * @param {string} nql - The NQL string to parse. * @returns {NqlPreSelectExpression | undefined} - The parsed pre-select expression object, or `undefined` if no valid pre-select expression is found. * @throws {Error} If the NQL string is invalid. */ export declare function getPreSelect(nql: string): NqlPreSelectExpression; /** * Builds a pre-select expression for an NQL (Natural Query Language) query based on the provided pre-select expression. * * @param {NqlPreSelectExpression} preSelect - The pre-select expression. * @returns {string} - The built pre-select expression string. * @throws {Error} - If the provided pre-select expression is invalid. */ export declare function buildPreSelect(preSelect: NqlPreSelectExpression): string; /** * Extracts and parses the selected fields from the given NQL (Natural Query Language) string. * * @function getSelect * @param {string} nql - The NQL string containing the SELECT statement. * @returns {NqlField[]} - An array of parsed NqlField objects representing the selected fields. * @throws {Error} - If no selected fields are found or if a field is invalid. */ export declare function getSelect(nql: string): NqlField[]; /** * Builds a SELECT clause for an NQL (Natural Query Language) query based on the provided fields. * * @param {NqlField[]} fields - An array of NqlField objects representing the selected fields. * @returns {string} - The built SELECT clause string. * @throws {Error} - If any of the provided fields are invalid. */ export declare function buildSelect(fields: NqlField[]): string; /** * Parses a string in NQL format and returns an NqlBudgetType object. * * @function getLimit * @param {string} nql - The NQL string to parse. * @returns {NqlBudget} - The parsed budget object. * @throws {Error} If the NQL string is invalid. */ export declare function getLimit(nql: string): NqlBudget; /** * Builds a LIMIT clause for an NQL (Narrative Query Language) query based on the provided budget object. * * @param {NqlBudget} budget - The budget object containing the limit values. * @returns {string} - The LIMIT clause string. * @throws {Error} - If the provided budget object is invalid. */ export declare function buildLimit(budget: NqlBudget): string; type Strict = true; type NotStrict = false; export declare function buildNql(nql: Nql, strict?: Strict): string; export declare function buildNql(nql: Nql | SemanticNql, strict?: NotStrict): string; export declare function buildFrom(from: NqlTable): string; export declare function buildWhere(where: NqlWhere): string; export declare function buildField(field: NqlField | string | number | boolean): string; type ParseType = "full" | "semantic"; type SemanticNql = Omit; export declare function getNqlObject(nql: string, type?: T): T extends "full" ? Nql : SemanticNql; export declare function createSemanticWhere(expressionContainer: NqlWhere): NqlWhere; export {};