Open rshensy opened 8 years ago
I tested this tool set by some queries on https://github.com/ghislainfourny/jsoniq-tutorial
They failed.
Failed case one: let $stores := [ { "store number" : 1, "state" : "MA" }, { "store number" : 2, "state" : "MA" }, { "store number" : 3, "state" : "CA" }, { "store number" : 4, "state" : "CA" } ] let $sales := [ { "product" : "broiler", "store number" : 1, "quantity" : 20 }, { "product" : "toaster", "store number" : 2, "quantity" : 100 }, { "product" : "toaster", "store number" : 2, "quantity" : 50 }, { "product" : "toaster", "store number" : 3, "quantity" : 50 }, { "product" : "blender", "store number" : 3, "quantity" : 100 }, { "product" : "blender", "store number" : 3, "quantity" : 150 }, { "product" : "socks", "store number" : 1, "quantity" : 500 }, { "product" : "socks", "store number" : 2, "quantity" : 10 }, { "product" : "shirt", "store number" : 3, "quantity" : 10 } ] let $join := for $store in $stores[], $sale in $sales[] where $store."store number" = $sale."store number" return { "nb" : $store."store number", "state" : $store.state, "sold" : $sale.product } return [$join]
Failed case two: copy $people := { "John" : { "status" : "single" }, "Mary" : { "status" : "single" } } modify (replace value of json $people.John.status with "married", replace value of json $people.Mary.status with "married") return $people
Failed case three: let $x := "Bearing 3 1 4 Mark 5. " return concat($x, "Engage!")
I tested this tool set by some queries on https://github.com/ghislainfourny/jsoniq-tutorial
They failed.
Failed case one: let $stores := [ { "store number" : 1, "state" : "MA" }, { "store number" : 2, "state" : "MA" }, { "store number" : 3, "state" : "CA" }, { "store number" : 4, "state" : "CA" } ] let $sales := [ { "product" : "broiler", "store number" : 1, "quantity" : 20 }, { "product" : "toaster", "store number" : 2, "quantity" : 100 }, { "product" : "toaster", "store number" : 2, "quantity" : 50 }, { "product" : "toaster", "store number" : 3, "quantity" : 50 }, { "product" : "blender", "store number" : 3, "quantity" : 100 }, { "product" : "blender", "store number" : 3, "quantity" : 150 }, { "product" : "socks", "store number" : 1, "quantity" : 500 }, { "product" : "socks", "store number" : 2, "quantity" : 10 }, { "product" : "shirt", "store number" : 3, "quantity" : 10 } ] let $join := for $store in $stores[], $sale in $sales[] where $store."store number" = $sale."store number" return { "nb" : $store."store number", "state" : $store.state, "sold" : $sale.product } return [$join]
Failed case two: copy $people := { "John" : { "status" : "single" }, "Mary" : { "status" : "single" } } modify (replace value of json $people.John.status with "married", replace value of json $people.Mary.status with "married") return $people
Failed case three: let $x := "Bearing 3 1 4 Mark 5. " return concat($x, "Engage!")