mysql

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: 8 Imported by: 0

Documentation

Overview

Package mysql provides SQL keyword constants for the MySQL parser.

Package mysql implements a DDL parser for MySQL schemas.

This parser supports MySQL-specific DDL syntax including:

  • AUTO_INCREMENT
  • TIMESTAMP with ON UPDATE
  • ENUM and SET types
  • Full-text indexes
  • MySQL-specific column attributes

Index

Constants

View Source
const (
	KeywordPrimary    = "PRIMARY"
	KeywordUnique     = "UNIQUE"
	KeywordIndex      = "INDEX"
	KeywordKey        = "KEY"
	KeywordCheck      = "CHECK"
	KeywordForeign    = "FOREIGN"
	KeywordConstraint = "CONSTRAINT"
	KeywordFullText   = "FULLTEXT"
	KeywordSpatial    = "SPATIAL"
)

SQL keywords used in MySQL DDL parsing.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

Parser implements diagnostic.SchemaParser for MySQL dialect.

func New

func New() *Parser

New creates a new MySQL schema parser.

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, path string, content []byte) (*model.Catalog, []diagnostic.Diagnostic, error)

Parse parses MySQL DDL content and returns a catalog.

Jump to

Keyboard shortcuts

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