Documentation ¶
Index ¶
- func ExampleRowsNext()
- func NewConnector(cfg *Config) (driver.Connector, error)
- type Config
- type Driver
- type NamedValues
- type Rows
- type Statement
- func (s *Statement) CheckNamedValue(n *driver.NamedValue) error
- func (s *Statement) Close() error
- func (s *Statement) Exec(args []driver.Value) (driver.Result, error)
- func (s *Statement) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
- func (s *Statement) NumInput() int
- func (s *Statement) Query(args []driver.Value) (driver.Rows, error)
- func (s *Statement) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { CredentialsFile string // Username Endpoint string APIKey string CredentialJSON string UserAgent string ProjectID string // project ID DatasetID string QuotaProject string Scopes []string Location string App string url.Values }
Config is a configuration parsed from a DSN string. If a new Config is created instead of being parsed from a DSN string, the NewConfig function should be used, which sets default values.
type Driver ¶
type Driver struct{}
Driver is exported to make the driver directly accessible. In general the driver is used via the database/sql package.
func (Driver) Open ¶
Open new Connection. See https://github.com/viant/bigquery#dsn-data-source-name for how the DSN string is formatted
type NamedValues ¶
type NamedValues []driver.NamedValue
NamedValues represents name values slice
func (NamedValues) QueryParameter ¶
func (v NamedValues) QueryParameter() ([]*bigquery.QueryParameter, error)
QueryParameter converts value to query parameters
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
Rows abstraction implements database/sql driver.Rows interface
func (*Rows) ColumnTypeDatabaseTypeName ¶
ColumnTypeDatabaseTypeName returns column database type name
func (*Rows) ColumnTypeNullable ¶
ColumnTypeNullable returns if column is nullable
func (*Rows) ColumnTypeScanType ¶
ColumnTypeScanType returns column scan type
type Statement ¶
type Statement struct {
// contains filtered or unexported fields
}
Statement abstraction implements database/sql driver.Statement interface
func (*Statement) CheckNamedValue ¶
func (s *Statement) CheckNamedValue(n *driver.NamedValue) error
CheckNamedValue checks name values
func (*Statement) ExecContext ¶
func (s *Statement) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
ExecContext executes statements
func (*Statement) QueryContext ¶
func (s *Statement) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
QueryContext runs query