duck

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TABLE_NAME    = "table_name"
	ERROR         = ".error"
	ERROR_MESSAGE = ".error_message"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dirs added in v0.1.0

type Dirs map[string]string

type DuckDB

type DuckDB struct {
	Name string
	// contains filtered or unexported fields
}

func NewDuckDB

func NewDuckDB(name string, opts ...Opts) *DuckDB

NewDuckDB creates a new DuckDB

func NewInMemoryDB

func NewInMemoryDB(opts ...Opts) *DuckDB

NewInMemoryDB creates a new in-memory DuckDB

func (*DuckDB) Destroy

func (d *DuckDB) Destroy() error

Destroy will remove database files created by duckdb

func (*DuckDB) Query

func (d *DuckDB) Query(query string) (string, error)

Query runs a query against the database. For Databases that are NOT in-memory.

func (*DuckDB) QueryFrames

func (d *DuckDB) QueryFrames(name string, query string, frames []*sdk.Frame) (string, bool, error)

QueryFrame will load a dataframe into a view named RefID, and run the query against that view

func (*DuckDB) QueryFramesToFrames added in v0.5.0

func (d *DuckDB) QueryFramesToFrames(name string, query string, frames []*sdk.Frame) (*sdk.Frame, error)

func (*DuckDB) RunCommands

func (d *DuckDB) RunCommands(commands []string) (string, error)

RunCommands runs a series of of sql commands against duckdb

type FrameData added in v0.1.0

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

func (*FrameData) Query added in v0.1.0

func (f *FrameData) Query(name string, query string, frames []*sdk.Frame) (string, bool, error)

type Opts

type Opts struct {
	Mode          string
	Format        string
	Chunk         int
	Exe           string
	CacheDuration int
	Docker        bool
	Image         string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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