FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mage/cpp/merge_module/merge_module.cpp at main · memgraph/mage · GitHub
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
memgraph
/
mage
Public archive
Notifications
You must be signed in to change notification settings
Fork
35
Star
331
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
mage
/
cpp
/
merge_module
/
merge_module.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (25 loc) · 1.58 KB
Breadcrumbs
mage
/
cpp
/
merge_module
/
merge_module.cpp
Copy path
File metadata and controls
31 lines (25 loc) · 1.58 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#
include
<
mgp.hpp
>
#
include
"
algorithm/merge.hpp
"
extern
"
C
"
int
mgp_init_module
(
struct
mgp_module
*
module
,
struct
mgp_memory
*memory) {
try
{
mgp::MemoryDispatcherGuard guard{memory};
AddProcedure
(Merge::Node,
std::string
(Merge::
kProcedureNode
).
c_str
(), mgp::ProcedureType::Write,
{
mgp::Parameter
(
std::string
(Merge::
kNodeArg1
).
c_str
(), {mgp::Type::List, mgp::Type::String}),
mgp::Parameter
(
std::string
(Merge::
kNodeArg2
).
c_str
(), {mgp::Type::Map, mgp::Type::Any}),
mgp::Parameter
(
std::string
(Merge::
kNodeArg3
).
c_str
(), {mgp::Type::Map, mgp::Type::Any}),
mgp::Parameter
(
std::string
(Merge::
kNodeArg4
).
c_str
(), {mgp::Type::Map, mgp::Type::Any})},
{
mgp::Return
(
std::string
(Merge::
kNodeRes
).
c_str
(), mgp::Type::Node)},
module
, memory);
AddProcedure
(Merge::Relationship, Merge::
kProcedureRelationship
, mgp::ProcedureType::Write,
{
mgp::Parameter
(Merge::
kRelationshipArg1
, mgp::Type::Node),
mgp::Parameter
(Merge::
kRelationshipArg2
, mgp::Type::String),
mgp::Parameter
(Merge::
kRelationshipArg3
, mgp::Type::Map),
mgp::Parameter
(Merge::
kRelationshipArg4
, mgp::Type::Map),
mgp::Parameter
(Merge::
kRelationshipArg5
, mgp::Type::Node),
mgp::Parameter
(Merge::
kRelationshipArg6
, mgp::Type::Map)},
{
mgp::Return
(Merge::
kRelationshipResult
, mgp::Type::Relationship)},
module
, memory);
}
catch
(
const
std::exception &e) {
return
1
;
}
return
0
;
}
extern
"
C
"
int
mgp_shutdown_module
() {
return
0
; }
Back
|
FazBrowse Home
|
New Git URL