Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueryMany ¶
type QueryMany[T any] struct { Sql string Args []interface{} Postprocessors []func(row *T) (*T, error) ProcessBatchSize int }
func NewQueryMany ¶
type QueryManyOpt ¶
func WithArgs ¶
func WithArgs[T any](args ...interface{}) QueryManyOpt[T]
func WithPostProcessors ¶
func WithPostProcessors[T any](fn ...func(row *T) (*T, error)) QueryManyOpt[T]
func WithProcessBatchSize ¶
func WithProcessBatchSize[T any](size int) QueryManyOpt[T]
type QueryMapResult ¶
type QueryMapResult map[string]interface{}
QueryMapResult is one row of a QueryMaps read, keyed by the column names the driver reported.
The keys stay exactly as the warehouse spelled them: a caller ranging over a row is showing a customer their own columns back, and folding them would rename every column of every Snowflake query. Reading one column out by the alias the query asked for goes through Get instead.
func (QueryMapResult) Get ¶ added in v0.17.0
func (r QueryMapResult) Get(column string) (interface{}, bool)
Get reads one column, matching the name case-insensitively.
Indexing the map directly is what makes a folded-case result set silent. An account with QUOTED_IDENTIFIERS_IGNORE_CASE = TRUE stores quoted identifiers upper-cased, and every alias our SQL asks for is quoted, so a row of `AS "fail_0"` comes back keyed FAIL_0. A caller indexing it with "fail_0" misses, reads the miss as zero, and reports a SQL test green that should have caught bad data. Nothing raises an error anywhere along that path, which is why the lookup has to fold rather than the caller having to know.
An absent column is still absent, so an alias we got wrong stays a miss rather than being papered over, and a column present but NULL is found with a nil value. Where a result set carries two columns that differ only in case, the exact spelling wins.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package athena provides a database/sql-style executor backed by github.com/influxdata/athenadriver/v2.
|
Package athena provides a database/sql-style executor backed by github.com/influxdata/athenadriver/v2. |
|
Package fabric provides a Microsoft Fabric executor.
|
Package fabric provides a Microsoft Fabric executor. |
|
Package querier is a generated GoMock package.
|
Package querier is a generated GoMock package. |