-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ghislain Fourny
committed
Jul 31, 2024
1 parent
ff247cf
commit 4b51c0d
Showing
5 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/test/resources/test_files/runtime/Updating/MultipleUpdatesObject5.jq
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(:JIQS: ShouldRun; Output="{ "b" : 2, "c" : 3, "d" : 4 }" :) | ||
copy $je := {"a": 1, "b": 2, "c": 3, "d": 4} | ||
modify (delete $je.a, replace value of $je.a with 5) | ||
modify (delete json $je.a, replace value of json $je.a with 5) | ||
return $je |
2 changes: 1 addition & 1 deletion
2
src/test/resources/test_files/runtime/Updating/SimpleInsertErr10.jq
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
(:JIQS: ShouldCrash; ErrorCode="JNUP0016"; ErrorMetadata="LINE:3:COLUMN:7:" :) | ||
copy $je := [1 to 4] | ||
modify insert 5 into $je at position 6 | ||
modify insert json 5 into $je at position 6 | ||
return $je | ||
|
||
(: selector expr does not evaluate to int within range of the target array :) |
2 changes: 1 addition & 1 deletion
2
src/test/resources/test_files/runtime/Updating/SimpleUpdateErr1.jq
This file contains 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(:JIQS: ShouldCrash; ErrorCode="RBDY0007"; ErrorMetadata="LINE:3:COLUMN:7:" :) | ||
let $data := {"bool" : true, "int": 10} | ||
return delete $data.bool | ||
return delete json $data.bool | ||
|
||
(: attempt to modify immutable variable :) |
4 changes: 2 additions & 2 deletions
4
src/test/resources/test_files/runtime/Updating/UpdatingFLWORErr1.jq
This file contains 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
(:JIQS: ShouldCrash; ErrorCode="XUST0001"; ErrorMetadata="LINE:4:COLUMN:8:" :) | ||
copy $je := { "a" : {"foo" : 1}} | ||
modify | ||
let $l := rename $je.a.foo as "b" | ||
let $l := rename json $je.a.foo as "b" | ||
return | ||
rename $l.foo as "b" | ||
rename json $l.foo as "b" | ||
return $je | ||
|
||
(: expr in let clause is not simple :) |
This file contains 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