adapters

package
v0.0.0-...-85622c8 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnmatchedDoubleQuote = func(position int) error { return fmt.Errorf("syntax error: unmatched double quote at: %d", position) }
	ErrUnmatchedSingleQuote = func(position int) error { return fmt.Errorf("syntax error: unmatched single quote at: %d", position) }
)

ErrUnmatchedDoubleQuote and ErrUnmatchedSingleQuote are errors returned from ParseRedisCmd

View Source
var (
	ErrUnsupportedTypeAlias = errors.New("no driver registered for provided type alias")
)

Functions

func NewConnection

func NewConnection(params *core.ConnectionParams) (*core.Connection, error)

NewConnection is a wrapper around core.NewConnection that uses the internal mux for adapter registration.

Types

type BigQuery

type BigQuery struct{}

func (*BigQuery) Connect

func (bq *BigQuery) Connect(rawURL string) (core.Driver, error)

Connect creates a BigQuery client connected to the project specified in the url. The format of the url is as follows:

bigquery://[project][?options]

Where:

  • "project" is optional. If not set, the project will attempt to be detected from the credentials and current gcloud settings.
  • "options" is a ampersand-separated list of key=value arguments.

The supported "options" are:

  • credentials=path/to/creds/file.json
  • disable-cache=true|false
  • max-bytes-billed=integer
  • enable-storage-read=true|false
  • use-legacy-sql=true|false
  • location=google-cloud-location

If credentials are not explicitly specified, credentials will attempt to be located according to the Google Default Credentials process.

func (*BigQuery) GetHelpers

func (*BigQuery) GetHelpers(opts *core.TableOptions) map[string]string

type Clickhouse

type Clickhouse struct{}

func (*Clickhouse) Connect

func (p *Clickhouse) Connect(url string) (core.Driver, error)

func (*Clickhouse) GetHelpers

func (*Clickhouse) GetHelpers(opts *core.TableOptions) map[string]string

type Duck

type Duck struct{}

func (*Duck) Connect

func (d *Duck) Connect(url string) (core.Driver, error)

func (*Duck) GetHelpers

func (*Duck) GetHelpers(opts *core.TableOptions) map[string]string

type Mongo

type Mongo struct{}

func (*Mongo) Connect

func (m *Mongo) Connect(rawURL string) (core.Driver, error)

func (*Mongo) GetHelpers

func (*Mongo) GetHelpers(opts *core.TableOptions) map[string]string

type Mux

type Mux struct{}

Mux is an interface to all internal adapters.

func (*Mux) AddAdapter

func (*Mux) AddAdapter(typ string, adapter core.Adapter) error

func (*Mux) AddHelpers

func (*Mux) AddHelpers(typ string, helpers map[string]string) error

func (*Mux) GetAdapter

func (*Mux) GetAdapter(typ string) (core.Adapter, error)

type MySQL

type MySQL struct{}

func (*MySQL) Connect

func (m *MySQL) Connect(url string) (core.Driver, error)

func (*MySQL) GetHelpers

func (*MySQL) GetHelpers(opts *core.TableOptions) map[string]string

type Oracle

type Oracle struct{}

func (*Oracle) Connect

func (o *Oracle) Connect(url string) (core.Driver, error)

func (*Oracle) GetHelpers

func (*Oracle) GetHelpers(opts *core.TableOptions) map[string]string

type Postgres

type Postgres struct{}

func (*Postgres) Connect

func (p *Postgres) Connect(url string) (core.Driver, error)

func (*Postgres) GetHelpers

func (*Postgres) GetHelpers(opts *core.TableOptions) map[string]string

type Redis

type Redis struct{}

func (*Redis) Connect

func (r *Redis) Connect(url string) (core.Driver, error)

func (*Redis) GetHelpers

func (*Redis) GetHelpers(opts *core.TableOptions) map[string]string

type Redshift

type Redshift struct{}

func (*Redshift) Connect

func (r *Redshift) Connect(rawURL string) (core.Driver, error)

func (*Redshift) GetHelpers

func (r *Redshift) GetHelpers(opts *core.TableOptions) map[string]string

type SQLServer

type SQLServer struct{}

func (*SQLServer) Connect

func (s *SQLServer) Connect(url string) (core.Driver, error)

func (*SQLServer) GetHelpers

func (*SQLServer) GetHelpers(opts *core.TableOptions) map[string]string

type SQLite

type SQLite struct{}

func (*SQLite) Connect

func (s *SQLite) Connect(url string) (core.Driver, error)

func (*SQLite) GetHelpers

func (*SQLite) GetHelpers(opts *core.TableOptions) map[string]string

Jump to

Keyboard shortcuts

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