Skip to content

v0.20.0

Choose a tag to compare

@kenshaw kenshaw released this 11 Oct 04:11
· 1 commit to main since this release

This release adds the Exasol driver, a WebSocket client in the root package, and a fix for NULL arguments in the BigQuery driver.

Exasol

  • The driver. github.com/xo/dbimp/exasol registers the name exasol and takes exasol://user:pass@host:8563/schema?key=value. The keys are tls, validateservercertificate, certificatefingerprint, compression, autocommit, fetchsize, querytimeout, clientname and protocol (D205).
  • Protocol. It speaks the JSON protocol over a WebSocket, with zlib compression on by default (D214). It binds arguments on the server (D208), reads a result by its handle (D210), and sends abortQuery when a context ends, keeping the connection (D211). BeginTx turns autocommit off and restores it (D209).
  • Types. A DECIMAL of scale 0 and at most 18 digits is an int64, any other DECIMAL is an *apd.Decimal, and the dates, times and intervals are the dbimp types (D206). An empty string and NULL are one value, which is nil (D207).
  • Errors. A refused credential matches dbimp.ErrAuthentication.
  • Live tests. The integration tests passed on exasol-2026.2.0, as the administrator and as an ordinary user. Local IMPORT and EXPORT are not supported, and the server answers 0A000.

Root package

  • WebSocket client. dbimp.DialWebSocket is a client for RFC 6455 with no new package (D200). A close frame is the last frame, a truncated frame is io.ErrUnexpectedEOF, a close reason is cut at a character, and a repeated handshake header is refused. A context that ends after a whole frame went out no longer closes the connection.
  • dbimptest. It records and replays WebSocket exchanges, and RunContract takes a WebSocket contract.

BigQuery

  • NULL arguments. The driver now writes a NULL argument as the literal NULL in the text of the statement. An INSERT with a NULL argument failed for a NUMERIC or a TIMESTAMP column before, because no one parameter type fits every column (D216). A NULL used where a type decides, such as SELECT ?, now has the type INT64. Write CAST(? AS type) for another type.

Tests

The tests passed locally with -race, and the linter reported 0 issues. The release is tagged before CI ran, as Ken asked. The new BigQuery test passed on the hosted project and on emulator 0.8.1.