model

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnMeta

type ColumnMeta struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	PK      bool   `json:"pk"`
	FK      bool   `json:"fk"` // populated by HTTPHandler from Relations(), not Inspector
	NotNull bool   `json:"notNull"`
	Default string `json:"default"` // empty string = no explicit default
	Unique  bool   `json:"unique"`  // true when column has a UNIQUE constraint/index
}

ColumnMeta extends raw column data with constraint information.

type Index

type Index struct {
	Name    string   `json:"name"`
	Unique  bool     `json:"unique"`
	Columns []string `json:"columns"` // key order
	Partial bool     `json:"partial"` // true when a WHERE predicate exists
}

Index describes one database index on a table.

Jump to

Keyboard shortcuts

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