inspect

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Priority

func Priority(c Column) (p int)

Priority evaluates view priority

Types

type Column

type Column struct {
	Database string
	Table    string
	Name     string
	Comment  string

	Type     Type
	Nullable bool
	Unsigned bool
	Indexed  bool
	Size     int
	Values   []string

	OriginalType string
}

Column is high level abstraction over database column

type ContentType

type ContentType int

ContentType defines column content

const (
	RawContent ContentType = iota
	IdentifierContent
	RelationIdentifierContent
	TimestampContext
	BooleanContent
	SecretContent
	NameContent
	TitleContent
	EmailContent
	URIContent
	FirstNameContent
	LastNameContent
	AddressContent
	CountryContent
	CityContent
	PostalZipContent
	PhoneContent
)

func ResolveContentType

func ResolveContentType(c Column) ContentType

ResolveContentType resolves column content

func (ContentType) String

func (c ContentType) String() string

type Type

type Type byte
const (
	Unknown     Type = iota // Unknown or unidentified column type
	Text                    // String column type of any size
	Integer                 // Integer column type
	Decimal                 // Floating point column type
	Binary                  // Binary column type
	Boolean                 // Boolean column type
	Enumeration             // Enumeration column type
	Set                     // Set column type
	TimeStamp               // Timestamp column type
	DateTime                // Datetime column type
	Date                    // Date column type (without time)
	Time                    // Time column type (without date)
)

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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