Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions sql/types/extended.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package types

import (
"context"
"encoding/hex"
"errors"

Expand All @@ -26,11 +27,11 @@ type ExtendedType interface {
sql.Type
// SerializedCompare compares two byte slices that each represent a serialized value, without first deserializing
// the value. This should return the same result as the Compare function.
SerializedCompare(v1 []byte, v2 []byte) (int, error)
SerializedCompare(ctx context.Context, v1 []byte, v2 []byte) (int, error)
// SerializeValue converts the given value into a binary representation.
SerializeValue(val any) ([]byte, error)
SerializeValue(ctx context.Context, val any) ([]byte, error)
// DeserializeValue converts a binary representation of a value into its canonical type.
DeserializeValue(val []byte) (any, error)
DeserializeValue(ctx context.Context, val []byte) (any, error)
// FormatValue returns a string version of the value. Primarily intended for display.
FormatValue(val any) (string, error)
// MaxSerializedWidth returns the maximum size that the serialized value may represent.
Expand Down
Loading