taosRestful

package
v3.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 20 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDSNUnescaped = &errors.TaosError{Code: 0xffff, ErrStr: "invalid DSN: did you forget to escape a param value?"}
	ErrInvalidDSNAddr      = &errors.TaosError{Code: 0xffff, ErrStr: "invalid DSN: network address not terminated (missing closing brace)"}
	ErrInvalidDSNPort      = &errors.TaosError{Code: 0xffff, ErrStr: "invalid DSN: network port is not a valid number"}
	ErrInvalidDSNNoSlash   = &errors.TaosError{Code: 0xffff, ErrStr: "invalid DSN: missing the slash separating the database name"}
)

Functions

func EqualFold

func EqualFold(s, t string) bool

EqualFold is strings.EqualFold, ASCII only. It reports whether s and t are equal, ASCII-case-insensitively.

func NewConnector added in v3.6.0

func NewConnector(cfg *Config) (driver.Connector, error)

NewConnector returns new driver.Connector.

Types

type Config added in v3.6.0

type Config struct {
	User               string // Username
	Passwd             string // Password (requires User)
	Net                string // Network type
	Addr               string // Network address (requires Net)
	Port               int
	DbName             string            // Database name
	Params             map[string]string // Connection parameters
	InterpolateParams  bool              // Interpolate placeholders into query string
	DisableCompression bool
	ReadBufferSize     int
	Token              string // cloud platform Token
	SkipVerify         bool
}

Config is a configuration parsed from a DSN string. If a new Config is created instead of being parsed from a DSN string, the NewConfig function should be used, which sets default values.

func NewConfig added in v3.6.0

func NewConfig() *Config

NewConfig creates a new Config and sets default values.

func ParseDSN added in v3.6.0

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

ParseDSN parses the DSN string to a Config

type TDengineDriver added in v3.0.1

type TDengineDriver struct{}

TDengineDriver is exported to make the driver directly accessible. In general the driver is used via the database/sql package.

func (TDengineDriver) Open added in v3.0.1

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

Open new Connection. the DSN string is formatted

func (TDengineDriver) OpenConnector added in v3.6.0

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

OpenConnector implements driver.DriverContext.

Jump to

Keyboard shortcuts

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