export = SQLSearch;
declare class SQLSearch {
    /**
     * 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);
    statement: any;
    columns: {};
    all_table_attributes: any;
    fetch_attributes: any[];
    exact_search_values: {};
    comparator_search_values: {};
    tables: any[];
    data: {};
    has_aggregator: boolean;
    has_ordinal: boolean;
    has_outer_join: boolean;
    /**
     * Starting point function to execute the search
     * @returns {Promise<results|finalResults[]|Array>}
     */
    search(): Promise<results | finalResults[] | any[]>;
    /**
     * Gets the raw column from each section of the statement and puts them in a map
     * @private
     */
    private _getColumns;
    /**
     * Extracts the table info from the attributes
     * @private
     */
    private _getTables;
    /**
     * 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
     */
    private _conditionsToFetchAttributeValues;
    /**
     * 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
     */
    private _setAliasesForColumns;
    /**
     * Searches the attributes for the matching column based on attribute & table name/alias
     *
     * @param column - the column to search for
     * @returns {foundColumns}
     * @private
     */
    private _findColumn;
    /**
     * 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
     */
    private _checkEmptySQL;
    /**
     * 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
     */
    private _addFetchColumns;
    /**
     * 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
     */
    private _addColumnToMergedAttributes;
    /**
     * 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
     */
    private _setMergedHashAttribute;
    /**
     * 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
     */
    private _updateMergedAttribute;
    /**
     * 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
     */
    private _getFetchAttributeValues;
    /**
     * Checks if SQL statement only includes basic SELECT columns FROM one table
     * @returns {boolean} is SQL statement a simple select
     * @private
     */
    private _isSimpleSelect;
    /**
     * 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
     */
    private _updateOrderByToAliases;
    /**
     * 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
     */
    private _addNonAggregatorsToFetchColumns;
    /**
     * 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<{existingAttributes, joined_length: number}>}
     * @private
     */
    private _processJoins;
    /**
     * Gets remaining attribute values for final SQL operation that were not grabbed during first pass
     * @param existingAttributes
     * @param rowCount
     * @returns {Promise<void>}
     * @private
     */
    private _getFinalAttributeData;
    /**
     * 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
     */
    private _getData;
    /**
     * Takes all of the raw data and executes the full SQL from the AST against the data.
     * @returns {Promise<[finalResults]>}
     * @private
     */
    private _finalSQL;
    _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
     */
    private _buildSQL;
    /**
     * Updates the sqlStatment string to use index values instead of table column names
     * @param sqlStatement
     * @param tables
     * @returns {*}
     * @private
     */
    private _convertColumnsToIndexes;
    /**
     * Builds out the final result JSON for a simple SQL query to return to the main search method without using alasql
     * @returns {Promise<unknown[]>}
     * @private
     */
    private _simpleSQLQuery;
}
