[ https://issues.apache.org/jira/browse/TINKERPOP-2802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17748859#comment-17748859 ]
ASF GitHub Bot commented on TINKERPOP-2802: ------------------------------------------- j-white commented on code in PR #2174: URL: https://github.com/apache/tinkerpop/pull/2174#discussion_r1278449120 ########## gremlin-go/driver/serializer.go: ########## @@ -320,5 +328,23 @@ func initDeserializers() { // Metrics metricsType: metricsReader, traversalMetricsType: traversalMetricsReader, + + // Customer + customType: customTypeReader, } + customDeserializers = map[string]CustomTypeReader{} +} + +// RegisterCustomTypeReader register a reader (deserializer) for a custom type +func RegisterCustomTypeReader(customTypeName string, reader CustomTypeReader) { Review Comment: I opted to allow registering custom types here rather than passing them in through the `DriverRemoteConnectionSettings` or `ClientSettings` since `readFullyQualifiedNullable` does not have any of the client context and bringing this along introduces a lot of code changes. Registering them in this fashion while being careful about concurrency on the map seems to be sufficient. > Support Adding Custom Serializer for Gremlin Go > ----------------------------------------------- > > Key: TINKERPOP-2802 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2802 > Project: TinkerPop > Issue Type: Improvement > Components: go > Affects Versions: 3.6.2 > Reporter: Yang Xia > Priority: Major > > To enable mechanisms to add custom serializers in the Go driver, for > compatibility with database specific types outside of TinkerPop, such as the > JanusGraph RelationIdentifier. -- This message was sent by Atlassian Jira (v8.20.10#820010)