go-hdb

module
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2019 License: Apache-2.0

README

go-hdb

GoDoc

Go-hdb is a native Go (golang) HANA database driver for Go's sql package. It implements the SAP HANA SQL command network protocol:
http://help.sap.com/hana/SAP_HANA_SQL_Command_Network_Protocol_Reference_en.pdf

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

Installation

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

Building

To build go-hdb you need to have a working Go environment with version 1.10.4 or higher installed.

Documentation

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

Tests

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

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

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 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).

Dependencies

Todo

  • Additional Authentication Methods (actually only basic authentication is supported).

Directories

Path Synopsis
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.
sqltrace
Package sqltrace implements driver sql trace functions.
Package sqltrace implements driver sql trace functions.
internal
bufio
Package bufio implements buffered I/O for database read and writes on basis of the standard Go bufio package.
Package bufio implements buffered I/O for database read and writes on basis of the standard Go bufio package.
protocol
Package protocol implements the hdb command network protocol.
Package protocol implements the hdb command network protocol.
scanner
Package scanner implements a HANA SQL query scanner.
Package scanner implements a HANA SQL query scanner.
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.

Jump to

Keyboard shortcuts

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