Help us shape the future of Go! Take the 2026 Go Developer Survey

reject

package
v0.24.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package reject provides a Scrapper decorator that drops rows whose identity fields (the parts forming an object's fully-qualified name) contain NUL bytes or invalid UTF-8.

Unlike sanitize, which repairs bad strings in place, reject discards the row entirely — because a sanitised identifier might collide with another object or fail to resolve against the warehouse. For non-identity content (descriptions, SQL, tag values), compose with sanitize:

sanitize.NewSanitizingScrapper(reject.NewRejectingScrapper(inner))

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RejectingScrapper

type RejectingScrapper struct {
	// contains filtered or unexported fields
}

func NewRejectingScrapper

func NewRejectingScrapper(inner scrapper.Scrapper) *RejectingScrapper

func (*RejectingScrapper) Capabilities

func (s *RejectingScrapper) Capabilities() scrapper.Capabilities

func (*RejectingScrapper) Close

func (s *RejectingScrapper) Close() error

func (*RejectingScrapper) DialectType

func (s *RejectingScrapper) DialectType() string

func (*RejectingScrapper) EstimateQuery added in v0.16.0

func (s *RejectingScrapper) EstimateQuery(ctx context.Context, sql string) (*scrapper.QueryEstimate, error)

EstimateQuery returns a numeric estimate with no identity fields, so there is nothing to reject — pass through.

func (*RejectingScrapper) IsPermissionError

func (s *RejectingScrapper) IsPermissionError(err error) bool

func (*RejectingScrapper) QueryCatalog

func (s *RejectingScrapper) QueryCatalog(ctx context.Context) ([]*scrapper.CatalogColumnRow, error)

func (*RejectingScrapper) QueryCustomMetrics

func (s *RejectingScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*scrapper.CustomMetricsRow, error)

func (*RejectingScrapper) QueryDatabases

func (s *RejectingScrapper) QueryDatabases(ctx context.Context) ([]*scrapper.DatabaseRow, error)

func (*RejectingScrapper) QueryPlatformUsers added in v0.21.0

func (s *RejectingScrapper) QueryPlatformUsers(ctx context.Context) (*scrapper.PlatformUsers, error)

QueryPlatformUsers drops users whose login is not a valid string; the listing's other fields are not identities and are left to sanitize.

func (*RejectingScrapper) QueryRoutines added in v0.23.0

func (s *RejectingScrapper) QueryRoutines(ctx context.Context) ([]*scrapper.RoutineRow, error)

func (*RejectingScrapper) QuerySchemas added in v0.14.5

func (s *RejectingScrapper) QuerySchemas(ctx context.Context) ([]*scrapper.SchemaRow, error)

func (*RejectingScrapper) QuerySegments

func (s *RejectingScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*scrapper.SegmentRow, error)

func (*RejectingScrapper) QueryShape

func (s *RejectingScrapper) QueryShape(ctx context.Context, sql string) ([]*scrapper.QueryShapeColumn, error)

func (*RejectingScrapper) QuerySqlDefinitions

func (s *RejectingScrapper) QuerySqlDefinitions(ctx context.Context) ([]*scrapper.SqlDefinitionRow, error)

func (*RejectingScrapper) QueryTableConstraints

func (s *RejectingScrapper) QueryTableConstraints(ctx context.Context) ([]*scrapper.TableConstraintRow, error)

func (*RejectingScrapper) QueryTableMetrics

func (s *RejectingScrapper) QueryTableMetrics(ctx context.Context, lastMetricsFetchTime time.Time) ([]*scrapper.TableMetricsRow, error)

func (*RejectingScrapper) QueryTables

func (*RejectingScrapper) RunRawQuery added in v0.13.7

func (*RejectingScrapper) SqlDialect

func (s *RejectingScrapper) SqlDialect() sqldialect.Dialect

func (*RejectingScrapper) Unwrap added in v0.13.3

func (s *RejectingScrapper) Unwrap() scrapper.Scrapper

Unwrap returns the inner scrapper, letting callers walk the decorator chain (via scrapper.As) to reach concrete types or interfaces this wrapper does not itself implement.

func (*RejectingScrapper) ValidateConfiguration

func (s *RejectingScrapper) ValidateConfiguration(ctx context.Context) (warnings []string, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL