table

package
v0.3.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CursorAtUpdateValue cursorPositionHint = iota // Inside the value in UPDATE SET col = 'value'
	CursorAtWhereClause                           // Inside the value in WHERE col = 'value'
	CursorAtEndOfFile                             // At the end of the file
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

func New

func New(
	columns []string,
	passedColumnTypes []string,
	data [][]string,
	elapsed time.Duration,
	conn db.DatabaseConnection,
	tableName, primaryKeyCol string,
	query db.Query,
	columnWidth int,
) Model

func Render

func Render(
	columns []string,
	columnTypes []string,
	data [][]string,
	elapsed time.Duration,
	conn db.DatabaseConnection,
	tableName, primaryKeyCol string,
	query db.Query,
	columnWidth int,
	saveCallback func(query db.Query) (db.Query, error),
	initialStatus ...string,
) (Model, error)

func RenderTablesList

func RenderTablesList(
	columns []string,
	data [][]string,
	elapsed time.Duration,
	conn db.DatabaseConnection,
	query db.Query,
	columnWidth int,
) (Model, error)

func (Model) GetEditedQuery

func (m Model) GetEditedQuery() db.Query

func (Model) GetSelectedTableName

func (m Model) GetSelectedTableName() string

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) SetStatusMessage

func (m Model) SetStatusMessage(msg string) Model

func (Model) SetTablesList

func (m Model) SetTablesList(onSelect func(string) tea.Cmd) Model

func (Model) ShouldRerunQuery

func (m Model) ShouldRerunQuery() bool

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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