Skip to content

Commit

Permalink
release 0.111.3
Browse files Browse the repository at this point in the history
  • Loading branch information
stfnmllr committed Nov 29, 2022
1 parent 5d843fd commit e3dea8a
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 4 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ Go-hdb is a native Go (golang) HANA database driver for Go's sql package. It imp

For the official SAP HANA client Go support (not this database driver) please see [SAP Help Portal](https://help.sap.com/viewer/0eec0d68141541d1b07893a39944924e/2.0.02/en-US/0ffbe86c9d9f44338441829c6bee15e6.html).

## Version 1.0

go-hdb version 1.0 is going to be released after Go 1.20 is available which is expected to be released in February 2023. The migration should be pretty straight forward. For details please refer to [Version 1.0](https://github.com/SAP/go-hdb/blob/main/VERSION1.0.md).

When starting newly with this driver whether:
- use the latest version (main branch)
- without switching to legacy mode
- without using any deprecated type
- or use the latest 1.0 release candidate branch of this repository

## Installation

```
Expand Down
4 changes: 4 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Release Notes

## Release 0.111

Release 0.111.3 (upgrade urgency: no need for upgrade)

- Version 1.0 announcement

Release 0.111.2 (upgrade urgency: no need for upgrade)

- Some source code cleanups
Expand Down
49 changes: 49 additions & 0 deletions VERSION1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

## Version 1.0 Migration

go-hdb version 1.0 is going to be released after Go 1.20 is available which is expected to be released in February 2023. The minimal Go version for go-hdb 1.0 is [Go 1.19](https://go.dev/doc/devel/release#go1.19).

__To migrate to version 1.0 from the current latest version please switch off the connector 'legacy' mode (which is the default since version 0.107) and please replace the already deprecated type driver.NullTime by sql.NullTime.__

### Incompatible changes

Removal of already deprecated driver.NullTime alias (please use sql.NullTime instead)

Bulk operations:

- The following bulk operations available via legacy mode are no longer supported:
- via query ("bulk insert ...")
- via named arguments (Flush / NoFlush)
- via 'many' supporting one and two dimensional slices, arrays
- Please use the following bulk operations instead:
- via extended parameter list with (len(args)%'#of paramerters' == 0
- via function argument (func(args []any) error)

Stored procedures with table output parameters:

- Retrieving table output parameter content via separate query call is no longer supported (legacy mode)
- Please use [sql.Rows](https://golang.org/pkg/database/sql/#Rows) instead (available since version 0.99)

### New features:

- Stored procedures with parameters can now be executed by sql.Exec
- Support of [named](https://pkg.go.dev/database/sql#Named) parameters and
- Support of [out](https://pkg.go.dev/database/sql#Out) output parameters

Exception: Stored procedures with table output parameters need further to be called by sql.Query ([example](https://github.com/SAP/go-hdb/blob/main/driver/example_call_test.go)).

- Custom types for reading Lobs

Whereas string and []byte types are supported as Lob input parameters for output parameters and query results (scan) the driver.Lob type was needed.
With the help of one of the following functions a string, []byte or io.Writer based custom type can now be used as well:
- driver.ScanLobBytes
- driver.ScanLobString
- driver.ScanLobWriter

Example:
```golang
// BytesLob defines a []byte based data type for scanning Lobs.
type BytesLob []byte
// Scan implements the database.sql.Scanner interface.
func (b *BytesLob) Scan(arg any) error { return driver.ScanLobBytes(arg, (*[]byte)(b)) }
```
2 changes: 1 addition & 1 deletion driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// DriverVersion is the version number of the hdb driver.
const DriverVersion = "0.111.2"
const DriverVersion = "0.111.3"

// DriverName is the driver name to use with sql.Open for hdb databases.
const DriverName = "hdb"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/prometheus/client_golang v1.14.0
golang.org/x/crypto v0.3.0
golang.org/x/exp v0.0.0-20221114191408-850992195362
golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9
golang.org/x/text v0.4.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20221114191408-850992195362 h1:NoHlPRbyl1VFI6FjwHtPQCN7wAMXI6cKcqrmXhOOfBQ=
golang.org/x/exp v0.0.0-20221114191408-850992195362/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9 h1:yZNXmy+j/JpX19vZkVktWqAo7Gny4PBWYYK3zskGpx4=
golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
Expand Down

0 comments on commit e3dea8a

Please sign in to comment.