compat

package
v0.0.0-...-28c5d24 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderMarkdownReport

func RenderMarkdownReport(commands AWSCommandManifestResult, legacy LegacyCorpusStats) string

Types

type AWSCommand

type AWSCommand struct {
	Name      string        `json:"name"`
	Status    CommandStatus `json:"status"`
	SampleSQL string        `json:"sample_sql,omitempty"`
	Notes     string        `json:"notes,omitempty"`
}

type AWSCommandManifest

type AWSCommandManifest struct {
	Source   ManifestSource `json:"source"`
	Commands []AWSCommand   `json:"commands"`
}

func LoadAWSCommandManifest

func LoadAWSCommandManifest(path string) (*AWSCommandManifest, error)

type AWSCommandManifestResult

type AWSCommandManifestResult struct {
	Source   ManifestSource
	Commands []AWSCommandResult
	Counts   map[CommandStatus]int
}

func EvaluateAWSCommandManifest

func EvaluateAWSCommandManifest(manifest *AWSCommandManifest) AWSCommandManifestResult

type AWSCommandResult

type AWSCommandResult struct {
	Name       string
	Status     CommandStatus
	SampleSQL  string
	ParseOK    bool
	ParseError string
	Notes      string
}

type CommandStatus

type CommandStatus string
const (
	StatusSupportedParse      CommandStatus = "supported_parse"
	StatusSupportedRuntime    CommandStatus = "supported_runtime"
	StatusExplicitUnsupported CommandStatus = "explicit_unsupported"
	StatusNotRelevant         CommandStatus = "not_relevant"
)

func (CommandStatus) Valid

func (s CommandStatus) Valid() bool

type EvaluateReferenceOptions

type EvaluateReferenceOptions struct {
	DSN     string
	Samples []string
}

type LegacyCorpusStats

type LegacyCorpusStats struct {
	TotalFiles           int
	PassingFiles         int
	ExpectedFailureFiles int
	NewFailureFiles      int
	PromotedFiles        int
	NewFailures          []string
	Promoted             []string
}

func EvaluateLegacyCorpus

func EvaluateLegacyCorpus(fixturesDir, expectedFailuresPath string) (LegacyCorpusStats, error)

type LegacyStatementParityStats

type LegacyStatementParityStats struct {
	TotalStatements              int
	BothAccept                   int
	BothReject                   int
	OldAcceptsOmniRejects        int
	OldRejectsOmniAccepts        int
	OldAcceptsOmniRejectExamples []string
	OldRejectsOmniAcceptExamples []string
}

func EvaluateLegacyStatementParity

func EvaluateLegacyStatementParity(fixturesDir string) (LegacyStatementParityStats, error)

type ManifestSource

type ManifestSource struct {
	URL       string `json:"url"`
	Retrieved string `json:"retrieved"`
}

type ReferenceRedshiftResult

type ReferenceRedshiftResult struct {
	Enabled    bool
	SkipReason string
	Total      int
	Accepted   int
	Rejected   int
	Errors     []string
}

func EvaluateReferenceRedshift

func EvaluateReferenceRedshift(options EvaluateReferenceOptions) ReferenceRedshiftResult

type RuntimeSemanticStats

type RuntimeSemanticStats struct {
	TotalChecks  int
	PassedChecks int
	FailedChecks int
	Failures     []string
}

func EvaluateRuntimeSemantics

func EvaluateRuntimeSemantics() RuntimeSemanticStats

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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