engine

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 14 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
}

type Engine

type Engine interface {
	BuildStream(ctx context.Context, sql string, params arrow.RecordBatch) (*arrow.Schema, <-chan StreamChunk, 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 StreamChunk

type StreamChunk = flight.StreamChunk

Jump to

Keyboard shortcuts

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