A Presto client for the Go programming language, adapted from github.com/trinodb/trino-go-client.
This library strips out some of the more advanced Trino-specific functionality (such as the advanced type-scanning logic) and adapts it to work with Presto. This library also works with Trino when configured in Presto-compatibility mode, per the docs here.
Note that this driver aims to be compliant with the database/sql
package interface. In particular, only valid driver.Value
types are returned. The driver therefore behaves as documented in the
Rows.Scan documentation.
In particular, MAP
, ARRAY
, and ROW
types are all returned as strings
containing serialized JSON. This differs from the upstream Trino driver, which
returns map[string]interface{}
for MAP
types and []interface{}
for
ARRAY
/ROW
types (and is therefore non-compliant with the driver.Value
interface requirements).
Note that all date and time types are also returned as strings to maintain the precise format in which they're returned from Presto/Trino itself.
Apache License V2.0, as described in the LICENSE file.