duck

package
v0.11.122 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LockDatabase added in v0.11.88

func LockDatabase(path string)

func NewColumnCheckOperator

func NewColumnCheckOperator(manager connectionFetcher) *ansisql.ColumnCheckOperator

func NewMaterializer

func NewMaterializer(fullRefresh bool) *pipeline.Materializer

func UnlockDatabase added in v0.11.88

func UnlockDatabase(path string)

Types

type AcceptedValuesCheck

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

func (*AcceptedValuesCheck) Check

type BasicOperator

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

func NewBasicOperator

func NewBasicOperator(conn connectionFetcher, extractor queryExtractor, materializer materializer) *BasicOperator

func (BasicOperator) Run

func (BasicOperator) RunTask

type Client

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

func NewClient

func NewClient(c DuckDBConfig) (*Client, error)

func (*Client) GetDBConnectionURI added in v0.11.90

func (c *Client) GetDBConnectionURI() (string, error)

func (*Client) GetIngestrURI

func (c *Client) GetIngestrURI() (string, error)

func (*Client) RunQueryWithoutResult

func (c *Client) RunQueryWithoutResult(ctx context.Context, query *query.Query) error

func (*Client) Select

func (c *Client) Select(ctx context.Context, query *query.Query) ([][]interface{}, error)

Select runs a query and returns the results.

func (*Client) SelectWithSchema added in v0.11.103

func (c *Client) SelectWithSchema(ctx context.Context, queryObject *query.Query) (*query.QueryResult, error)

type Config

type Config struct {
	Path string
}

func (Config) GetIngestrURI

func (c Config) GetIngestrURI() string

func (Config) ToDBConnectionURI

func (c Config) ToDBConnectionURI() string

ToDBConnectionURI returns a connection URI to be used with the pgx package.

type DuckDBClient

type DuckDBClient interface {
	RunQueryWithoutResult(ctx context.Context, query *query.Query) error
	Select(ctx context.Context, query *query.Query) ([][]interface{}, error)
	SelectWithSchema(ctx context.Context, queryObj *query.Query) (*query.QueryResult, error)
}

type DuckDBConfig

type DuckDBConfig interface {
	ToDBConnectionURI() string
	GetIngestrURI() string
}

type EphemeralConnection added in v0.11.88

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

func NewEphemeralConnection added in v0.11.88

func NewEphemeralConnection(c DuckDBConfig) (*EphemeralConnection, error)

func (*EphemeralConnection) ExecContext added in v0.11.88

func (c *EphemeralConnection) ExecContext(ctx context.Context, sql string, arguments ...any) (sql.Result, error)

func (*EphemeralConnection) QueryContext added in v0.11.88

func (c *EphemeralConnection) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)

type Mutex added in v0.11.88

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

Mutex is the mutex with synchronized map, it allows reducing unnecessary locks among different keys. This implementation comes from the mapmutex package, I simply copied it here instead of adding it as a dependency. See the code here: https://github.com/EagleChen/mapmutex/blob/master/mutex.go

func NewCustomizedMapMutex added in v0.11.88

func NewCustomizedMapMutex(mRetry int, mDelay, bDelay, factor, jitter float64) *Mutex

NewCustomizedMapMutex returns a customized mapmutex.

func NewMapMutex added in v0.11.88

func NewMapMutex() *Mutex

NewMapMutex returns a mapmutex with default configs.

func (*Mutex) TryLock added in v0.11.88

func (m *Mutex) TryLock(key interface{}) bool

TryLock tries to acquire the lock.

func (*Mutex) Unlock added in v0.11.88

func (m *Mutex) Unlock(key interface{})

Unlock unlocks for the key please call Unlock only after having acquired the lock.

type PatternCheck

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

func (*PatternCheck) Check

Jump to

Keyboard shortcuts

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