Documentation ¶
Index ¶
- type Client
- func (x *Client) CreateTable(ctx context.Context, table types.BQTableID, md *bigquery.TableMetadata) error
- func (x *Client) GetMetadata(ctx context.Context, table types.BQTableID) (*bigquery.TableMetadata, error)
- func (x *Client) Insert(ctx context.Context, table types.BQTableID, schema bigquery.Schema, data any) error
- func (x *Client) UpdateTable(ctx context.Context, table types.BQTableID, md bigquery.TableMetadataToUpdate, ...) error
- type Mock
- func (m *Mock) CreateTable(ctx context.Context, table types.BQTableID, md *bigquery.TableMetadata) error
- func (m *Mock) GetMetadata(ctx context.Context, table types.BQTableID) (*bigquery.TableMetadata, error)
- func (m *Mock) Insert(ctx context.Context, tableID types.BQTableID, schema bigquery.Schema, data any) error
- func (m *Mock) UpdateTable(ctx context.Context, table types.BQTableID, md bigquery.TableMetadataToUpdate, ...) error
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 New ¶
func New(ctx context.Context, projectID types.GoogleProjectID, datasetID types.BQDatasetID, options ...option.ClientOption) (*Client, error)
func (*Client) CreateTable ¶
func (x *Client) CreateTable(ctx context.Context, table types.BQTableID, md *bigquery.TableMetadata) error
CreateTable implements interfaces.BigQuery.
func (*Client) GetMetadata ¶
func (x *Client) GetMetadata(ctx context.Context, table types.BQTableID) (*bigquery.TableMetadata, error)
GetMetadata implements interfaces.BigQuery. If the table does not exist, it returns nil.
type Mock ¶
type Mock struct { FnCreateTable func(ctx context.Context, table types.BQTableID, md *bigquery.TableMetadata) error FnGetMetadata func(ctx context.Context, table types.BQTableID) (*bigquery.TableMetadata, error) FnInsert func(ctx context.Context, tableID types.BQTableID, schema bigquery.Schema, data any) error FnUpdateTable func(ctx context.Context, table types.BQTableID, md bigquery.TableMetadataToUpdate, eTag string) error }
func (*Mock) CreateTable ¶
func (m *Mock) CreateTable(ctx context.Context, table types.BQTableID, md *bigquery.TableMetadata) error
CreateTable implements interfaces.BigQuery.
func (*Mock) GetMetadata ¶
func (m *Mock) GetMetadata(ctx context.Context, table types.BQTableID) (*bigquery.TableMetadata, error)
GetMetadata implements interfaces.BigQuery.
Click to show internal directories.
Click to hide internal directories.