redirect

package
v0.0.0-...-230ac96 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	RuleName       string
	SourceRelation string
	TargetRelation string
}

type Input

type Input struct {
	SQL       string
	Statement effects.ClassifiedStatement
	Action    Action
}

type Plan

type Plan struct {
	RewrittenSQL   string
	RuleName       string
	SourceRelation string
	TargetRelation string
}

type Planner

type Planner struct {
	Backend SQLBackend
}

func (Planner) Plan

func (p Planner) Plan(in Input) (Plan, error)

type Reason

type Reason string
const (
	ReasonUnsupportedStatement    Reason = "unsupported_statement"
	ReasonMultiStatement          Reason = "multi_statement"
	ReasonNonSelectStatement      Reason = "non_select_statement"
	ReasonWriteStatement          Reason = "write_statement"
	ReasonDDLStatement            Reason = "ddl_statement"
	ReasonCopyStatement           Reason = "copy_statement"
	ReasonProceduralStatement     Reason = "procedural_statement"
	ReasonFunctionCallProtocol    Reason = "function_call_protocol"
	ReasonUnresolvedObject        Reason = "unresolved_object"
	ReasonMissingRedirectTarget   Reason = "missing_redirect_target"
	ReasonAmbiguousRedirectSource Reason = "ambiguous_redirect_source"
	// ReasonAmbiguousSource is a compatibility alias used by the Plan 12 dependency gate.
	ReasonAmbiguousSource Reason = ReasonAmbiguousRedirectSource
	ReasonSourceNotFound  Reason = "source_relation_not_found"
	ReasonDeparseFailed   Reason = "deparse_failed"
)

type Rejection

type Rejection struct {
	Reason Reason
	Err    error
}

func (Rejection) Error

func (r Rejection) Error() string

func (Rejection) Unwrap

func (r Rejection) Unwrap() error

type SQLBackend

type SQLBackend interface {
	Parse(sql string) (*pg_query.ParseResult, error)
	Deparse(tree *pg_query.ParseResult) (string, error)
	Backend() effects.ParserBackend
}

Jump to

Keyboard shortcuts

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