Documentation ¶
Index ¶
- func WithInRangeForDateShardingTable(tableID string, start string, end string) (bool, error)
- type APIOptions
- type BQColumn
- type BigQueryService
- type DateShardingTableTarget
- type JobResult
- type Service
- type StreamingInsertError
- type StreamingInsertErrors
- type TableService
- func (s *TableService) Close(ctx context.Context) error
- func (s *TableService) DeleteByPrefix(ctx context.Context, projectID string, datasetID string, tablePrefix string, ...) ([]string, error)
- func (s *TableService) ExistColumn(ctx context.Context, projectID string, datasetID string, tableID string, ...) (bool, error)
- func (s *TableService) RunDMLToShardingTables(ctx context.Context, projectID string, datasetID string, ...) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIOptions ¶ added in v1.17.0
type APIOptions func(options *apiOptions)
func WithDryRun ¶ added in v1.17.0
func WithDryRun() APIOptions
WithDryRun is 変更が発生するbigqueryのAPIは実行しない
func WithStreamLogFn ¶ added in v1.17.0
func WithStreamLogFn(f func(msg string)) APIOptions
WithStreamLogFn is Query結果を元にAPIを実行した時にログを処理できる関数を指定できる
func WithWait ¶ added in v1.18.3
func WithWait() APIOptions
WithWait is Jobが一つずつ完了するのを待ってから、次のJobを投入する
type BigQueryService ¶
func NewBigQueryService ¶
func NewBigQueryService(bq *bigquery.Client) (*BigQueryService, error)
func (*BigQueryService) Close ¶
func (s *BigQueryService) Close() error
type DateShardingTableTarget ¶ added in v1.18.3
type Service ¶ added in v1.17.0
func NewService ¶ added in v1.17.0
func (*Service) DeleteTablesByTablePrefix ¶ added in v1.17.0
func (s *Service) DeleteTablesByTablePrefix(ctx context.Context, projectID string, datasetID string, tablePrefix string, ops ...APIOptions) ([]string, error)
DeleteTablesByTablePrefix is 指定したPrefixに合致するTableを削除する
削除したTableIDの一覧を返す 途中で削除に失敗した場合もそれまで削除したTableIDの一覧は返す
type StreamingInsertError ¶
func (*StreamingInsertError) Error ¶
func (e *StreamingInsertError) Error() string
type StreamingInsertErrors ¶
type StreamingInsertErrors struct { Errors []*StreamingInsertError // contains filtered or unexported fields }
func (*StreamingInsertErrors) Append ¶
func (e *StreamingInsertErrors) Append(err *StreamingInsertError)
func (*StreamingInsertErrors) Error ¶
func (e *StreamingInsertErrors) Error() string
func (*StreamingInsertErrors) ErrorOrNil ¶
func (e *StreamingInsertErrors) ErrorOrNil() error
type TableService ¶ added in v1.18.0
func NewTableService ¶ added in v1.18.0
func (*TableService) Close ¶ added in v1.18.0
func (s *TableService) Close(ctx context.Context) error
func (*TableService) DeleteByPrefix ¶ added in v1.18.0
func (s *TableService) DeleteByPrefix(ctx context.Context, projectID string, datasetID string, tablePrefix string, ops ...APIOptions) ([]string, error)
DeleteByPrefix is 指定したPrefixに合致するTableを削除する
削除したTableIDの一覧を返す 途中で削除に失敗した場合もそれまで削除したTableIDの一覧は返す
func (*TableService) ExistColumn ¶ added in v1.18.0
func (s *TableService) ExistColumn(ctx context.Context, projectID string, datasetID string, tableID string, target string) (bool, error)
ExistColumn is 対象のTableに対象のColumnがある場合は、trueを返す ARRAY(STRUCT)には対応していない
func (*TableService) RunDMLToShardingTables ¶ added in v1.18.3
func (s *TableService) RunDMLToShardingTables(ctx context.Context, projectID string, datasetID string, target *DateShardingTableTarget, dml string, ops ...APIOptions) ([]string, error)
RunDMLToShardingTables is ShardingTableに対してDMLを実行する
Click to show internal directories.
Click to hide internal directories.