dbschema

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

Parser implements a database schema parser for SQL DDL

func NewParser

func NewParser() *Parser

NewParser creates a new database schema parser

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, r io.Reader) ([]core.Chunk, error)

Parse parses SQL DDL into chunks

func (*Parser) ParseWithCallback

func (p *Parser) ParseWithCallback(ctx context.Context, r io.Reader, callback func(core.Chunk) error) error

ParseWithCallback parses SQL DDL and calls the callback for each chunk

func (*Parser) SetChunkOverlap

func (p *Parser) SetChunkOverlap(overlap int)

SetChunkOverlap sets the chunk overlap

func (*Parser) SetChunkSize

func (p *Parser) SetChunkSize(size int)

SetChunkSize sets the chunk size

func (*Parser) SetExtractColumns

func (p *Parser) SetExtractColumns(extract bool)

SetExtractColumns sets whether to extract columns

func (*Parser) SetExtractIndexes

func (p *Parser) SetExtractIndexes(extract bool)

SetExtractIndexes sets whether to extract indexes

func (*Parser) SetExtractTables

func (p *Parser) SetExtractTables(extract bool)

SetExtractTables sets whether to extract tables

func (*Parser) SupportedFormats

func (p *Parser) SupportedFormats() []string

Jump to

Keyboard shortcuts

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