Skip to content

Commit 78b0a55

Browse files
authored
New Tests (#13)
* Return missing text description for numeric column types. * Add new setup and teardown features to make it easier to add more complex tests. In error messages, don't print Vertica's internal method name anymore. * Externalized a few more setup/teardown test sql scripts to make the code a cleaner. Changed TZ connection log message from INFO to DEBUG. * Added value type test coverage. Changed so binary, varbinary, long varbinary now return hex-encoded strings instead as it is more readable. Changed so null binary, varbinary, long varbinary return objects of sql.NullString type instead of "". Changed so null time and timeTZ return objects of sql.NullString type instead of nil. * Removed non-working test.
1 parent dd40bd6 commit 78b0a55

17 files changed

+219
-179
lines changed

common/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ func ColumnTypeString(typeOID uint32) string {
9191
return "long varbinary"
9292
case ColTypeBinary:
9393
return "binary"
94+
case ColTypeNumeric:
95+
return "numeric"
9496
}
9597

9698
return fmt.Sprintf("unknown column type oid: %d", typeOID)

connection.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ func (v *connection) handshake() error {
303303
}
304304
}
305305

306-
// We have to be tricky here since we're inside of a connection, but tring to use interfaces of the
306+
// We have to be tricky here since we're inside of a connection, but trying to use interfaces of the
307307
// driver class.
308308
func (v *connection) initializeSession() error {
309309

@@ -332,7 +332,7 @@ func (v *connection) initializeSession() error {
332332

333333
v.serverTZOffset = str[len(str)-3:]
334334

335-
connectionLogger.Info("Setting server timezone offset to %s", str[len(str)-3:])
335+
connectionLogger.Debug("Setting server timezone offset to %s", str[len(str)-3:])
336336

337337
return nil
338338
}

0 commit comments

Comments
 (0)