diff --git a/compat_go18.go b/compat_go18.go index 47d9832..56811fc 100644 --- a/compat_go18.go +++ b/compat_go18.go @@ -14,7 +14,7 @@ func driverNamedValueToNamedValue(values []driver.NamedValue) ([]namedValue, err list[i] = namedValue(nv) if nv.Name != "" { - return list, fmt.Errorf("named paramters are not supported: %s given", nv.Name) + return list, fmt.Errorf("named parameters are not supported: %s given", nv.Name) } } diff --git a/driver_test.go b/driver_test.go index c77601e..737946e 100644 --- a/driver_test.go +++ b/driver_test.go @@ -683,6 +683,10 @@ func TestPreparedStatements(t *testing.T) { queryStmt, err := dbt.db.Prepare(`SELECT * FROM ` + dbt.tableName + ` WHERE int = ?`) + if err != nil{ + dbt.Fatal(err) + } + var res int for i := 1; i <= totalRows; i++ { diff --git a/dsn.go b/dsn.go index 1bfa542..d20919d 100644 --- a/dsn.go +++ b/dsn.go @@ -11,7 +11,7 @@ import ( type authentication int const ( - none authentication = iota + none authentication = iota basic digest ) diff --git a/errors.go b/errors.go index 52981e3..e9753a8 100644 --- a/errors.go +++ b/errors.go @@ -1,9 +1,10 @@ package avatica import ( - "github.com/Boostport/avatica/message" "regexp" "strconv" + + "github.com/Boostport/avatica/message" ) // Error severity codes @@ -19,7 +20,10 @@ type RPCMetadata struct { ServerAddress string } +// ErrorCode represents the error code returned by the avatica server type ErrorCode uint32 + +// SQLState represents the SQL code returned by the avatica server type SQLState string // ResponseError is an error type that contains detailed information on