Repository navigation
v0.14.0
This release adds five drivers: drill, solr, elasticsearch, opensearch and dynamodb. No other driver changes for a caller.
New
- Apache Drill. The package
drillruns SQL on a Drillbit through its REST interface, measured on Drill 1.21.2 and 1.22.0. The DSN isdrill://user:password@host:8047with no path and the keystls,schemaandautolimit. The driver keeps the session cookie of the server, so the settingsautoLimit,defaultSchemaandoptionsstay in the session of a connection. A writing statement goes throughCREATE TABLE AS(D165 and D178). - Apache Solr. The package
solrruns SQL through the/sqlhandler, measured on Solr 9.9.0, 9.10.1 and 10.0.0. The DSN issolr://user:password@host:8983/<collection>with the keystlsandmode. The path is optional, and a statement with no path needsWithDatabase. The driver reads the class of a field from the luke handler, so a boolean, a binary and a UUID have the typesbool,[]byteanduuid.UUID(D166 and D178). - Elasticsearch. The package
elasticsearchruns SQL through_sql, measured on 8.19.22, 9.4.6 and 9.5.3. The DSN iselasticsearch://user:password@host:9200with no path and the keystls,auth,fetch_size,time_zone,field_multi_value_leniencyandcatalog. The driver reads each page one token at a time and closes the cursor when the caller closes the rows early (D167 and D178). - OpenSearch. The package
opensearchruns SQL through the SQL plugin, measured on 2.19.6 and 3.9.0. The DSN isopensearch://user:password@host:9200with no path and the keystlsandfetch_size. The driver sends a page size to each plainSELECT, and it returns the HTTP 403 that the ordinary user of 2.19.6 gets when that opens a cursor (D168 and D178). - Amazon DynamoDB. The package
dynamodbruns PartiQL, measured on DynamoDB Local 3.2.0 and 3.3.1. The DSN isdynamodb://key:secret@host:port?region=rwith the keystls,regionandtoken. The driver signs each request with AWS Signature Version 4, andtokensends the session token of temporary credentials.dynamodb.Setbinds a set. The service of AWS is not tested, only DynamoDB Local (D169 and D178).
What a caller must know
- A statement that changes rows gives no count on ClickHouse, Drill (except
CREATE TABLE AS), DynamoDB, Elasticsearch, OpenSearch and Solr.RowsAffectedthen returns an error that wrapsdbimp.ErrNotSupported, and the driver returns a count whenever the server sends one (D178). - Elasticsearch, OpenSearch and DynamoDB store a context in their rows, for the request of the next page. Hard rule 4 of
AGENTS.mdnames them. - The driver of Drill keeps settings of a statement in the session. A later statement on the same connection can still have an
autoLimitthat an earlier one set, and rows can be lost with no sign.ALTER SESSION RESET ALLclears it. - An OpenSearch result that has no page size is cut at 10000 rows with no sign. The ordinary user of 2.19.6 reaches that when it sets
WithParameter("fetch_size", 0). - A
floatof Elasticsearch is read as afloat64, and a day-time interval of more than about 292 years fails the row.
Other changes
- The signer of AWS Signature Version 4 is in the root package as
dbimp.SignV4, and the recorder uses it too. - Alternator of ScyllaDB is not part of the DynamoDB driver (D163).
- The
dbmetapin of the workflow is the releasev0.3.0. - The type matrix of
docs/TYPES.mdhas a column for each new driver.
Tests
CI passed all 42 jobs on the tagged commit. Three earlier runs of almost the same code failed one or two jobs, because two tests were not deterministic. The Solr test wrote its schema commands in a random order, because encoding/json/v2 writes the keys of a map in any order. The OpenSearch test read the count of points in time before the server dropped the last one. Both tests are fixed, and the OpenSearch cause is a best guess that no run reproduced.