engine

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSQL = status.Error(codes.InvalidArgument, "invalid SQL statement")
)

Functions

This section is empty.

Types

type BatchGuard

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

func NewBatchGuard

func NewBatchGuard(b arrow.RecordBatch) *BatchGuard

func (*BatchGuard) Release

func (g *BatchGuard) Release()

func (*BatchGuard) Retain

func (g *BatchGuard) Retain() arrow.RecordBatch

type Config

type Config struct {
	DBPath               string
	MaxConcurrentQueries int
	SchemaProbeTimeout   time.Duration
	ReadOnly             bool
	Logger               *slog.Logger
	DevMode              bool
	ADBCManager          *adbc.Manager
	Telemetry            telemetry.Publisher
}

type Engine

type Engine interface {
	BuildStream(ctx context.Context, sql string, params arrow.RecordBatch) (*arrow.Schema, <-chan StreamChunk, error)
	IngestStream(ctx context.Context, table string, reader array.RecordReader, opts IngestOptions) (int64, error)
	AcquireQuerySlot(ctx context.Context) error
	ReleaseQuerySlot()
	DeriveSchema(ctx context.Context, sql string) (*arrow.Schema, error)
	ExecuteUpdate(ctx context.Context, sql string) (int64, error)
	Allocator() memory.Allocator
	Close() error
}

func New

func New(cfg Config) (Engine, error)

type IngestOptions added in v0.21.0

type IngestOptions struct {
	Catalog       string
	DBSchema      string
	Temporary     bool
	TransactionID []byte
	IngestMode    string
	ExtraOptions  map[string]string
	// MaxUncommittedBytes bounds in-memory uncommitted segment storage.
	// Zero uses a safe default.
	MaxUncommittedBytes int64
}

type StreamChunk

type StreamChunk = flight.StreamChunk

Jump to

Keyboard shortcuts

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