Documentation
¶
Index ¶
- Constants
- func GoquDialectOptions() *sqlgen.SQLDialectOptions
- func GoquExpressions() *base.Expressions
- type Config
- type DB
- func (db *DB) CurrentCatalog(ctx context.Context) (string, 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 ¶
View Source
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 Config struct {
ProjectID string `json:"project"`
CredentialsJSON string `json:"credentials"`
UseLegacyMappings bool `json:"useLegacyMappings"`
// Retry configuration for BigQuery API calls
// MaxRetries limits the number of retry attempts (default: unlimited if not set)
MaxRetries *int `json:"maxRetries,omitempty"`
// MaxRetryDuration limits total time spent retrying (e.g., "10m", "30s")
// If both MaxRetries and MaxRetryDuration are set, whichever limit is hit first applies
MaxRetryDuration *string `json:"maxRetryDuration,omitempty"`
}
func (*Config) GetMaxRetryDuration ¶
GetMaxRetryDuration parses the MaxRetryDuration string into a time.Duration Returns nil if MaxRetryDuration is not set or invalid
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) 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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.