drivers

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Factories = map[string]DBconnectionFactory{
	"duckdb": InitDuckDBEnginFactory(),
}

Functions

func RegisterConnectionFactory

func RegisterConnectionFactory(driverName string, f DBconnectionFactory)

Types

type DBDriver

type DBDriver interface {
	Connect() error
	Begin() (interface{}, error)
	Commit(tx interface{}) error
	Rallback(tx interface{}) error
	Close() error
	Exec(tx interface{}, sql string) error
	GetListOfFields(tx interface{}, tableName string) []string
	CheckTableExists(tx interface{}, tableName string) bool
	CheckSchemaExists(tx interface{}, schemaName string) bool
	IsPermanent() bool
	MountSource(sourceProfile *configs.SourceProfile) error
	UnMountSource(sourceProfile *configs.SourceProfile) error
}

func EstablishDBConnection

func EstablishDBConnection(connection *configs.DBConnectionConfig) (DBDriver, error)

type DBconnectionFactory

type DBconnectionFactory interface {
	CreateConnection(connection configs.DBConnectionConfig) (DBDriver, error)
}

func InitDuckDBEnginFactory

func InitDuckDBEnginFactory() DBconnectionFactory

type DuckDBEngine

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

func (*DuckDBEngine) Begin

func (d *DuckDBEngine) Begin() (interface{}, error)

Begin implements DBEngine.

func (*DuckDBEngine) CheckSchemaExists

func (d *DuckDBEngine) CheckSchemaExists(tx interface{}, tableName string) bool

CheckSchemaExists implements DBEngine.

func (*DuckDBEngine) CheckTableExists

func (d *DuckDBEngine) CheckTableExists(tx interface{}, tableName string) bool

CheckTableExists implements DBEngine.

func (*DuckDBEngine) Close

func (d *DuckDBEngine) Close() error

Close implements DBEngine.

func (*DuckDBEngine) Commit

func (d *DuckDBEngine) Commit(tx interface{}) error

Commit implements DBEngine.

func (*DuckDBEngine) Connect

func (d *DuckDBEngine) Connect() error

Connect implements DBEngine.

func (*DuckDBEngine) Exec

func (d *DuckDBEngine) Exec(tx interface{}, sqlQuery string) error

Exec implements DBEngine.

func (*DuckDBEngine) GetListOfFields

func (d *DuckDBEngine) GetListOfFields(tx interface{}, tableName string) []string

GetListOfFields implements DBEngine.

func (*DuckDBEngine) IsPermanent

func (d *DuckDBEngine) IsPermanent() bool

func (*DuckDBEngine) MountSource

func (d *DuckDBEngine) MountSource(sourceProfile *configs.SourceProfile) error

MountSource implements DBDriver.

func (*DuckDBEngine) Rallback

func (d *DuckDBEngine) Rallback(tx interface{}) error

Rallback implements DBEngine.

func (*DuckDBEngine) UnMountSource

func (d *DuckDBEngine) UnMountSource(sourceProfile *configs.SourceProfile) error

UnMountSource implements DBDriver.

type DuckDBEngineFactory

type DuckDBEngineFactory struct {
}

func (*DuckDBEngineFactory) CreateConnection

func (d *DuckDBEngineFactory) CreateConnection(connection configs.DBConnectionConfig) (DBDriver, error)

CreateConnection implements DBconnectionFactory.

Jump to

Keyboard shortcuts

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