Help us shape the future of Go! Take the 2026 Go Developer Survey

coredb

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Version = "0.0.12"

	DefaultVectorSize = 768
)

Variables

View Source
var (
	ErrDBIsNotInitialized   = errors.New("db is not initialized")
	ErrDBIsDifferentVersion = errors.New("db is different version")
)
View Source
var InitSchema string

Functions

This section is empty.

Types

type Config

type Config struct {
	Path     string `json:"path"`
	ReadOnly bool   `json:"read_only"`

	// VectorSize is the dimension of embedding vectors stored in _schema_* tables.
	// Used for vector(N) in PostgreSQL and FLOAT[N] in DuckDB.
	VectorSize int `json:"vector_size"`

	// S3 for now only supports s3://
	S3Region   string `json:"s3_region"`
	S3Key      string `json:"s3_key"`
	S3Secret   string `json:"s3_secret"`
	S3UseSSL   bool   `json:"s3_use_ssl"`
	S3Endpoint string `json:"s3_endpoint"`
}

type Info added in v0.1.9

type Info struct {
	Version string               `json:"version"`
	Type    types.DataSourceType `json:"type"`
}

type SchemaTemplateParams added in v0.3.0

type SchemaTemplateParams struct {
	VectorSize int
}

SchemaTemplateParams contains parameters passed to the schema.sql Go template.

type Source

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

func New

func New(c Config) *Source

func (*Source) AsModule added in v0.1.9

func (s *Source) AsModule() bool

func (*Source) Attach

func (s *Source) Attach(ctx context.Context, db *db.Pool) error

func (*Source) Catalog

func (s *Source) Catalog(ctx context.Context) (cs.Catalog, error)

func (*Source) Engine

func (s *Source) Engine() engines.Engine

func (*Source) Info added in v0.1.9

func (s *Source) Info() Info

func (*Source) IsReadonly

func (s *Source) IsReadonly() bool

func (*Source) Name

func (s *Source) Name() string

Jump to

Keyboard shortcuts

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