schema

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeSQLWhitespace

func NormalizeSQLWhitespace(sqlText string) string

NormalizeSQLWhitespace canonicalizes SQL text for stable comparisons.

Types

type Diff

type Diff struct {
	HasDifferences bool     `json:"has_differences"`
	Differences    []string `json:"differences"`
}

Diff captures semantic differences between two normalized models.

func CompareModelsWithLabels

func CompareModelsWithLabels(left, right NormalizedModel, leftLabel, rightLabel string, maxDiffEntries int) Diff

CompareModelsWithLabels compares two normalized models and annotates diff labels.

type NormalizedModel

type NormalizedModel struct {
	Lines       []string `json:"lines"`
	Fingerprint string   `json:"fingerprint"`
}

NormalizedModel is a deterministic representation of schema state.

func BuildFromLines

func BuildFromLines(lines []string) NormalizedModel

BuildFromLines creates a normalized model from already canonical signature lines.

func BuildFromSQL

func BuildFromSQL(filename, sqlText string) NormalizedModel

BuildFromSQL creates a normalized deterministic model from SQL text.

Jump to

Keyboard shortcuts

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