diff --git a/lib/debezium/converters/basic.go b/lib/debezium/converters/basic.go index 878ccbcc8..7304233f9 100644 --- a/lib/debezium/converters/basic.go +++ b/lib/debezium/converters/basic.go @@ -30,8 +30,8 @@ func (JSON) ToKindDetails() typing.KindDetails { type Int64Passthrough struct{} -func (Int64Passthrough) ToKindDetails() typing.KindDetails { - return typing.Integer +func (Int64Passthrough) ToKindDetails() (typing.KindDetails, error) { + return typing.Integer, nil } func (Int64Passthrough) Convert(value any) (any, error) { @@ -44,9 +44,9 @@ func (Int64Passthrough) Convert(value any) (any, error) { type Base64 struct{} -func (Base64) ToKindDetails() typing.KindDetails { +func (Base64) ToKindDetails() (typing.KindDetails, error) { // We're returning this back as a base64 encoded string. - return typing.String + return typing.String, nil } func (Base64) Convert(value any) (any, error) { diff --git a/lib/debezium/converters/geometry.go b/lib/debezium/converters/geometry.go index a55d8ae9b..2adf6c6a7 100644 --- a/lib/debezium/converters/geometry.go +++ b/lib/debezium/converters/geometry.go @@ -31,8 +31,8 @@ const Point GeometricShapes = "Point" type GeometryPoint struct{} -func (GeometryPoint) ToKindDetails() typing.KindDetails { - return typing.Struct +func (GeometryPoint) ToKindDetails() (typing.KindDetails, error) { + return typing.Struct, nil } // Convert takes in a map[string]any and returns a GeoJSON string. This function does not use WKB or SRID and leverages X, Y. diff --git a/lib/debezium/converters/string.go b/lib/debezium/converters/string.go index 2d591a78d..2dc08b161 100644 --- a/lib/debezium/converters/string.go +++ b/lib/debezium/converters/string.go @@ -13,6 +13,6 @@ func (StringPassthrough) Convert(value any) (any, error) { return castedValue, nil } -func (StringPassthrough) ToKindDetails() typing.KindDetails { - return typing.String +func (StringPassthrough) ToKindDetails() (typing.KindDetails, error) { + return typing.String, nil } diff --git a/lib/debezium/schema.go b/lib/debezium/schema.go index 6db2565e7..b4ebffad7 100644 --- a/lib/debezium/schema.go +++ b/lib/debezium/schema.go @@ -75,7 +75,7 @@ func (f Field) GetScaleAndPrecision() (int32, *int32, error) { return 0, nil, precisionErr } - precisionPtr = typing.ToPtr(int32(precision)) + precisionPtr = typing.ToPtr(precision) } return scale, precisionPtr, nil @@ -148,7 +148,7 @@ func (f Field) ToKindDetails() (typing.KindDetails, error) { } if converter != nil { - return converter.ToKindDetails(), nil + return converter.ToKindDetails() } switch f.Type {