SAP / go-ase

SAP ASE Database Client for Go
Apache License 2.0
25 stars 14 forks source link

Correctly implement dynamic SQL for cgo and purego #104

Closed ntnn closed 4 years ago

ntnn commented 4 years ago

Description

This is a bigger PR - partly because implementing and fixing dynamic SQL is a bit invovled for both cgo and purego as well as libase/tds. Some additional fixes and changes I made also rely heavily on each other, so I can't split the history.

In total the following things are implemented:

Prepared statements are not possible in cgo as Client-Library doesn't support these.

I'd still like to implement prepared statements in purego further down the line, the framework for this is already there. Background is that users can utilize purego.NewStmt to create stored procedures manually and .Prepare calls in database/sql would instead create prepared statements. If that actually makes a difference needs to be tested though.

Additionally FLOAT tests break for cgo with this change, @fwilhelm92 will dig into that to get accustomed with the new conversion for both cgo and purego.

How was the patch tested?

make test and make integration.