Use LCP to generate LogicalOperator boost serialization
Summary: Since we are moving from boost to Capnp for serialization, it makes sense to keep all of the LogicalOperator classes in LCP format. This will make it easier to generate Capnp code. Depends on D1361 Reviewers: buda, mferencevic, msantl, dgleich, ipaljak, mculinovic, mtomic Reviewed By: mtomic Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1362
This commit is contained in:
parent
632663dca5
commit
30506f44f5
3
.gitignore
vendored
3
.gitignore
vendored
@ -37,3 +37,6 @@ TAGS
|
|||||||
# Cap'n Proto generated files
|
# Cap'n Proto generated files
|
||||||
*.capnp.c++
|
*.capnp.c++
|
||||||
*.capnp.h
|
*.capnp.h
|
||||||
|
|
||||||
|
# LCP generated C++ files
|
||||||
|
src/query/plan/operator.hpp
|
||||||
|
@ -94,6 +94,8 @@ function(add_lcp lcp_file)
|
|||||||
set(generated_lcp_files ${generated_lcp_files} ${h_file} PARENT_SCOPE)
|
set(generated_lcp_files ${generated_lcp_files} ${h_file} PARENT_SCOPE)
|
||||||
endfunction(add_lcp)
|
endfunction(add_lcp)
|
||||||
|
|
||||||
|
add_lcp(query/plan/operator.lcp)
|
||||||
|
|
||||||
add_custom_target(generate_lcp DEPENDS ${generated_lcp_files})
|
add_custom_target(generate_lcp DEPENDS ${generated_lcp_files})
|
||||||
|
|
||||||
# Use this function to add each capnp file to generation. This way each file is
|
# Use this function to add each capnp file to generation. This way each file is
|
||||||
|
@ -243,17 +243,18 @@
|
|||||||
(defun boost-serialization (cpp-class)
|
(defun boost-serialization (cpp-class)
|
||||||
"Add boost serialization code to `CPP-CLASS'."
|
"Add boost serialization code to `CPP-CLASS'."
|
||||||
(labels ((get-serialize-code (member-name serialize-fun)
|
(labels ((get-serialize-code (member-name serialize-fun)
|
||||||
(make-raw-cpp
|
(if serialize-fun
|
||||||
:string
|
;; Invoke or use serialize-fun
|
||||||
(if serialize-fun
|
(ctypecase serialize-fun
|
||||||
(etypecase serialize-fun
|
((or string raw-cpp) serialize-fun)
|
||||||
(string serialize-fun)
|
(function
|
||||||
(raw-cpp (raw-cpp-string serialize-fun))
|
(let ((res (funcall serialize-fun "ar" member-name)))
|
||||||
(function
|
(check-type res (or raw-cpp string))
|
||||||
(let ((res (funcall serialize-fun "ar" member-name)))
|
res)))
|
||||||
(check-type res (or raw-cpp string))
|
;; Else use the default serialization
|
||||||
res)))
|
#>cpp
|
||||||
(format nil "ar & ~A;" member-name))))
|
ar & ${member-name};
|
||||||
|
cpp<#))
|
||||||
(save-member (member)
|
(save-member (member)
|
||||||
(get-serialize-code
|
(get-serialize-code
|
||||||
(cpp-member-name member :struct (cpp-class-structp cpp-class))
|
(cpp-member-name member :struct (cpp-class-structp cpp-class))
|
||||||
|
@ -1604,10 +1604,6 @@ std::vector<Symbol> Produce::ModifiedSymbols(const SymbolTable &table) const {
|
|||||||
return OutputSymbols(table);
|
return OutputSymbols(table);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<NamedExpression *> &Produce::named_expressions() {
|
|
||||||
return named_expressions_;
|
|
||||||
}
|
|
||||||
|
|
||||||
Produce::ProduceCursor::ProduceCursor(const Produce &self,
|
Produce::ProduceCursor::ProduceCursor(const Produce &self,
|
||||||
database::GraphDbAccessor &db)
|
database::GraphDbAccessor &db)
|
||||||
: self_(self), db_(db), input_cursor_(self_.input_->MakeCursor(db)) {}
|
: self_(self), db_(db), input_cursor_(self_.input_->MakeCursor(db)) {}
|
||||||
|
File diff suppressed because it is too large
Load Diff
2147
src/query/plan/operator.lcp
Normal file
2147
src/query/plan/operator.lcp
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user