interface AlaSQLAST {
    where?: any;
    columns?: any[];
    from?: any[];
    joins?: any[];
    order?: any[];
    group?: any[];
    limit?: any;
    offset?: any;
    toString(): string;
}
declare class SQLSearch {
    statement: AlaSQLAST;
    columns: Record<string, any[]>;
    all_table_attributes: any[];
    fetch_attributes: any[];
    exact_search_values: Record<string, {
        ignore: boolean;
        values: Set<any>;
    }>;
    comparator_search_values: Record<string, {
        ignore: boolean;
        comparators: any[];
    }>;
    tables: {
        databaseid: string;
        tableid: string;
        as: string;
    }[];
    data: Record<string, any>;
    has_aggregator: boolean;
    has_ordinal: boolean;
    has_outer_join: boolean;
    /**
     * Constructor for FileSearch class
     *
     * @param statement - the AST for the SQL SELECT to process
     * @param attributes - all attributes that are part of the schema for the tables in select
     */
    constructor(statement: any, attributes: any);
    /**
     * Starting point function to execute the search
     * @returns {Promise<results|finalResults[]|Array>}
     */
    search(): Promise<any>;
    /**
     * Gets the raw column from each section of the statement and puts them in a map
     * @private
     */
    _getColumns(): void;
    /**
     * Extracts the table info from the attributes
     * @private
     */
    _getTables(): void;
    /**
     * Iterates the where AST with the goal of finding exact values to match directly on. Matching on values allows us to skip parsing an index
     * If a condition has a columnid, and op of '=' or 'IN' and only is comparing to raw values we will limit the column to the raw value match.
     * If a column condition does not have these criteria or another condition for the same column does not adhere to the criteria then we ignore it for exact matching.
     * @private
     */
    _conditionsToFetchAttributeValues(): void;
    /**
     * Iterates the columns in the AST and assigns an alias to each column if one does not exist.  This is necessary to ensure
     * that the final result returned from alasql include the correct column header
     * @private
     */
    _setAliasesForColumns(): void;
    /**
     * Searches the attributes for the matching column based on attribute & table name/alias
     *
     * @param column - the column to search for
     * @returns {foundColumns}
     * @private
     */
    _findColumn(column: any): any;
    /**
     * This function check to see if there is no from and no columns, or the table has been created but no data has been entered yet
     * if there are not then this is a SELECT used to solely perform a calculation such as SELECT 2*4, or SELECT SQRT(4)
     * @returns {Promise<[]>}
     * @private
     */
    _checkEmptySQL(): Promise<any[]>;
    /**
     * Iterates an ast segment columns and returns the found column.  Typically fetch columns are columns specified in a
     * join, where, or orderby clause.
     * @param segmentAttributes
     * @private
     */
    _addFetchColumns(segmentAttributes: any): void;
    /**
     * Adds new attribute metadata for the specified table to enable more easily accessing/adding/updating row data being built out
     * @param schemaTable <String> the table to add the metadata to
     * @param attr <String> the attribute to add to the table row metadata
     * @private
     */
    _addColumnToMergedAttributes(schemaTable: any, attr: any): void;
    /**
     * Adds the hash attribute to the specified table - this is similar to the above but unique for hash attributes because we always
     * add hash keys to the first index position in the table metadata and do not need to add it to the `__mergedAttrMap`
     * @param schemaTable <String> the table to add the metadata to
     * @param hashValue <String> the hash key to add to the table row metadata
     * @private
     */
    _setMergedHashAttribute(schemaTable: any, hashValue: any): void;
    /**
     * Updates the table row data for a specific hash value
     * @param schemaTable <String> the table to update the hash value row in
     * @param hashValue <String> the hash value to update an attr for
     * @param attr <String> the attr to update in the table row
     * @param updateValue <String> the value to update in the table row
     * @private
     */
    _updateMergedAttribute(schemaTable: any, hashValue: any, attr: any, updateValue: any): void;
    /**
     * Gets all values for the where, join, & order by attributes and converts the raw indexed data into individual
     * rows by hash attribute consolidated based on tables. If the SQL statement is a simple SELECT query, this method
     * will return the results from that select and bypass the additional alasql steps.
     * @returns {Promise<void>}
     * @private
     */
    _getFetchAttributeValues(): Promise<any[]>;
    /**
     * Checks if SQL statement only includes basic SELECT columns FROM one table
     * @returns {boolean} is SQL statement a simple select
     * @private
     */
    _isSimpleSelect(): boolean;
    /**
     * Updates the AST order by values to utilize the aliases already set for the corresponding column values.  This is required to
     * resolve a bug in alasql where column values/references in the order by are not parsed by the library correctly.
     * @private
     */
    _updateOrderByToAliases(): void;
    /**
     * This ensures that the non-aggregator columns included in the order by statement are included in the table data for the
     * first pass of alasql
     * @private
     */
    _addNonAggregatorsToFetchColumns(): void;
    /**
     * Takes an initial pass on the data by processing just the joins, conditions and order by.
     * This allows us to limit the broader select based on just the ids we need based on this pass
     * @returns {Promise<{existing_attributes: any, joined_length: number}>}
     * @private
     */
    _processJoins(): Promise<{
        existing_attributes: any;
        joined_length: number;
    }>;
    /**
     * Gets remaining attribute values for final SQL operation that were not grabbed during first pass
     * @param existingAttributes
     * @param rowCount
     * @returns {Promise<void>}
     * @private
     */
    _getFinalAttributeData(existingAttributes: any, rowCount: any): Promise<void>;
    /**
     * Organizes the final data searches based on tables being search to ensure we are only searching each table once
     * @param allColumns - remaining columns to be searched in
     * @returns {Promise<void>}
     * @private
     */
    _getData(allColumns: any): Promise<void>;
    /**
     * Takes all of the raw data and executes the full SQL from the AST against the data.
     * @returns {Promise<[finalResults]>}
     * @private
     */
    _finalSQL(): Promise<any>;
    /**
     * Translates undefined values to nulls in the result data
     * @param data
     * @returns {any[]}
     * @private
     */
    _translateUndefinedValues(data: any): any[];
    /**
     * There is a bug in alasql where functions with aliases get their alias duplicated in the sql string.
     * we need to parse out the duplicate and replace with an empty string
     * @returns {string}
     * @private
     */
    _buildSQL(callConvertToIndexes?: boolean): string;
    /**
     * Updates the sqlStatment string to use index values instead of table column names
     * @param sqlStatement
     * @param tables
     * @returns {string}
     * @private
     */
    _convertColumnsToIndexes(sqlStatement: any, tables: any): string;
    /**
     * Builds out the final result JSON for a simple SQL query to return to the main search method without using alasql
     * @returns {Promise<any[]>}
     * @private
     */
    _simpleSQLQuery(): Promise<any[]>;
}
export default SQLSearch;
