diagnostic

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package diagnostic provides shared types for schema parsing diagnostics.

This package exists to avoid import cycles between the main parser package and dialect-specific parser implementations (e.g., PostgreSQL parser).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	Path     string
	Line     int
	Column   int
	Message  string
	Severity Severity
}

Diagnostic captures parser feedback for callers to display.

type SchemaParser

type SchemaParser interface {
	Parse(ctx context.Context, path string, content []byte) (*model.Catalog, []Diagnostic, error)
}

SchemaParser parses SQL DDL statements and produces a schema catalog.

type Severity

type Severity int

Severity indicates the seriousness of a diagnostic.

const (
	// SeverityError indicates a fatal issue that prevents code generation.
	SeverityError Severity = iota
	// SeverityWarning indicates a potential issue that doesn't prevent code generation.
	SeverityWarning
)

Jump to

Keyboard shortcuts

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