Versions in this module Expand all Collapse all v0 v0.1.1 Oct 11, 2026 v0.1.0 Oct 11, 2026 Changes in this version + const HNSW + const IVFFlat + const SettingEnableIndexscan + const SettingEnableSeqscan + const SettingHNSWEfSearch + const SettingHNSWIterativeScan + const SettingHNSWMaxScanTuples + const SettingHNSWScanMemMultiplier + const SettingIVFFlatIterativeScan + const SettingIVFFlatMaxProbes + const SettingIVFFlatProbes + var CosineOps = pg.NewOpClass[Vector]("vector_cosine_ops") + var ErrFormat = errors.New("vector: value is not in pgvector text form") + var Extension = pg.Extension + var HalfCosineOps = pg.NewOpClass[HalfVector]("halfvec_cosine_ops") + var HalfIPOps = pg.NewOpClass[HalfVector]("halfvec_ip_ops") + var HalfL2Ops = pg.NewOpClass[HalfVector]("halfvec_l2_ops") + var IPOps = pg.NewOpClass[Vector]("vector_ip_ops") + var L1Ops = pg.NewOpClass[Vector]("vector_l1_ops") + var L2Ops = pg.NewOpClass[Vector]("vector_l2_ops") + func Add[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[V] + func Avg[V Elementwise](v sqlb.Expr[V], opts ...sqlb.AggOption) sqlb.Expr[V] + func BinaryQuantize[V Elementwise](v sqlb.Expr[V]) sqlb.Expr[BitVector] + func CastBit[T any](e sqlb.Expr[T], dims int) sqlb.Expr[BitVector] + func CastHalf[T any](e sqlb.Expr[T], dims int) sqlb.Expr[HalfVector] + func CastSparse[T any](e sqlb.Expr[T], dims int) sqlb.Expr[SparseVector] + func CastVector[T any](e sqlb.Expr[T], dims int) sqlb.Expr[Vector] + func Concat[V Elementwise](a, b sqlb.Expr[V]) sqlb.Expr[V] + func CosineDistance[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[float64] + func Cosine[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[float64] + func Dims(v sqlb.Expr[Vector]) sqlb.Expr[int32] + func EfConstruction(n int64) pg.IndexParam + func ForceExact() sqlb.Expr[string] + func ForceIndex() sqlb.Expr[string] + func Hamming(a, b sqlb.Expr[BitVector]) sqlb.Expr[float64] + func HammingDistance(a, b sqlb.Expr[BitVector]) sqlb.Expr[float64] + func InnerProductOf[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[float64] + func InnerProduct[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[float64] + func Jaccard(a, b sqlb.Expr[BitVector]) sqlb.Expr[float64] + func JaccardDistance(a, b sqlb.Expr[BitVector]) sqlb.Expr[float64] + func L1Distance[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[float64] + func L1[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[float64] + func L2Distance[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[float64] + func L2Norm[V HalfVector | SparseVector](v sqlb.Expr[V]) sqlb.Expr[float64] + func L2Normalize[V Dense](v sqlb.Expr[V]) sqlb.Expr[V] + func L2[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[float64] + func Lists(n int64) pg.IndexParam + func M(n int64) pg.IndexParam + func Mul[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[V] + func Norm(v sqlb.Expr[Vector]) sqlb.Expr[float64] + func ParamBit(v BitVector) sqlb.Expr[BitVector] + func ParamHalf(v HalfVector) sqlb.Expr[HalfVector] + func ParamSparse(v SparseVector) sqlb.Expr[SparseVector] + func ParamVector(v Vector) sqlb.Expr[Vector] + func SetEfSearch(n int) sqlb.Expr[string] + func SetHNSWIterativeScan(mode IterativeScan) sqlb.Expr[string] + func SetIVFFlatIterativeScan(mode IterativeScan) sqlb.Expr[string] + func SetMaxProbes(n int) sqlb.Expr[string] + func SetMaxScanTuples(n int) sqlb.Expr[string] + func SetProbes(n int) sqlb.Expr[string] + func Sub[V Dense](a, b sqlb.Expr[V]) sqlb.Expr[V] + func Subvector[V Elementwise](v sqlb.Expr[V], start, count int) sqlb.Expr[V] + func Sum[V Dense](v sqlb.Expr[V], opts ...sqlb.AggOption) sqlb.Expr[V] + type BitVector string + func (v *BitVector) Scan(src any) error + func (v BitVector) Value() (driver.Value, error) + type Dense interface + type Elementwise interface + type HalfVector []float32 + func (v *HalfVector) Scan(src any) error + func (v HalfVector) Value() (driver.Value, error) + type IterativeScan string + const ScanOff + const ScanRelaxedOrder + const ScanStrictOrder + type SparseVector struct + Dimensions int32 + Indices []int32 + Values []float32 + func NewSparse(dense []float32) SparseVector + func (v *SparseVector) Scan(src any) error + func (v SparseVector) String() string + func (v SparseVector) Value() (driver.Value, error) + type Vector []float32 + func (v *Vector) Scan(src any) error + func (v Vector) Value() (driver.Value, error)