We refactor the encoding package to replace the TypeVertex/TypeEdge/TypeVertexProperty/TypeEdgeProperty constructor methods ( buildX newX , buildprefix* etc) with 'TypeXEncoding' traits.
The TypeXPropertyEncoding traits include build & decode methods for the value type of the property. This organises scattered encoding/decoding logic across TypeManager & free serialize/deserialize methods.
There are also some elements of schema validation introduced.
Implementation
The TypeXEncoding traits
The TypeVertex constructors for EntityType goes from the macro generated methods:
Usage and product changes
We refactor the encoding package to replace the TypeVertex/TypeEdge/TypeVertexProperty/TypeEdgeProperty constructor methods ( buildX newX , buildprefix* etc) with 'TypeXEncoding' traits.
The TypeXPropertyEncoding traits include build & decode methods for the value type of the property. This organises scattered encoding/decoding logic across TypeManager & free serialize/deserialize methods.
There are also some elements of schema validation introduced.
Implementation
The TypeXEncoding traits
The TypeVertex constructors for EntityType goes from the macro generated methods:
to a
TypeVertexEncoding
trait implementation + an implementation for EntityType:Example of the encode/decode methods for a property value: