libsqlvectorgorm

package module
v0.0.0-...-569e38d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vector

type Vector struct {
	// contains filtered or unexported fields
}

func NewVector

func NewVector(vec []float32) Vector

func (*Vector) DecodeBinary

func (v *Vector) DecodeBinary(buf []byte) error

DecodeBinary decodes a binary representation of a vector.

func (Vector) EncodeBinary

func (v Vector) EncodeBinary(buf []byte) (newBuf []byte, err error)

EncodeBinary encodes a binary representation of the vector.

func (Vector) FormatFloats

func (v Vector) FormatFloats() string

func (*Vector) GormValue

func (v *Vector) GormValue(_ context.Context, _ *gorm.DB) clause.Expr

func (Vector) MarshalJSON

func (v Vector) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Vector) Parse

func (v *Vector) Parse(s string) error

func (*Vector) Scan

func (v *Vector) Scan(src interface{}) (err error)

Scan implements the sql.Scanner interface.

func (Vector) Slice

func (v Vector) Slice() []float32

func (Vector) String

func (v Vector) String() string

String returns a string representation of the vector

func (*Vector) UnmarshalJSON

func (v *Vector) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (Vector) Value

func (v Vector) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL