common

package
v0.103.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 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 (
	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

This section is empty.

Functions

This section is empty.

Types

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