table

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 13 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 interface {
	Parse(table Table) error
}

func NewPostgresqlParser

func NewPostgresqlParser() Parser

func NewSqliteParser

func NewSqliteParser() Parser

type Table

type Table interface {
	AddField(f *field.Field)
	SortFields()
	GetID() uuid.UUID
	GetName() string
	GetSchema() string
	GetPrimaryKey() *field.Field
	GetFields() []*field.Field
	GetFieldNames() []string
	// GetFieldByName returns the Field and its index, given its name.
	GetFieldByName(name string) (int, *field.Field)
	GetFieldByIndex(index int) *field.Field
	GetFieldsString() string
}

Table represents a database table.

func New

func New(row sql.Rows, parser Parser) (Table, error)

func NewUnparsed

func NewUnparsed(row sql.Rows) (Table, error)

Jump to

Keyboard shortcuts

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