model

package
v0.0.0-...-56219be Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Pool                   *pgxpool.Pool
	TableList              list.Model
	TableData              table.Model
	SelectedTable          string
	Tables                 []string
	ColumnNames            []string
	Data                   [][]string
	FilteredData           [][]string
	Width                  int
	Height                 int
	Focused                int // 0: table list, 1: table data, 2: detail view
	SearchMode             bool
	SearchInput            textinput.Model
	SearchQuery            string
	ShowHelp               bool
	Help                   help.Model
	Err                    error
	SelectedRow            int
	SelectedRowData        map[string]string // Column name -> value
	ConnectionDetails      string
	HorizontalScrollOffset int // Track horizontal scroll position
}

Model represents the application state

type TableItem

type TableItem struct {
	Name string
}

TableItem represents a database table in the list

func (TableItem) Description

func (i TableItem) Description() string

Description returns the description of the item

func (TableItem) FilterValue

func (i TableItem) FilterValue() string

FilterValue returns the value to filter on

func (TableItem) Title

func (i TableItem) Title() string

Title returns the title of the item

Jump to

Keyboard shortcuts

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