tui

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunConnectTypeMenu added in v1.0.2

func RunConnectTypeMenu() (int, error)

func RunCreateTypeMenu added in v1.0.2

func RunCreateTypeMenu() (int, error)

func RunDBList

func RunDBList(databases []string) (string, error)

RunDBList is used for selection (e.g., when deleting a database)

func RunDBListDisplay added in v1.0.0

func RunDBListDisplay(databases []string) error

RunDBListDisplay simply displays all databases without selection

func RunDBOperationsMenu

func RunDBOperationsMenu(dbName string) (int, error)

func RunMainMenu

func RunMainMenu() (int, error)

func RunPagedDataViewer added in v1.0.0

func RunPagedDataViewer(conn *sql.DB, tableName string) error

RunPagedDataViewer opens a viewer that loads 100-row pages on demand (Enter to load more)

func RunSQLEditor

func RunSQLEditor(db *sql.DB, dbName string) error

func RunTableList

func RunTableList(tables []string) (string, error)

func ShowASCIIArt added in v0.2.1

func ShowASCIIArt()

ShowASCIIArt is the public function to display the ASCII art

Types

type AdminFormModel

type AdminFormModel struct {
	Inputs   []textinput.Model
	Quitting bool
	// contains filtered or unexported fields
}

func (AdminFormModel) Init

func (m AdminFormModel) Init() tea.Cmd

func (AdminFormModel) Update

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

func (AdminFormModel) View

func (m AdminFormModel) View() string

type AdminResult

type AdminResult struct {
	User     string
	Password string
	Port     string
	Quitting bool
}

func RunAdminForm

func RunAdminForm() (AdminResult, error)

type ConnectFormModel

type ConnectFormModel struct {
	Inputs   []textinput.Model
	Quitting bool
	// contains filtered or unexported fields
}

func (ConnectFormModel) Init

func (m ConnectFormModel) Init() tea.Cmd

func (ConnectFormModel) Update

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

func (ConnectFormModel) View

func (m ConnectFormModel) View() string

type ConnectResult

type ConnectResult struct {
	DBType   string
	Port     string
	User     string
	Password string
	DBName   string
	Quitting bool
}

func RunConnectForm

func RunConnectForm() (ConnectResult, error)

type ContainerFormModel added in v1.0.2

type ContainerFormModel struct {
	Inputs   []textinput.Model
	Quitting bool
	// contains filtered or unexported fields
}

func (ContainerFormModel) Init added in v1.0.2

func (m ContainerFormModel) Init() tea.Cmd

func (ContainerFormModel) Update added in v1.0.2

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

func (ContainerFormModel) View added in v1.0.2

func (m ContainerFormModel) View() string

type ContainerFormResult added in v1.0.2

type ContainerFormResult struct {
	ContainerName string
	DatabaseName  string
	Username      string
	Port          string
	Password      string
	Quitting      bool
}

func RunContainerForm added in v1.0.2

func RunContainerForm() (ContainerFormResult, error)

type CreateFormModel

type CreateFormModel struct {
	Inputs   []textinput.Model
	Quitting bool
	// contains filtered or unexported fields
}

func RunCreateForm

func RunCreateForm() (CreateFormModel, error)

func (CreateFormModel) Init

func (m CreateFormModel) Init() tea.Cmd

func (CreateFormModel) Update

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

func (CreateFormModel) View

func (m CreateFormModel) View() string

type PasswordFormModel added in v1.0.2

type PasswordFormModel struct {
	Input    textinput.Model
	Quitting bool
	// contains filtered or unexported fields
}

func (PasswordFormModel) Init added in v1.0.2

func (m PasswordFormModel) Init() tea.Cmd

func (PasswordFormModel) Update added in v1.0.2

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

func (PasswordFormModel) View added in v1.0.2

func (m PasswordFormModel) View() string

type PasswordFormResult added in v1.0.2

type PasswordFormResult struct {
	Password string
	Quitting bool
}

func RunPasswordForm added in v1.0.2

func RunPasswordForm() (PasswordFormResult, error)

type QueryCache

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

QueryCache stores and manages SQL query commands for autocomplete

func NewQueryCache

func NewQueryCache() *QueryCache

NewQueryCache creates a new query cache with common SQL keywords

func (*QueryCache) AddCommand

func (qc *QueryCache) AddCommand(command string)

AddCommand adds a command to the cache or increments its frequency

func (*QueryCache) CacheColumns added in v1.0.0

func (qc *QueryCache) CacheColumns(columns []string)

CacheColumns caches table columns for autocomplete

func (*QueryCache) CacheTables added in v1.0.0

func (qc *QueryCache) CacheTables(tables []string)

CacheTables caches table names for autocomplete

func (*QueryCache) GetMostUsedCommands

func (qc *QueryCache) GetMostUsedCommands(limit int) []string

GetMostUsedCommands returns the most frequently used commands

func (*QueryCache) GetSuggestions

func (qc *QueryCache) GetSuggestions(input string) []string

GetSuggestions returns suggestions based on the current input

Jump to

Keyboard shortcuts

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