...
Notes | Decisions | ||
---|---|---|---|
|
More research needs to be done for the first proposed approach and need to document it in detail. | ||
As per discussion with Daniel Hanrahan and Lee Anjella Macabuhay it was decided to change the Query for retrieveing the data nodes such that it can get all data nodes that fall under a given list. The query change is based on an internal PoC prepared by Daniel through which we can retrieve all the list items by specifying the xpath of list without impacting the performance. | Change the Query to retrieve all the list items under a given list using its xPath |
Inconsistent response when retrieving data nodes.
...
"id" | "xpath" | "attributes" | "parent_id" |
---|---|---|---|
200 | "/bookstore/categories[@book-category='Kids']" | "{""name"": ""Kids book"", ""price"": 5000, ""stock"": true, ""book-category"": ""Kids""}" | 198 |
199 | "/bookstore/categories[@book-category='SciFi']" | "{""name"": ""Test book"", ""price"": 1000, ""stock"": false, ""book-category"": ""SciFi""}" | 198 |
198 | "/bookstore" | "{""store-name"": ""My Bookstore"", ""store-owner"": ""ABC""}" | null |
Code Block | ||
---|---|---|
| ||
WHERE anchor_id = :anchorId AND xpath = ANY (:xpaths) |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| [
| |||||||
[ { "stores:bookstore": { "store-name": "My Bookstore", { "stores:bookstorestore-owner": {"ABC", "categories": [ { "name": "Test book", "price": 1000, "stock": false, "book-category": "SciFi" }, { "name": "Kids book", "price": 5000, "stock": true, "book-category": "Kids" } ], "store-name": "My Bookstore", "store-owner": "ABC" } } ] |
Here we can see that in the response we get a parent node bookstore and the list named "categories", as its child, and the list items identified by keys "SciFi" and "Kids" respectively.
...