This repository was archived by the owner on Sep 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
feat: add neo4j support in modus #636
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b2c5a8f
add neo4j support in modus
jairad26 2b475fd
changelog
jairad26 a3abbe8
.
jairad26 b0d5f01
.
jairad26 9b88f38
updates
jairad26 e55511d
fix
jairad26 869c91e
.
jairad26 1fc7bea
add assemblyscript neo4j support
jairad26 caf95ee
.
jairad26 c94c55b
update names
jairad26 6fe13c6
revisions
jairad26 a295bc8
add double locking
jairad26 be54802
use json unmarshall
jairad26 8623545
update go sdk
jairad26 949493c
add assemblyscript fixes
jairad26 f54e8bf
Merge branch 'main' into jai/hyp-2726-add-neo4j-support-in-modus
jairad26 055c576
update sdks, fix as
jairad26 feabf3b
.
jairad26 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,6 +116,7 @@ | |
| "mydgraph", | ||
| "nanos", | ||
| "Nanotime", | ||
| "neo4jclient", | ||
| "nobuild", | ||
| "noescape", | ||
| "nolint", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /* | ||
| * Copyright 2024 Hypermode Inc. | ||
| * Licensed under the terms of the Apache License, Version 2.0 | ||
| * See the LICENSE file that accompanied this code for further details. | ||
| * | ||
| * SPDX-FileCopyrightText: 2024 Hypermode Inc. <[email protected]> | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package manifest | ||
|
|
||
| const ConnectionTypeNeo4j ConnectionType = "neo4j" | ||
|
|
||
| type Neo4jConnectionInfo struct { | ||
| Name string `json:"-"` | ||
| Type ConnectionType `json:"type"` | ||
| DbUri string `json:"dbUri"` | ||
| Username string `json:"username"` | ||
| Password string `json:"password"` | ||
| } | ||
|
|
||
| func (info Neo4jConnectionInfo) ConnectionName() string { | ||
| return info.Name | ||
| } | ||
|
|
||
| func (info Neo4jConnectionInfo) ConnectionType() ConnectionType { | ||
| return info.Type | ||
| } | ||
|
|
||
| func (info Neo4jConnectionInfo) Hash() string { | ||
| return computeHash(info.Name, info.Type, info.DbUri) | ||
| } | ||
|
|
||
| func (info Neo4jConnectionInfo) Variables() []string { | ||
| return append(extractVariables(info.Username), extractVariables(info.Password)...) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| * Copyright 2024 Hypermode Inc. | ||
| * Licensed under the terms of the Apache License, Version 2.0 | ||
| * See the LICENSE file that accompanied this code for further details. | ||
| * | ||
| * SPDX-FileCopyrightText: 2024 Hypermode Inc. <[email protected]> | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package hostfunctions | ||
|
|
||
| import ( | ||
| "fmt" | ||
|
|
||
| "github.com/hypermodeinc/modus/runtime/neo4jclient" | ||
| ) | ||
|
|
||
| func init() { | ||
| const module_name = "modus_neo4j_client" | ||
|
|
||
| registerHostFunction(module_name, "executeQuery", neo4jclient.ExecuteQuery, | ||
| withStartingMessage("Executing Neo4j query."), | ||
| withCompletedMessage("Completed Neo4j query."), | ||
| withCancelledMessage("Cancelled Neo4j query."), | ||
| withErrorMessage("Error executing Neo4j query."), | ||
| withMessageDetail(func(hostName, dbName, query string) string { | ||
| return fmt.Sprintf("Host: %s Database: %s Query: %s", hostName, dbName, query) | ||
| })) | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.