Repository navigation
v0.7.0
This release adds the driver pinot, for Apache Pinot, and gives every driver the Go type that fits the type that its database names. Three drivers change the Go type of some values, so read "What changes for a caller" before you move to it.
New
- Apache Pinot. The package
pinotruns SQL on the Broker of Pinot, measured on 1.4.0 and 1.5.1. The DSN ispinot://user:pass@host:8099, with the keystls,auth,cancelandengine. The driver takes no write, because the Broker takes none (D128). Each query runs on the multi-stage engine, which returns every row of a query that has noLIMIT, unlessengine=singlechooses the other (D131). The driver writes each argument into the text as a literal, because the Broker binds none (D132). It cancels a query whose context ends before its answer arrives (D133 and D134). - Six types in the root package.
dbimp.Date,dbimp.LocalTime,dbimp.OffsetTime,dbimp.LocalDateTimeanddbimp.Intervalhold a date, a time of day, a time of day with an offset, a date and time with no zone, and an interval of months, days and nanoseconds, which Go has no type for (D138 and D139). Each writes and reads ISO 8601, and is adriver.Valuerof that text. A scan into a*time.Timegives the value in UTC, or in the zone of its offset, and a scan into a*stringgives its text.dbimp.Vector[T]is a vector of numbers, which a driver sends as a vector where a plain slice goes as a list.
What changes for a caller
- Neo4j. A
Date, aLocalTime, aTime, aLocalDateTimeand aDurationaredbimp.Date,dbimp.LocalTime,dbimp.OffsetTime,dbimp.LocalDateTimeanddbimp.Interval, and aVectoris adbimp.Vectorof the type of its coordinates, in both directions. The typesneo4j.Date,neo4j.LocalTime,neo4j.Time,neo4j.LocalDateTime,neo4j.Durationandneo4j.Vectorare gone. A duration longer than about 292 years is an error. - Databend. A
Dateis adbimp.Date, where it was atime.Timeat midnight in UTC, and anIntervalis adbimp.Interval, where it was the text of the server. AUInt64is always auint64, where it was anint64, or an*apd.Decimalabove the range ofint64.count(*),numbers,nextvaland a positive integer literal above the range of anInt32are each aUInt64, so each is now auint64. A scan into an*int64still works. An interval argument with a fraction of a microsecond is an error, because the server drops it. AVectoris adbimp.Vector[float32], where it was a[]float32, and a scan into a*[]float32still works. - Databend geometry. A
Geometryand aGeographyfollowgeometry_output_format, at the top of a value and inside anArray, aMapor aTuple: WKT and EWKT are text, WKB and EWKB are a[]byte, and GeoJSON is the decoded JSON value (D136). The driver still asks for WKT. - InfluxDB. A
Date32or aDate64is adbimp.Date, aTime32or aTime64adbimp.LocalTime, and anIntervaladbimp.Interval, where each was atime.Timeor the text of the server. ADurationis atime.Duration.ColumnTypeScanTypenamesTfor a nullable column, where it namedsql.Null[T](D136). - Couchbase. A value whose JSON kind is not the kind that its signature names is an error, so its Go type is always the scan type (D136). No recording holds one.
Other changes
docs/TYPES.mdmaps every type of every driver onto one list of kinds, and a test writes its table from the product documents (D137). Step 8a ofdocs/DRIVER.mdmaps the types of a new driver, with two models, before its code is written.- D135 fixes the rule for every driver: a value has the Go type that fits the type that its database names, and a string column gives a string.