FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mage/cpp/nodes_module/nodes_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
/
nodes_module
/
nodes_module.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
41 lines (31 loc) · 1.88 KB
Breadcrumbs
mage
/
cpp
/
nodes_module
/
nodes_module.cpp
Copy path
File metadata and controls
41 lines (31 loc) · 1.88 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
32
33
34
35
36
37
38
39
40
41
#
include
<
cstddef
>
#
include
<
mgp.hpp
>
#
include
"
algorithm/nodes.hpp
"
extern
"
C
"
int
mgp_init_module
(
struct
mgp_module
*
module
,
struct
mgp_memory
*memory) {
try
{
mgp::MemoryDispatcherGuard guard{memory};
AddProcedure
(Nodes::Link,
std::string
(Nodes::
kProcedureLink
).
c_str
(), mgp::ProcedureType::Write,
{
mgp::Parameter
(
std::string
(Nodes::
kArgumentNodesLink
).
c_str
(), {mgp::Type::List, mgp::Type::Node}),
mgp::Parameter
(
std::string
(Nodes::
kArgumentTypeLink
).
c_str
(), mgp::Type::String)},
{},
module
, memory);
AddProcedure
(
Nodes::RelationshipTypes, Nodes::
kProcedureRelationshipTypes
, mgp::ProcedureType::Read,
{
mgp::Parameter
(Nodes::
kRelationshipTypesArg1
, mgp::Type::Any),
mgp::Parameter
(Nodes::
kRelationshipTypesArg2
, {mgp::Type::List, mgp::Type::String},
mgp::Value
(mgp::List{}))},
{
mgp::Return
(Nodes::
kResultRelationshipTypes
, {mgp::Type::List, mgp::Type::Map})},
module
, memory);
AddProcedure
(Nodes::Delete, Nodes::
kProcedureDelete
, mgp::ProcedureType::Write,
{
mgp::Parameter
(Nodes::
kDeleteArg1
, mgp::Type::Any)}, {},
module
, memory);
AddProcedure
(Nodes::RelationshipsExist,
std::string
(Nodes::
kProcedureRelationshipsExist
).
c_str
(),
mgp::ProcedureType::Read,
{
mgp::Parameter
(
std::string
(Nodes::
kArgumentNodesRelationshipsExist
).
c_str
(),
{mgp::Type::List, mgp::Type::Any}),
mgp::Parameter
(
std::string
(Nodes::
kArgumentRelationshipsRelationshipsExist
).
c_str
(),
{mgp::Type::List, mgp::Type::String})},
{
mgp::Return
(
std::string
(Nodes::
kReturnRelationshipsExist
).
c_str
(), {mgp::Type::Map, mgp::Type::Any})},
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