timestreamdriver

package module
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 21 Imported by: 0

README

CI PkgGoDev

go-aws-timestream-driver

go get github.com/aereal/go-aws-timestream-driver

Usage

import (
  "database/sql"

  "github.com/aereal/go-aws-timestream-driver"
)

func main() {
  sql.Open(timestreamdriver.DriverName, "awstimestream:///")
}

See also Data Source Name format section.

Data Source Name format

In URI template normative definition:

awstimestream://{customEndpointHost}/{?region,accessKeyID,secretAccessKey,enableXray}

Example:

awstimestream://custom-endpoint.example/?region=us-east-1&accessKeyID=my-key&enableXray=true

License

See LICENSE file.

Documentation

Index

Constants

View Source
const (
	// DriverName is name of the driver that this package provides
	DriverName = "awstimestream"
)

Variables

View Source
var (
	// ErrTooFewParameters is an error indicates number of passed parameters less than query's placeholders.
	// It may be returned by Rows.QueryContext().
	ErrTooFewParameters = errors.New("too few parameters passed")
)

Functions

func Array added in v1.3.0

func Array(x interface{}) customType

Array converts `x` into corresponding concrete scannable types.

Types

type BareStringValue added in v1.5.0

type BareStringValue struct {
	Bare string
}

BareStringValue is a string parameter but not quoted. You can wrap interval literal with this type and then embed interval literal into query.

func (BareStringValue) IsBareValue added in v1.5.0

func (BareStringValue) IsBareValue()

func (BareStringValue) Value added in v1.5.0

func (bsv BareStringValue) Value() (driver.Value, error)

type BooleanArray added in v1.3.0

type BooleanArray []bool

BooleanArray is a wrapper type of []bool that scannable by database/sql

func (*BooleanArray) Scan added in v1.3.0

func (a *BooleanArray) Scan(src interface{}) error

type Config

type Config struct {
	Endpoint           string
	Region             string
	CredentialProvider credentials.Provider
	EnableXray         bool
}

func ParseDSN added in v1.7.0

func ParseDSN(dsn string) (*Config, error)

type Driver

type Driver struct{}

func (*Driver) Open

func (d *Driver) Open(dsn string) (driver.Conn, error)

func (*Driver) OpenConnector

func (d *Driver) OpenConnector(dsn string) (driver.Connector, error)

type FloatArray added in v1.3.0

type FloatArray []float64

FloatArray is a wrapper type of []float64 that scannable by database/sql

func (*FloatArray) Scan added in v1.3.0

func (a *FloatArray) Scan(src interface{}) error

type IntegerArray added in v1.3.0

type IntegerArray []int

IntegerArray is a wrapper type of []int that scannable by database/sql

func (*IntegerArray) Scan added in v1.3.0

func (a *IntegerArray) Scan(src interface{}) error

type StringArray added in v1.3.0

type StringArray []string

StringArray is a wrapper type of []string that scannable by database/sql

func (*StringArray) Scan added in v1.3.0

func (a *StringArray) Scan(src interface{}) error

Jump to

Keyboard shortcuts

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