common

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package common defines data structures used by the driver and the internal protocol implementation.

Index

Constants

View Source
const (
	DfvLevel0 int = 0 // base data format
	DfvLevel1 int = 1 // eval types support all data types
	DfvLevel2 int = 2 // reserved, broken, do not use
	DfvLevel3 int = 3 // additional types Longdate, Secondate, Daydate, Secondtime supported for NGAP
	DfvLevel4 int = 4 // generic support for new date/time types
	DfvLevel5 int = 5 // spatial types in ODBC on request
	DfvLevel6 int = 6 // BINTEXT
	DfvLevel7 int = 7 // with boolean support
	DfvLevel8 int = 8 // with FIXED8/12/16 support
)

Data format version values.

View Source
const (
	HDBFNone              uint64 = 1 << iota
	HDBFServerVersion            // HANA reports server version in connect options
	HDBFConnectClientInfo        // HANA accepts ClientInfo as part of the connection process
)

HDBVersion feature flags.

Variables

SupportedDfvs returns a slice of data format versions supported by the driver.

Functions

func IsSupportedDfv added in v0.104.0

func IsSupportedDfv(dfv int) bool

IsSupportedDfv returns true if the data format version dfv is supported by the driver, false otherwise.

Types

type DriverConn added in v0.104.0

type DriverConn interface {
	ServerInfo() *ServerInfo
}

DriverConn enhances a connection with go-hdb specific connection functions.

type HDBVersion

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

HDBVersion is representing a hdb version.

func ParseHDBVersion

func ParseHDBVersion(s string) *HDBVersion

ParseHDBVersion parses a semantic hdb version string field.

func (HDBVersion) BuildID

func (vn HDBVersion) BuildID() uint64

BuildID returns the build id field of a HDBVersionNumber.

func (*HDBVersion) Compare

func (v *HDBVersion) Compare(v2 *HDBVersion) int

Compare compares the version with a second version v2. The result will be

0 in case the two versions are equal,

-1 in case version v has lower precedence than c2,

1 in case version v has higher precedence than c2.

func (*HDBVersion) HasFeature

func (v *HDBVersion) HasFeature(feature uint64) bool

HasFeature returns true if HDBVersion does support feature - false otherwise.

func (HDBVersion) Major

func (vn HDBVersion) Major() uint64

Major returns the major field of a hdbVersionNumber.

func (HDBVersion) Minor

func (vn HDBVersion) Minor() uint64

Minor returns the minor field of a HDBVersionNumber.

func (HDBVersion) Patch

func (vn HDBVersion) Patch() uint64

Patch returns the patch field of a HDBVersionNumber.

func (HDBVersion) Revision

func (vn HDBVersion) Revision() uint64

Revision returns the revision field of a HDBVersionNumber.

func (HDBVersion) SPS

func (vn HDBVersion) SPS() uint64

SPS returns the sps field of a HDBVersionNumber.

func (HDBVersion) String

func (vn HDBVersion) String() string

type ServerInfo

type ServerInfo struct {
	Version *HDBVersion
}

ServerInfo contains hdb server information.

Jump to

Keyboard shortcuts

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