Add typed parameterization to query expression evaluator tests
This commit is contained in:
@@ -514,8 +514,9 @@ auto GetForeach(AstStorage &storage, NamedExpression *named_expr, const std::vec
|
||||
#define CREATE(...) \
|
||||
memgraph::query::test_common::GetWithPatterns(storage.Create<memgraph::query::Create>(), {__VA_ARGS__})
|
||||
#define IDENT(...) storage.Create<memgraph::query::Identifier>(__VA_ARGS__)
|
||||
#define LITERAL(val) storage.Create<memgraph::query::PrimitiveLiteral>((val))
|
||||
#define LIST(...) storage.Create<memgraph::query::ListLiteral>(std::vector<memgraph::query::Expression *>{__VA_ARGS__})
|
||||
#define LITERAL(val) storage.template Create<memgraph::query::PrimitiveLiteral>((val))
|
||||
#define LIST(...) \
|
||||
storage.template Create<memgraph::query::ListLiteral>(std::vector<memgraph::query::Expression *>{__VA_ARGS__})
|
||||
#define MAP(...) \
|
||||
storage.Create<memgraph::query::MapLiteral>( \
|
||||
std::unordered_map<memgraph::query::PropertyIx, memgraph::query::Expression *>{__VA_ARGS__})
|
||||
@@ -584,9 +585,9 @@ auto GetForeach(AstStorage &storage, NamedExpression *named_expr, const std::vec
|
||||
#define IN_LIST(expr1, expr2) storage.Create<memgraph::query::InListOperator>((expr1), (expr2))
|
||||
#define IF(cond, then, else) storage.Create<memgraph::query::IfOperator>((cond), (then), (else))
|
||||
// Function call
|
||||
#define FN(function_name, ...) \
|
||||
storage.Create<memgraph::query::Function>(memgraph::utils::ToUpperCase(function_name), \
|
||||
std::vector<memgraph::query::Expression *>{__VA_ARGS__})
|
||||
#define FN(function_name, ...) \
|
||||
storage.template Create<memgraph::query::Function>(memgraph::utils::ToUpperCase(function_name), \
|
||||
std::vector<memgraph::query::Expression *>{__VA_ARGS__})
|
||||
// List slicing
|
||||
#define SLICE(list, lower_bound, upper_bound) \
|
||||
storage.Create<memgraph::query::ListSlicingOperator>(list, lower_bound, upper_bound)
|
||||
@@ -602,7 +603,8 @@ auto GetForeach(AstStorage &storage, NamedExpression *named_expr, const std::vec
|
||||
#define REDUCE(accumulator, initializer, variable, list, expr) \
|
||||
storage.Create<memgraph::query::Reduce>(storage.Create<memgraph::query::Identifier>(accumulator), initializer, \
|
||||
storage.Create<memgraph::query::Identifier>(variable), list, expr)
|
||||
#define COALESCE(...) storage.Create<memgraph::query::Coalesce>(std::vector<memgraph::query::Expression *>{__VA_ARGS__})
|
||||
#define COALESCE(...) \
|
||||
storage.template Create<memgraph::query::Coalesce>(std::vector<memgraph::query::Expression *>{__VA_ARGS__})
|
||||
#define EXTRACT(variable, list, expr) \
|
||||
storage.Create<memgraph::query::Extract>(storage.Create<memgraph::query::Identifier>(variable), list, expr)
|
||||
#define EXISTS(pattern) storage.Create<memgraph::query::Exists>(pattern)
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "query/dump.hpp"
|
||||
#include "query/interpreter.hpp"
|
||||
#include "query/typed_value.hpp"
|
||||
#include "storage/v2/disk/storage.hpp"
|
||||
#include "storage/v2/edge_accessor.hpp"
|
||||
#include "storage/v2/inmemory/storage.hpp"
|
||||
#include "storage/v2/storage.hpp"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user