go-hdb

module
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

README

go-hdb

Go Reference Go Report Card REUSE status

Go-hdb is a native Go (golang) HANA database driver for Go's sql package. It implements the SAP HANA SQL command network protocol.

For the official SAP HANA client Go support (not this database driver) please see SAP Help Portal.

Installation

go get -u github.com/SAP/go-hdb/driver

Building

To build go-hdb you need to have a working Go environment of the latest or second latest Go version.

Documentation

API documentation and documented examples can be found at https://pkg.go.dev/github.com/SAP/go-hdb/driver.

Tests

To run the driver integration tests a HANA Database server is required. The test user must have privileges to create database schemas.

Provide dsn via parameter:

go test -dsn hdb://user:password@host:port

or

set environment variable GOHDBDSN:

#linux example
export GOHDBDSN="hdb://user:password@host:port"
go test

Using the Go build tag 'unit' only the driver unit tests will be executed (no HANA Database server required):

go test --tags unit

Features

  • Native Go implementation (no C libraries, CGO).
  • Go http://golang.org/pkg/database/sql package compliant.
  • Support of database/sql/driver Execer and Queryer interface for parameter free statements and queries.
  • Support of 'bulk' and 'many' inserts.
  • Support of UTF-8 to / from CESU-8 encodings for HANA Unicode types.
  • Built-in support of HANA decimals as Go rational numbers http://golang.org/pkg/math/big.
  • Support of Large Object streaming.
  • Support of Stored Procedures with table output parameters.
  • Support of TLS TCP connections.
  • Support of little-endian (e.g. amd64) and big-endian architectures (e.g. s390x).
  • Support of driver connector.
  • Support of PBKDF2 authentication as default and standard user / password as fallback.

Dependencies

Directories

Path Synopsis
cmd
sniffer command
sniffer/scripts command
Package driver is a native Go SAP HANA driver implementation for the database/sql package.
Package driver is a native Go SAP HANA driver implementation for the database/sql package.
common
Package common defines data structures used by the driver and the internal protocol implementation.
Package common defines data structures used by the driver and the internal protocol implementation.
drivertest
Package drivertest provides utilities for driver testing.
Package drivertest provides utilities for driver testing.
sqltrace
Package sqltrace implements driver sql trace functions.
Package sqltrace implements driver sql trace functions.
internal
container/vermap
Package vermap implements a key value map like used in session variables.
Package vermap implements a key value map like used in session variables.
protocol
Package protocol implements the hdb command network protocol.
Package protocol implements the hdb command network protocol.
protocol/encoding
Package encoding implements ...
Package encoding implements ...
protocol/scanner
Package scanner implements a HANA SQL query scanner.
Package scanner implements a HANA SQL query scanner.
rand
Package rand implements random value functions.
Package rand implements random value functions.
unicode
Package unicode implements UTF-8 to CESU-8 and vice versa transformations.
Package unicode implements UTF-8 to CESU-8 and vice versa transformations.
unicode/cesu8
Package cesu8 implements functions and constants to support text encoded in CESU-8.
Package cesu8 implements functions and constants to support text encoded in CESU-8.
prometheus module

Jump to

Keyboard shortcuts

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