AGE has a custom data type called agtype
, which, according to AGE's documentation, it is the only data type returned by AGE and it contains data like the JSON
format. Vertices
and Edges
are store as follows:
-- Vertex
{id:1; label: 'label_name'; properties: {prop1: value1, prop2: value2}}::vertex
-- Edge
{id: 3; startid: 1; endid: 2; label: 'edge_label' properties{prop1: value1, prop2: value2}}::edge
But other data types are not outputted like this. For example, path
, map
, and numeric
, when returned, are followed only by a ::type
whilst bool
, integer
, and float
are showed in the commonly used way.
If I wanted to create a new custom data type for AGE, what should be the necessary changes in the code? Which files and/or structures would it need to be modified? Should it follow the way that vertices and edges are made, like in the JSON format, or should it be different?