er

package
v0.0.0-...-72db849 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 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 Column

type Column struct {
	Head

	Type string `json:"type"`
	Of   string `json:"of,omitzero"`

	GoType string `json:"-"`
}

type Constraint

type Constraint struct {
	Head

	ColumnNames []ConstraintColumnName `json:"columnNames"`
	Method      string                 `json:"method,omitzero"`
	Unique      bool                   `json:"unique,omitzero"`
	Primary     bool                   `json:"primary,omitzero"`
}

type ConstraintColumnName

type ConstraintColumnName struct {
	Name    string   `json:"name"`
	Options []string `json:"options,omitzero"`
}

type Database

type Database struct {
	Head

	Tables map[string]*Table `json:"tables"`
}
type Head struct {
	Name string `json:"-"`

	Title       string `json:"title,omitzero"`
	Description string `json:"description,omitzero"`
}

type OrderedColumn

type OrderedColumn struct {
	Head

	Type string `json:"type"`
	Of   string `json:"of,omitzero"`

	GoType string `json:"-"`
}

type OrderedConstraint

type OrderedConstraint struct {
	Head

	ColumnNames []ConstraintColumnName `json:"columnNames"`
	Method      string                 `json:"method,omitzero"`
	Unique      bool                   `json:"unique,omitzero"`
	Primary     bool                   `json:"primary,omitzero"`
}

type OrderedDatabase

type OrderedDatabase struct {
	Head

	Tables record[string, *OrderedTable] `json:"tables"`
}

func (*OrderedDatabase) Er

func (*OrderedDatabase) OneOf

func (d *OrderedDatabase) OneOf() []any

type OrderedTable

type OrderedTable struct {
	Head

	Columns     record[string, *OrderedColumn]     `json:"columns"`
	Constraints record[string, *OrderedConstraint] `json:"constraints"`
}

type Table

type Table struct {
	Head

	Columns     map[string]*Column     `json:"columns"`
	Constraints map[string]*Constraint `json:"constraints"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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