Documentation
¶
Index ¶
- Constants
- type Config
- type Conn
- func (c *Conn) Begin() (driver.Tx, error)
- func (c *Conn) Close() (err error)
- func (c *Conn) Exec(query string, args []driver.Value) (res driver.Result, err error)
- func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
- func (c *Conn) Ping(ctx context.Context) (err error)
- func (c *Conn) Prepare(query string) (stmt driver.Stmt, err error)
- func (c *Conn) Query(query string, args []driver.Value) (rows driver.Rows, err error)
- func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
- type Connector
- type Dataset
- type Driver
- type Stmt
- func (s *Stmt) Close() error
- func (s *Stmt) Exec(args []driver.Value) (driver.Result, error)
- func (s *Stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
- func (s *Stmt) NumInput() int
- func (s *Stmt) Query(args []driver.Value) (driver.Rows, error)
- func (s *Stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
Constants ¶
View Source
const (
//ConnectionStringEnvKey Connection String Environment Key
ConnectionStringEnvKey = "BIGQUERY_CONNECTION_STRING"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ProjectID string
Location string
DatasetID string
APIKey string
Credentials string
CredentialsFile string
}
Config A bigquery client configuration
func ConfigFromConnString ¶
ConfigFromConnString will return the Config structures
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn A connecton
func (*Conn) ExecContext ¶
func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
ExecContext Execute with Context parameter
type Connector ¶
type Connector struct {
Info map[string]string
Client *bigquery.Client
// contains filtered or unexported fields
}
Connector Connector struct
func NewConnector ¶
NewConnector Create a new Connector
type Dataset ¶
type Dataset interface {
// Create creates a dataset in the BigQuery service. An error will be returned if the
// dataset already exists. Pass in a DatasetMetadata value to configure the dataset.
Create(ctx context.Context, md *bigquery.DatasetMetadata) (err error)
// Delete deletes the dataset. Delete will fail if the dataset is not empty.
Delete(ctx context.Context) (err error)
// DeleteWithContents deletes the dataset, as well as contained resources.
DeleteWithContents(ctx context.Context) (err error)
// Metadata fetches the metadata for the dataset.
Metadata(ctx context.Context) (md *bigquery.DatasetMetadata, err error)
// Update modifies specific Dataset metadata fields.
// To perform a read-modify-write that protects against intervening reads,
// set the etag argument to the DatasetMetadata.ETag field from the read.
// Pass the empty string for etag for a "blind write" that will always succeed.
Update(ctx context.Context, dm bigquery.DatasetMetadataToUpdate, etag string) (md *bigquery.DatasetMetadata, err error)
// Table creates a handle to a BigQuery table in the dataset.
// To determine if a table exists, call Table.Metadata.
// If the table does not already exist, use Table.Create to create it.
Table(tableID string) *bigquery.Table
// Tables returns an iterator over the tables in the Dataset.
Tables(ctx context.Context) *bigquery.TableIterator
// Model creates a handle to a BigQuery model in the dataset.
// To determine if a model exists, call Model.Metadata.
// If the model does not already exist, you can create it via execution
// of a CREATE MODEL query.
Model(modelID string) *bigquery.Model
// Models returns an iterator over the models in the Dataset.
Models(ctx context.Context) *bigquery.ModelIterator
// Routine creates a handle to a BigQuery routine in the dataset.
// To determine if a routine exists, call Routine.Metadata.
Routine(routineID string) *bigquery.Routine
// Routines returns an iterator over the routines in the Dataset.
Routines(ctx context.Context) *bigquery.RoutineIterator
}
Dataset Bigquery Dataset
type Driver ¶
type Driver struct {
}
Driver Database Driver
type Stmt ¶
type Stmt struct {
// contains filtered or unexported fields
}
Stmt A query statement
func (*Stmt) Exec ¶
Exec Deprecated: Drivers should implement StmtExecContext instead (or additionally).
func (*Stmt) ExecContext ¶
ExecContext Exec with Context parameter
func (*Stmt) Query ¶
Query Deprecated: Drivers should implement StmtQueryContext instead (or additionally).
func (*Stmt) QueryContext ¶
QueryContext Query with Context parameter
Click to show internal directories.
Click to hide internal directories.