integrations

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DuckDBExtension

type DuckDBExtension struct {
	Name          string
	LoadByDefault bool
}

DuckDBExtension represents a DuckDB extension with its name and load preference.

func DefaultExtensions

func DefaultExtensions() []DuckDBExtension

DefaultExtensions returns the default extensions to be loaded in DuckDB.

type DuckDBReadOptions added in v0.1.1

type DuckDBReadOptions struct {
	Extensions []DuckDBExtension
	Query      string
}

DuckDBReadOptions defines options for reading from DuckDB.

type DuckDBReader added in v0.1.1

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

DuckDBReader reads records from DuckDB and implements the Reader interface.

func NewDuckDBReader added in v0.1.1

func NewDuckDBReader(ctx context.Context, dbURL string, opts *DuckDBReadOptions) (*DuckDBReader, error)

NewDuckDBReader creates a new DuckDB reader.

func (*DuckDBReader) Close added in v0.1.1

func (d *DuckDBReader) Close() error

Close releases resources associated with the DuckDB reader.

func (*DuckDBReader) Read added in v0.1.1

func (d *DuckDBReader) Read() (arrow.Record, error)

Read reads the next record from DuckDB.

func (*DuckDBReader) RunSQL added in v0.1.1

func (r *DuckDBReader) RunSQL(sql string) ([]arrow.Record, error)

RunSQL runs a SQL query on DuckDB and returns the results as Arrow records.

func (*DuckDBReader) Schema added in v0.1.1

func (d *DuckDBReader) Schema() *arrow.Schema

Schema returns the schema of the records being read from DuckDB.

type DuckDBWriter added in v0.1.1

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

DuckDBWriter writes records to DuckDB and implements the Writer interface.

func NewDuckDBWriter added in v0.1.1

func NewDuckDBWriter(ctx context.Context, dbURL string, tableName string, extensions []DuckDBExtension) (*DuckDBWriter, error)

NewDuckDBWriter creates a new DuckDB writer.

func (*DuckDBWriter) Close added in v0.1.1

func (w *DuckDBWriter) Close() error

Close closes the DuckDB writer and releases resources.

func (*DuckDBWriter) Write added in v0.1.1

func (w *DuckDBWriter) Write(record arrow.Record) error

Write writes a record to DuckDB.

Jump to

Keyboard shortcuts

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