Documentation
¶
Index ¶
- Constants
- func NewStmt(query string, c *Conn) *stmt
- 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)deprecated
- 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)deprecated
- func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
- type Connector
- type Dataset
- type Driver
Constants ¶
View Source
const (
ConnectionStringEnvKey = "BIGQUERY_CONNECTION_STRING"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ProjectID string
Location string
DatasetID string
ApiKey string
Credentials string
}
func ConfigFromConnString ¶
ConfigFromConnString will return the Config structures
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) ExecContext ¶
type Connector ¶
type Connector struct {
Info map[string]string
Client *bigquery.Client
// contains filtered or unexported fields
}
func NewConnector ¶
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
}
Click to show internal directories.
Click to hide internal directories.