parser

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column added in v1.0.0

type Column struct {
	Name  string
	Value string
	Type  RowType
}

type Enum added in v1.0.0

type Enum struct {
	Name      string
	ValueType RowType
	Keys      []string
	Values    []string
}

func (Enum) IsEmpty added in v1.0.0

func (e Enum) IsEmpty() bool

type Parser

type Parser interface {
	Parse(
		source string,
	) ([]Table, error)
}

type PostgresParser

type PostgresParser struct {
}

func (*PostgresParser) Parse

func (p *PostgresParser) Parse(
	source string,
) ([]Table, error)

type Row

type Row []Column

func (Row) GetByName added in v1.0.0

func (r Row) GetByName(name string) *Column

type RowType added in v1.0.0

type RowType string
const (
	RowTypeString  RowType = "string"
	RowTypeInteger RowType = "integer"
	RowTypeUnknown RowType = "unknown"
)

type Rows added in v1.0.0

type Rows []Row

func (Rows) ToEnum added in v1.0.0

func (r Rows) ToEnum(def entity.SchemaTable) Enum

type Table

type Table struct {
	Name string
	Rows Rows
}

Jump to

Keyboard shortcuts

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