Documentation
¶
Index ¶
- Constants
- func GoquDialectOptions() *sqlgen.SQLDialectOptions
- func GoquExpressions() *base.Expressions
- type Config
- type DB
- func (db *DB) CurrentCatalog(ctx context.Context) (sqlconnect.CatalogRef, error)
- func (db *DB) ListCatalogs(ctx context.Context) ([]sqlconnect.CatalogRef, error)
- func (db *DB) ListSchemas(ctx context.Context) ([]sqlconnect.SchemaRef, error)
- func (db *DB) SchemaExists(ctx context.Context, schemaRef sqlconnect.SchemaRef) (bool, error)
- func (db *DB) WithBigqueryClient(ctx context.Context, f func(*bigquery.Client) error) error
Constants ¶
const (
DatabaseType = "bigquery"
)
Variables ¶
This section is empty.
Functions ¶
func GoquDialectOptions ¶ added in v1.10.0
func GoquDialectOptions() *sqlgen.SQLDialectOptions
func GoquExpressions ¶ added in v1.10.0
func GoquExpressions() *base.Expressions
Types ¶
type Config ¶
type DB ¶
func NewDB ¶
func NewDB(configJSON json.RawMessage) (*DB, error)
NewDB creates a new bigquery db client
func (*DB) CurrentCatalog ¶ added in v1.1.0
func (db *DB) CurrentCatalog(ctx context.Context) (sqlconnect.CatalogRef, error)
func (*DB) ListCatalogs ¶ added in v1.24.0
func (db *DB) ListCatalogs(ctx context.Context) ([]sqlconnect.CatalogRef, error)
ListCatalogs returns the current GCP project Note: The BigQuery Go client (cloud.google.com/go/bigquery) is scoped to a single project and does not provide a method to list all accessible projects. Listing all projects would require the Cloud Resource Manager API with additional permissions, which is out of scope for a BigQuery-only connection. See: https://github.com/googleapis/google-cloud-go/issues/10044
func (*DB) ListSchemas ¶
ListSchemas uses the bigquery client instead of [INFORMATION_SCHEMA.SCHEMATA] due to absence of a region qualifier https://cloud.google.com/bigquery/docs/information-schema-datasets-schemata#scope_and_syntax
func (*DB) SchemaExists ¶
SchemaExists uses the bigquery client instead of [INFORMATION_SCHEMA.SCHEMATA] due to absence of a region qualifier https://cloud.google.com/bigquery/docs/information-schema-datasets-schemata#scope_and_syntax