This repository was archived by the owner on Jan 23, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
[main < T622] Add convert str2object #326
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
de3e42b
add initial structure
8a0816a
implement date.parse
bc74ca0
remove cpp date module
1f3de7e
rename python date module
d3bae6b
remove cpp date module
7653423
add date.format draft
92360ea
add e2e date.format tests
f322d38
implement label.exists and e2e tests for it
39bec4e
add missing endline
5b41866
edit wrong procedure call
eb487ab
edit by review comments
84464b4
edit typing error
5a863a3
format files with black
71c6435
Merge branch 'main' into T585-T586-MAGE-implement-date
antoniofilipovic 995fe4d
Merge branch 'main' into T585-T586-MAGE-implement-date
imilinovic cdd5071
Merge branch 'main' into T585-T586-MAGE-implement-date
antoniofilipovic 07ed16d
Merge branch 'main' into T510-MAGE-implement-label
ind1xa 158919a
Merge pull request #304 from memgraph/T510-MAGE-implement-label
antepusic 456a7ba
Merge branch 'main' into T585-T586-MAGE-implement-date
ind1xa e59093a
Merge pull request #291 from memgraph/T585-T586-MAGE-implement-date
antepusic ca33435
COnvert
mpintaric55334 85458a3
Implement convert str2object
mpintaric55334 476066c
Implement str2object
mpintaric55334 4e59952
Implement str2object
mpintaric55334 0b34173
Implement str2object
mpintaric55334 c39f0cd
merge
mpintaric55334 2aca436
Merge branch 'main' of https://github.com/memgraph/mage
mpintaric55334 1536e1c
Formatting changes
mpintaric55334 731774f
Pull
mpintaric55334 fa5f222
Merge branch 'main' of https://github.com/memgraph/mage
mpintaric55334 0cc8e82
Merge branch 'main' of https://github.com/memgraph/mage
mpintaric55334 7b334da
Merge branch 'main' of https://github.com/memgraph/mage
mpintaric55334 a180784
Merge branch 'main' into T-add-convert-str2object
mpintaric55334 df2c4f5
PR changes
mpintaric55334 c8fa616
Merge branch 'main' into T-add-convert-str2object
mpintaric55334 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| "_id","_labels","a","b","prop","did_it","_start","_end","_type" | ||
| "0",":Dog","3","[""1"", ""2"", 3]","2","","","","" | ||
| "1",":Human","","[[""1"",{""key"": 5}]]","","yes","","","" | ||
| "5",":Cat","","{""prop"": {""prop2"": {""key"": 10}}}","","","0","1","loves" |
Empty file.
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,8 @@ | ||
| query: > | ||
| LOAD CSV FROM "/_file1" WITH header AS row | ||
| RETURN convert.str2object(row.b) AS list; | ||
|
|
||
| output: | ||
| - list: [ "1","2", 3] | ||
| - list: [["1",{"key": 5}]] | ||
| - list: {"prop": {"prop2": {"key": 10}}} | ||
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,9 @@ | ||
| import mgp | ||
| from json import loads | ||
|
|
||
|
|
||
| @mgp.function | ||
| def str2object(string: str) -> mgp.Any: | ||
| if string: | ||
| return loads(string) | ||
|
antoniofilipovic marked this conversation as resolved.
|
||
| return None | ||
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.