Documentation ¶
Overview ¶
Package avatica provides an Apache Phoenix Query Server/Avatica driver for Go's database/sql package.
Quickstart ¶
Import the database/sql package along with the avatica driver.
import "database/sql" import _ "github.com/apache/calcite-avatica-go/v5" db, err := sql.Open("avatica", "http://phoenix-query-server:8765")
See https://calcite.apache.org/avatica/docs/go_client_reference.html for more details
Index ¶
- func NewConnector(dsn string) driver.Connector
- func NewHTTPClient(host string, baseClient *http.Client, config *Config) (*httpClient, error)
- func WithAdditionalHeaders(cli *http.Client, headers http.Header) *http.Client
- func WithBasicAuth(cli *http.Client, username, password string) *http.Client
- func WithDigestAuth(cli *http.Client, username, password string) *http.Client
- func WithKerberosAuth(cli *http.Client, ...) (*http.Client, error)
- type Adapter
- type Config
- type Connector
- type Driver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnector ¶
NewConnector creates a new connector
func NewHTTPClient ¶
NewHTTPClient creates a new httpClient from a host.
func WithAdditionalHeaders ¶
WithAdditionalHeaders wraps a http client to always include the given set of headers
func WithBasicAuth ¶
WithBasicAuth takes a http client and prepares it to authenticate using basic authentication
func WithDigestAuth ¶
WithDigestAuth takes a http client and prepares it to authenticate using digest authentication
Types ¶
type Adapter ¶
type Adapter interface { GetPingStatement() string GetColumnTypeDefinition(*message.ColumnMetaData) *internal.Column ErrorResponseToResponseError(*message.ErrorResponse) errors.ResponseError }
type Config ¶
type Config struct { RootCAs string // contains filtered or unexported fields }
Config is a configuration parsed from a DSN string