columnselector

package
v0.0.0-...-4624acb Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnSelector

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

ColumnSelector manages an array of selectors, the first selector match the given event is used to select out columns.

func New

New return a column selector

func (*ColumnSelector) Apply

func (c *ColumnSelector) Apply(event *model.RowChangedEvent) error

Apply the column selector to the given event.

func (*ColumnSelector) VerifyColumn

func (c *ColumnSelector) VerifyColumn(schema, table, column string) bool

VerifyColumn return true if the given `schema.table` column is matched.

func (*ColumnSelector) VerifyTables

func (c *ColumnSelector) VerifyTables(
	infos []*model.TableInfo, eventRouter *dispatcher.EventRouter,
) error

VerifyTables return the error if any given table cannot satisfy the column selector constraints. 1. if the column is filter out, it must not be a part of handle key or the unique key. 2. if the filtered out column is used in the column dispatcher, return error.

Jump to

Keyboard shortcuts

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