initial support for aggregate functions
This commit is contained in:
20
usql.h
20
usql.h
@@ -35,10 +35,10 @@ private:
|
||||
private:
|
||||
static bool eval_where(Node *where, Table *table, Row &row) ;
|
||||
|
||||
static std::unique_ptr<ValueNode> eval_value_node(Table *table, Row &row, Node *node);
|
||||
static std::unique_ptr<ValueNode> eval_value_node(Table *table, Row &row, Node *node, ColDefNode *col_def_node, ColValue *agg_func_value);
|
||||
static std::unique_ptr<ValueNode> eval_database_value_node(Table *table, Row &row, Node *node);
|
||||
static std::unique_ptr<ValueNode> eval_literal_value_node(Table *table, Row &row, Node *node);
|
||||
static std::unique_ptr<ValueNode> eval_function_value_node(Table *table, Row &row, Node *node);
|
||||
static std::unique_ptr<ValueNode> eval_function_value_node(Table *table, Row &row, Node *node, ColDefNode *col_def_node, ColValue *agg_func_value);
|
||||
|
||||
|
||||
static bool eval_relational_operator(const RelationalOperatorNode &filter, Table *table, Row &row) ;
|
||||
@@ -60,6 +60,22 @@ private:
|
||||
static void execute_distinct(SelectFromTableNode &node, Table *result) ;
|
||||
static void execute_order_by(SelectFromTableNode &node, Table *table, Table *result) ;
|
||||
static void execute_offset_limit(OffsetLimitNode &node, Table *result) ;
|
||||
|
||||
void expand_asterix_char(SelectFromTableNode &node, Table *table) const;
|
||||
|
||||
bool check_for_aggregate_only_functions(SelectFromTableNode &node, int result_cols_cnt) const;
|
||||
|
||||
static std::unique_ptr<ValueNode> lower_function(const std::vector<std::unique_ptr<ValueNode>> &evaluatedPars);
|
||||
static std::unique_ptr<ValueNode> upper_function(const std::vector<std::unique_ptr<ValueNode>> &evaluatedPars);
|
||||
static std::unique_ptr<ValueNode> to_date_function(const std::vector<std::unique_ptr<ValueNode>> &evaluatedPars);
|
||||
static std::unique_ptr<ValueNode> to_string_function(const std::vector<std::unique_ptr<ValueNode>> &evaluatedPars);
|
||||
static std::unique_ptr<ValueNode> pp_function(const std::vector<std::unique_ptr<ValueNode>> &evaluatedPars);
|
||||
|
||||
static std::unique_ptr<ValueNode> max_function(const std::vector<std::unique_ptr<ValueNode>> &evaluatedPars, const ColDefNode *col_def_node, ColValue *agg_func_value);
|
||||
static std::unique_ptr<ValueNode> min_function(const std::vector<std::unique_ptr<ValueNode>> &evaluatedPars, const ColDefNode *col_def_node, ColValue *agg_func_value);
|
||||
|
||||
static std::unique_ptr<ValueNode>
|
||||
count_function(ColValue *agg_func_value, const std::vector<std::unique_ptr<ValueNode>> &evaluatedPars);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
Reference in New Issue
Block a user