models

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig added in v0.3.4

type AppConfig struct {
	DefaultPageSize int
	DisableSidebar  bool
}

type CellValue added in v0.2.7

type CellValue struct {
	Value            interface{}
	Column           string
	TableColumnIndex int
	TableRowIndex    int
	Type             CellValueType
}

type CellValueType added in v0.2.7

type CellValueType int8
const (
	Empty CellValueType = iota
	Null
	Default
	String
)

This is not a direct map of the database types, but rather a way to represent them in the UI. So the String type is a representation of the cell value in the UI table and the others are just a representation of the values that you can put in the database but not in the UI as a string of characters.

type Command added in v0.3.3

type Command struct {
	Command     string
	WaitForPort string
}

type Connection

type Connection struct {
	Name string

	// either use this directly
	URL string

	// or parse manually
	Provider  string
	Username  string
	Password  string
	Hostname  string
	Port      string
	DBName    string
	URLParams string

	Commands []*Command
}

type ConnectionPages

type ConnectionPages struct {
	*tview.Flex
	*tview.Pages
}

type DBDMLChange added in v0.3.3

type DBDMLChange struct {
	Database       string
	Table          string
	PrimaryKeyInfo []PrimaryKeyInfo
	Values         []CellValue
	Type           DMLType
}

type DMLType added in v0.3.3

type DMLType int8
const (
	DMLUpdateType DMLType = iota
	DMLDeleteType
	DMLInsertType
)

type DatabaseTableColumn added in v0.1.8

type DatabaseTableColumn struct {
	Field   string
	Type    string
	Null    string
	Key     string
	Default string
	Extra   string
}

type PrimaryKeyInfo added in v0.3.1

type PrimaryKeyInfo struct {
	Name  string
	Value string
}

func (PrimaryKeyInfo) Equal added in v0.3.1

func (pki PrimaryKeyInfo) Equal(other PrimaryKeyInfo) bool

type Query added in v0.2.7

type Query struct {
	Query string
	Args  []interface{}
}

type SidebarEditingCommitParams added in v0.3.0

type SidebarEditingCommitParams struct {
	ColumnName string
	NewValue   string
	Type       CellValueType
}

type StateChange

type StateChange struct {
	Value interface{}
	Key   string
}

Jump to

Keyboard shortcuts

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