Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return new types added in cypher as maps.
The returned map will contains a `type` entry to indicate the type of the returned object. If the object is present at the top level of the result (in `data`), besides the value returned in `row`, the type of this object is also returned in `meta`. This approach is based on the assumption that the `map` type could only be returned at the top level of the result (in `data`). Any map that returned as part of a lager result, such as a property on a node could not be a map but a point, a temporal, etc. Therefore with the conbination of the type info inside the map object and the meta data, there is no ambiguousness to decide whether the returned object is a real map or a new data type. For example, if the result contains a single `Duration`, the entity of Rest response will be like: ``` { "results":[{ "columns":["d"], "data":[{ "row":[{"type":"duration","value":"P17D"}], "meta":[{"type":"duration"}] }] }], "errors":[] } ``` If the result contains a node who has a property of `LocalDateTime` type, then the return json response would be like ``` { "results":[{ "columns":["account"], "data":[{ "row":[{ "creationTime":{"type":"localdatetime","value":"1984-10-21T12:34"}, "name":"zhen" }], "meta":[{ "id":0, "type":"node", "deleted":false }] }] }], "errors":[] } ```
- Loading branch information
Zhen
committed
Mar 15, 2018
1 parent
7a0ac84
commit 9d89f67
Showing
6 changed files
with
143 additions
and
72 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -139,5 +139,11 @@ public CRS getCRS() | |
{ | ||
return crs; | ||
} | ||
|
||
@Override | ||
public String toString() | ||
{ | ||
return geometryType; | ||
} | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.