Documentation ¶
Index ¶
- type Client
- func (x *Client) CreateTable(ctx context.Context, dataset types.BQDatasetID, table types.BQTableID, ...) error
- func (x *Client) GetMetadata(ctx context.Context, dataset types.BQDatasetID, table types.BQTableID) (*bigquery.TableMetadata, error)
- func (x *Client) Insert(ctx context.Context, datasetID types.BQDatasetID, tableID types.BQTableID, ...) error
- func (x *Client) NewStream(ctx context.Context, datasetID types.BQDatasetID, tableID types.BQTableID, ...) (interfaces.BigQueryStream, error)
- func (x *Client) Query(ctx context.Context, query string) (interfaces.BigQueryIterator, error)
- func (x *Client) UpdateTable(ctx context.Context, dataset types.BQDatasetID, table types.BQTableID, ...) error
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateTable ¶
func (x *Client) CreateTable(ctx context.Context, dataset types.BQDatasetID, table types.BQTableID, md *bigquery.TableMetadata) error
CreateTable implements interfaces.BigQuery. Nothing to do in dumper.
func (*Client) GetMetadata ¶
func (x *Client) GetMetadata(ctx context.Context, dataset types.BQDatasetID, table types.BQTableID) (*bigquery.TableMetadata, error)
GetMetadata implements interfaces.BigQuery.
func (*Client) Insert ¶
func (x *Client) Insert(ctx context.Context, datasetID types.BQDatasetID, tableID types.BQTableID, schema bigquery.Schema, data []any) error
Insert implements interfaces.BigQuery. It writes data to a file in JSON format. The file name is "{outDir}/{dataset}.{table}.log". If the file does not exist, it creates a new file. If the file exists, it appends data to the file. The file is not uploaded to BigQuery.
func (*Client) NewStream ¶ added in v0.1.2
func (x *Client) NewStream(ctx context.Context, datasetID types.BQDatasetID, tableID types.BQTableID, schema bigquery.Schema) (interfaces.BigQueryStream, error)
func (*Client) Query ¶
func (x *Client) Query(ctx context.Context, query string) (interfaces.BigQueryIterator, error)
Query implements interfaces.BigQuery. It is not implemented and panics if called.
func (*Client) UpdateTable ¶
func (x *Client) UpdateTable(ctx context.Context, dataset types.BQDatasetID, table types.BQTableID, md bigquery.TableMetadataToUpdate, eTag string) error
UpdateSchema implements interfaces.BigQuery. It writes schema to a file in JSON format. The file name is "{outDir}/{dataset}.{table}.schema.json". If the file does not exist, it creates a new file. If the file exists, it overwrites the file. The file is not uploaded to BigQuery.