Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClassifyError ¶ added in v0.8.0
func ClassifyError(err error, opts ...diag.BaseErrorOption) diag.Diagnostics
func WithResource ¶
func WithResource(resource *schema.Resource) diag.BaseErrorOption
Types ¶
type ErrorClassifier ¶
type ErrorClassifier func(meta schema.ClientMeta, resourceName string, err error) diag.Diagnostics
type QueryExecer ¶
type Storage ¶
type Storage interface { QueryExecer Copier Insert(ctx context.Context, t *schema.Table, instance schema.Resources) error Delete(ctx context.Context, t *schema.Table, kvFilters []interface{}) error RemoveStaleData(ctx context.Context, t *schema.Table, executionStart time.Time, kvFilters []interface{}) error CopyFrom(ctx context.Context, resources schema.Resources, shouldCascade bool, CascadeDeleteFilters map[string]interface{}) error Close() Dialect() schema.Dialect }
type TableExecutor ¶
type TableExecutor struct { // ResourceName name of top-level resource associated with table ResourceName string // Table this execution is associated with Table *schema.Table // Database connection to insert data into Db Storage // Logger associated with this execution Logger hclog.Logger // contains filtered or unexported fields }
TableExecutor marks all the related execution info passed to TableResolver and ColumnResolver giving access to the Runner's meta
func NewTableExecutor ¶
func NewTableExecutor(resourceName string, db Storage, logger hclog.Logger, table *schema.Table, extraFields, metadata map[string]interface{}, classifier ErrorClassifier, goroutinesSem *semaphore.Weighted, timeout time.Duration) TableExecutor
NewTableExecutor creates a new TableExecutor for given schema.Table
func (TableExecutor) Resolve ¶
func (e TableExecutor) Resolve(ctx context.Context, meta schema.ClientMeta) (uint64, diag.Diagnostics)
Resolve is the root function of table executor which starts an execution of a Table resolving it, and it's relations.
Click to show internal directories.
Click to hide internal directories.