components

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var App = app.App
View Source
var VALUES = []value{}

Functions

func InitFromArg added in v0.3.3

func InitFromArg(connectionString string, readOnly bool) error

func MainPages

func MainPages() *tview.Pages

func NewConnectionPages

func NewConnectionPages() *models.ConnectionPages

func NewErrorModal added in v0.4.1

func NewErrorModal(message string) *tview.Modal

Types

type CSVExportModal added in v0.4.6

type CSVExportModal struct {
	tview.Primitive
	// contains filtered or unexported fields
}

CSVExportModal is a modal for exporting data to CSV.

func NewCSVExportModal added in v0.4.6

func NewCSVExportModal(opts CSVExportOptions, onExport func(filePath string, scope CSVExportScope, batchSize int)) *CSVExportModal

NewCSVExportModal creates a new CSVExportModal.

type CSVExportOptions added in v0.4.6

type CSVExportOptions struct {
	DatabaseName  string // Database name for file naming
	TableName     string // Table name for file naming
	HasPagination bool   // Whether pagination exists (determines UI: 2 buttons vs 1)
	RowCount      int    // Current row count for display (excluding header)
}

CSVExportOptions contains options for creating a CSV export modal.

type CSVExportScope added in v0.4.6

type CSVExportScope int

CSVExportScope defines the scope of data to export

const (
	ExportCurrentPage CSVExportScope = iota
	ExportAllRecords
)

type ConfirmationModal

type ConfirmationModal struct {
	*tview.Modal
}

func NewConfirmationModal

func NewConfirmationModal(confirmationText string) *ConfirmationModal

type ConnectionForm

type ConnectionForm struct {
	*tview.Flex
	*tview.Form
	StatusText *tview.TextView
	Action     string
}

func NewConnectionForm

func NewConnectionForm(connectionPages *models.ConnectionPages) *ConnectionForm

func (*ConnectionForm) SetAction

func (form *ConnectionForm) SetAction(action string)

func (*ConnectionForm) SetConnectionData added in v0.4.4

func (form *ConnectionForm) SetConnectionData(conn models.Connection)

type ConnectionSelection

type ConnectionSelection struct {
	*tview.Flex
	StatusText *tview.TextView
}

func NewConnectionSelection

func NewConnectionSelection(connectionForm *ConnectionForm, connectionPages *models.ConnectionPages) *ConnectionSelection

func (*ConnectionSelection) Connect added in v0.1.7

func (cs *ConnectionSelection) Connect(connection models.Connection) *tview.Application

type ConnectionsTable

type ConnectionsTable struct {
	*tview.Table
	Wrapper *tview.Flex
	// contains filtered or unexported fields
}

func NewConnectionsTable

func NewConnectionsTable() *ConnectionsTable

func (*ConnectionsTable) AddConnection

func (ct *ConnectionsTable) AddConnection(connection models.Connection)

func (*ConnectionsTable) GetConnections

func (ct *ConnectionsTable) GetConnections() []models.Connection

func (*ConnectionsTable) GetError

func (ct *ConnectionsTable) GetError() string

func (*ConnectionsTable) SetConnections

func (ct *ConnectionsTable) SetConnections(connections []models.Connection)

func (*ConnectionsTable) SetError

func (ct *ConnectionsTable) SetError(err error)
type Header struct {
	*tview.TextView
}

type HelpModal added in v0.2.6

type HelpModal struct {
	*tview.Flex
	Filter        *tview.InputField
	Table         *tview.Table
	Wrapper       *tview.Flex
	KeybindGroups []KeybindGroup
	LongestKey    string
}

func NewHelpModal added in v0.2.6

func NewHelpModal() *HelpModal

type HelpStatus added in v0.2.6

type HelpStatus struct {
	*tview.TextView
}

func NewHelpStatus added in v0.2.6

func NewHelpStatus() HelpStatus

func (*HelpStatus) SetStatusOnEditorView added in v0.2.6

func (status *HelpStatus) SetStatusOnEditorView()

func (*HelpStatus) SetStatusOnTableView added in v0.2.6

func (status *HelpStatus) SetStatusOnTableView()

func (*HelpStatus) SetStatusOnTree added in v0.2.6

func (status *HelpStatus) SetStatusOnTree()

func (*HelpStatus) UpdateText added in v0.2.6

func (status *HelpStatus) UpdateText(binds []keymap.Bind)

type Home

type Home struct {
	*tview.Flex
	Tree         *Tree
	TabbedPane   *TabbedPane
	LeftWrapper  *tview.Flex
	RightWrapper *tview.Flex
	MainContent  *tview.Flex

	HelpStatus           HelpStatus
	HelpModal            *HelpModal
	QueryHistoryModal    *QueryHistoryModal
	DBDriver             drivers.Driver
	FocusedWrapper       string
	ListOfDBChanges      []models.DBDMLChange
	ConnectionIdentifier string
	ConnectionURL        string
	ReadOnly             bool
	// contains filtered or unexported fields
}

func NewHomePage

func NewHomePage(connection models.Connection, dbdriver drivers.Driver) *Home

type JSONViewer added in v0.4.2

type JSONViewer struct {
	*tview.Flex
	TextView *tview.TextView
	Pages    *tview.Pages
	// contains filtered or unexported fields
}

func NewJSONViewer added in v0.4.2

func NewJSONViewer(pages *tview.Pages) *JSONViewer

func (*JSONViewer) Hide added in v0.4.2

func (v *JSONViewer) Hide()

func (*JSONViewer) Show added in v0.4.2

func (v *JSONViewer) Show(rowData map[string]string, focus tview.Primitive)

type KeybindGroup added in v0.4.3

type KeybindGroup struct {
	Group string
	Binds []keymap.Bind
}

type Pagination

type Pagination struct {
	*tview.Flex
	// contains filtered or unexported fields
}

func NewPagination

func NewPagination() *Pagination

func (*Pagination) GetIsFirstPage

func (pagination *Pagination) GetIsFirstPage() bool

func (*Pagination) GetIsLastPage

func (pagination *Pagination) GetIsLastPage() bool

func (*Pagination) GetLimit

func (pagination *Pagination) GetLimit() int

func (*Pagination) GetOffset

func (pagination *Pagination) GetOffset() int

func (*Pagination) GetTotalRecords

func (pagination *Pagination) GetTotalRecords() int

func (*Pagination) SetLimit

func (pagination *Pagination) SetLimit(limit int)

func (*Pagination) SetOffset

func (pagination *Pagination) SetOffset(offset int)

func (*Pagination) SetTotalRecords

func (pagination *Pagination) SetTotalRecords(total int)

type PaginationState

type PaginationState struct {
	Offset       int
	Limit        int
	TotalRecords int
}

type QueryHistoryComponent added in v0.4.1

type QueryHistoryComponent struct {
	*tview.Flex
	// contains filtered or unexported fields
}

QueryHistoryComponent is a component that displays query history.

func NewQueryHistoryComponent added in v0.4.1

func NewQueryHistoryComponent(connectionIdentifier string, onSelect func(query string), onSave func()) *QueryHistoryComponent

NewQueryHistoryComponent creates a new QueryHistoryComponent.

func (*QueryHistoryComponent) GetIsFiltering added in v0.4.1

func (qhc *QueryHistoryComponent) GetIsFiltering() bool

GetIsFiltering returns the filtering state of the component.

func (*QueryHistoryComponent) GetPrimitive added in v0.4.1

func (qhc *QueryHistoryComponent) GetPrimitive() tview.Primitive

GetPrimitive returns the primitive for this component.

func (*QueryHistoryComponent) LoadHistory added in v0.4.1

func (qhc *QueryHistoryComponent) LoadHistory(connectionIdentifier string)

func (*QueryHistoryComponent) SetIsFiltering added in v0.4.1

func (qhc *QueryHistoryComponent) SetIsFiltering(filtering bool)

SetIsFiltering sets the filtering state of the component.

type QueryHistoryModal added in v0.4.1

type QueryHistoryModal struct {
	tview.Primitive
	// contains filtered or unexported fields
}

func NewQueryHistoryModal added in v0.4.1

func NewQueryHistoryModal(connectionIdentifier string, onSelect func(query string)) *QueryHistoryModal

func (*QueryHistoryModal) GetPrimitive added in v0.4.1

func (qhm *QueryHistoryModal) GetPrimitive() tview.Primitive

type QueryHistoryState added in v0.4.1

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

QueryHistoryState holds the state for the QueryHistoryComponent.

type QueryPreviewModal added in v0.3.6

type QueryPreviewModal struct {
	tview.Primitive
	Queries  *[]models.DBDMLChange
	Table    *tview.Table
	DBDriver drivers.Driver
	Error    *tview.Modal
}

func NewQueryPreviewModal added in v0.3.6

func NewQueryPreviewModal(queries *[]models.DBDMLChange, dbdriver drivers.Driver, onFinish func()) *QueryPreviewModal

func (*QueryPreviewModal) SetError added in v0.3.6

func (modal *QueryPreviewModal) SetError(err string)

type ResultsTable

type ResultsTable struct {
	*tview.Table

	Page    *tview.Pages
	Wrapper *tview.Flex
	Menu    *ResultsTableMenu
	Filter  *ResultsTableFilter
	Error   *tview.Modal
	Loading *tview.Modal

	Pagination       *Pagination
	Editor           *SQLEditor
	EditorPages      *tview.Pages
	ResultsInfo      *tview.TextView
	Tree             *Tree
	Sidebar          *Sidebar
	SidebarContainer *tview.Flex
	DBDriver         drivers.Driver

	ConnectionURL string
	ReadOnly      bool
	// contains filtered or unexported fields
}

func NewResultsTable

func NewResultsTable(listOfDBChanges *[]models.DBDMLChange, tree *Tree, dbdriver drivers.Driver, connectionIdentifier string, connectionURL string, readOnly bool) *ResultsTable

func (*ResultsTable) AddInsertedRows

func (table *ResultsTable) AddInsertedRows()

func (*ResultsTable) AddRows

func (table *ResultsTable) AddRows(rows [][]string)

func (*ResultsTable) AppendNewChange

func (table *ResultsTable) AppendNewChange(changeType models.DMLType, rowIndex int, colIndex int, value models.CellValue) error

func (*ResultsTable) AppendNewRow added in v0.2.7

func (table *ResultsTable) AppendNewRow(cells []models.CellValue, index int, UUID string)

func (*ResultsTable) CheckIfRowIsInserted

func (table *ResultsTable) CheckIfRowIsInserted(rowID string) bool

func (*ResultsTable) FetchRecords

func (table *ResultsTable) FetchRecords(onError func()) [][]string

func (*ResultsTable) FinishSettingValue added in v0.3.0

func (table *ResultsTable) FinishSettingValue()

func (*ResultsTable) GetColumnIndexByName added in v0.3.0

func (table *ResultsTable) GetColumnIndexByName(columnName string) int

func (*ResultsTable) GetColumnNameByIndex

func (table *ResultsTable) GetColumnNameByIndex(index int) string

func (*ResultsTable) GetColumns

func (table *ResultsTable) GetColumns() [][]string

func (*ResultsTable) GetConstraints

func (table *ResultsTable) GetConstraints() [][]string

func (*ResultsTable) GetCurrentSort

func (table *ResultsTable) GetCurrentSort() string

func (*ResultsTable) GetDatabaseAndTableName added in v0.2.7

func (table *ResultsTable) GetDatabaseAndTableName() string

func (*ResultsTable) GetDatabaseName added in v0.2.7

func (table *ResultsTable) GetDatabaseName() string

func (*ResultsTable) GetForeignKeys

func (table *ResultsTable) GetForeignKeys() [][]string

func (*ResultsTable) GetIndexes

func (table *ResultsTable) GetIndexes() [][]string

func (*ResultsTable) GetIsEditing

func (table *ResultsTable) GetIsEditing() bool

func (*ResultsTable) GetIsFiltering

func (table *ResultsTable) GetIsFiltering() bool

func (*ResultsTable) GetIsLoading

func (table *ResultsTable) GetIsLoading() bool

func (*ResultsTable) GetItalicStyle added in v0.3.0

func (table *ResultsTable) GetItalicStyle() tcell.Style

func (*ResultsTable) GetPrimaryKeyColumnNames added in v0.3.1

func (table *ResultsTable) GetPrimaryKeyColumnNames() []string

func (*ResultsTable) GetPrimaryKeySort added in v0.4.6

func (table *ResultsTable) GetPrimaryKeySort() string

GetPrimaryKeySort returns an ORDER BY clause using primary key columns. Returns empty string if no primary key columns are available.

func (*ResultsTable) GetPrimaryKeyValue added in v0.1.8

func (table *ResultsTable) GetPrimaryKeyValue(rowIndex int) []models.PrimaryKeyInfo

func (*ResultsTable) GetPrimitive added in v0.4.1

func (table *ResultsTable) GetPrimitive() tview.Primitive

func (*ResultsTable) GetRecords

func (table *ResultsTable) GetRecords() [][]string

func (*ResultsTable) GetShowSidebar added in v0.3.0

func (table *ResultsTable) GetShowSidebar() bool

func (*ResultsTable) GetTableName added in v0.2.7

func (table *ResultsTable) GetTableName() string

func (*ResultsTable) HighlightAll

func (table *ResultsTable) HighlightAll()

func (*ResultsTable) HighlightTable

func (table *ResultsTable) HighlightTable()

func (*ResultsTable) MutateInsertedRowCell

func (table *ResultsTable) MutateInsertedRowCell(rowID string, newValue models.CellValue)

func (*ResultsTable) RemoveHighlightAll

func (table *ResultsTable) RemoveHighlightAll()

func (*ResultsTable) RemoveHighlightTable

func (table *ResultsTable) RemoveHighlightTable()

func (*ResultsTable) SetCellColor added in v0.2.7

func (table *ResultsTable) SetCellColor(rowIndex int, colIndex int, color tcell.Color)

func (*ResultsTable) SetColumns

func (table *ResultsTable) SetColumns(columns [][]string)

func (*ResultsTable) SetConstraints

func (table *ResultsTable) SetConstraints(constraints [][]string)

func (*ResultsTable) SetCurrentSort

func (table *ResultsTable) SetCurrentSort(sort string)

func (*ResultsTable) SetDatabaseName added in v0.2.7

func (table *ResultsTable) SetDatabaseName(databaseName string)

func (*ResultsTable) SetError

func (table *ResultsTable) SetError(err string, done func())

func (*ResultsTable) SetForeignKeys

func (table *ResultsTable) SetForeignKeys(foreignKeys [][]string)

func (*ResultsTable) SetIndexes

func (table *ResultsTable) SetIndexes(indexes [][]string)

func (*ResultsTable) SetIsEditing

func (table *ResultsTable) SetIsEditing(editing bool)

func (*ResultsTable) SetIsFiltering

func (table *ResultsTable) SetIsFiltering(filtering bool)

func (*ResultsTable) SetLoading

func (table *ResultsTable) SetLoading(show bool)

func (*ResultsTable) SetPrimaryKeyColumnNames added in v0.3.1

func (table *ResultsTable) SetPrimaryKeyColumnNames(primaryKeyColumnNames []string)

func (*ResultsTable) SetRecords

func (table *ResultsTable) SetRecords(rows [][]string)

func (*ResultsTable) SetResultsInfo

func (table *ResultsTable) SetResultsInfo(text string)

func (*ResultsTable) SetRowColor added in v0.2.7

func (table *ResultsTable) SetRowColor(rowIndex int, color tcell.Color)

func (*ResultsTable) SetSortedBy

func (table *ResultsTable) SetSortedBy(column string, direction string)

func (*ResultsTable) SetTableName added in v0.2.7

func (table *ResultsTable) SetTableName(tableName string)

func (*ResultsTable) ShowSidebar added in v0.3.0

func (table *ResultsTable) ShowSidebar(show bool)

func (*ResultsTable) StartEditingCell

func (table *ResultsTable) StartEditingCell(row int, col int, callback func(newValue string, row, col int))

func (*ResultsTable) UpdateRows

func (table *ResultsTable) UpdateRows(rows [][]string)

func (*ResultsTable) UpdateRowsColor

func (table *ResultsTable) UpdateRowsColor(headerColor tcell.Color, rowColor tcell.Color)

func (*ResultsTable) UpdateSidebar added in v0.3.0

func (table *ResultsTable) UpdateSidebar()

func (*ResultsTable) WithEditor

func (table *ResultsTable) WithEditor() *ResultsTable

func (*ResultsTable) WithFilter

func (table *ResultsTable) WithFilter() *ResultsTable

type ResultsTableFilter

type ResultsTableFilter struct {
	*tview.Flex
	Input *tview.InputField
	Label *tview.TextView
	// contains filtered or unexported fields
}

func NewResultsFilter

func NewResultsFilter() *ResultsTableFilter

func (*ResultsTableFilter) GetCurrentFilter

func (filter *ResultsTableFilter) GetCurrentFilter() string

func (*ResultsTableFilter) Highlight

func (filter *ResultsTableFilter) Highlight()

func (*ResultsTableFilter) HighlightLocal

func (filter *ResultsTableFilter) HighlightLocal()

func (*ResultsTableFilter) Publish

func (filter *ResultsTableFilter) Publish(message string)

func (*ResultsTableFilter) RemoveHighlight

func (filter *ResultsTableFilter) RemoveHighlight()

Function to blur

func (*ResultsTableFilter) RemoveLocalHighlight

func (filter *ResultsTableFilter) RemoveLocalHighlight()

func (*ResultsTableFilter) Subscribe

func (filter *ResultsTableFilter) Subscribe() chan models.StateChange

type ResultsTableMenu

type ResultsTableMenu struct {
	*tview.Flex

	MenuItems []*tview.TextView
	// contains filtered or unexported fields
}

func NewResultsTableMenu

func NewResultsTableMenu() *ResultsTableMenu

func (*ResultsTableMenu) GetSelectedOption

func (menu *ResultsTableMenu) GetSelectedOption() int

Getters and Setters

func (*ResultsTableMenu) SetBlur

func (menu *ResultsTableMenu) SetBlur()

func (*ResultsTableMenu) SetFocus

func (menu *ResultsTableMenu) SetFocus()

func (*ResultsTableMenu) SetSelectedOption

func (menu *ResultsTableMenu) SetSelectedOption(option int)

type ResultsTableMenuState

type ResultsTableMenuState struct {
	SelectedOption int
}

type ResultsTableState

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

type SQLEditor

type SQLEditor struct {
	*tview.TextArea

	ConnectionURL string
	// contains filtered or unexported fields
}

func NewSQLEditor

func NewSQLEditor(connectionURL string) *SQLEditor

func (*SQLEditor) GetIsFocused

func (s *SQLEditor) GetIsFocused() bool

func (*SQLEditor) Highlight

func (s *SQLEditor) Highlight()

func (*SQLEditor) Publish

func (s *SQLEditor) Publish(key string, message string)

func (*SQLEditor) SetBlur

func (s *SQLEditor) SetBlur()

func (*SQLEditor) SetIsFocused

func (s *SQLEditor) SetIsFocused(isFocused bool)

func (*SQLEditor) Subscribe

func (s *SQLEditor) Subscribe() chan models.StateChange

type SQLEditorState

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

type SaveQueryModal added in v0.4.1

type SaveQueryModal struct {
	tview.Primitive
	// contains filtered or unexported fields
}

SaveQueryModal is a modal for saving a query with a name.

func NewSaveQueryModal added in v0.4.1

func NewSaveQueryModal(connectionIdentifier, query string, onSave func()) *SaveQueryModal

NewSaveQueryModal creates a new SaveQueryModal.

func (*SaveQueryModal) GetPrimitive added in v0.4.1

func (sqm *SaveQueryModal) GetPrimitive() tview.Primitive

GetPrimitive returns the primitive for this component.

type SavedQueriesComponent added in v0.4.1

type SavedQueriesComponent struct {
	Primitive tview.Primitive
	// contains filtered or unexported fields
}

SavedQueriesComponent is a component that displays saved queries.

func NewSavedQueriesComponent added in v0.4.1

func NewSavedQueriesComponent(connectionIdentifier string, onSelect func(query string)) *SavedQueriesComponent

NewSavedQueriesComponent creates a new SavedQueriesComponent.

func (*SavedQueriesComponent) GetIsFiltering added in v0.4.1

func (sqc *SavedQueriesComponent) GetIsFiltering() bool

GetIsFiltering returns the filtering state of the component.

func (*SavedQueriesComponent) GetPrimitive added in v0.4.1

func (sqc *SavedQueriesComponent) GetPrimitive() tview.Primitive

GetPrimitive returns the primitive for this component.

func (*SavedQueriesComponent) Refresh added in v0.4.1

func (sqc *SavedQueriesComponent) Refresh()

Refresh reloads the saved queries from the file.

func (*SavedQueriesComponent) SetIsFiltering added in v0.4.1

func (sqc *SavedQueriesComponent) SetIsFiltering(filtering bool)

SetIsFiltering sets the filtering state of the component.

type SavedQueriesState added in v0.4.1

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

SavedQueriesState holds the state for the SavedQueriesComponent.

type SetValueList added in v0.3.0

type SetValueList struct {
	*tview.List
}

func NewSetValueList added in v0.3.0

func NewSetValueList(dbProvider string) *SetValueList

func (*SetValueList) Hide added in v0.3.0

func (list *SetValueList) Hide()

func (*SetValueList) OnFinish added in v0.3.0

func (list *SetValueList) OnFinish(callback func(selection models.CellValueType, value string))

func (*SetValueList) Show added in v0.3.0

func (list *SetValueList) Show(x, y, width int)
type Sidebar struct {
	*tview.Frame
	Flex *tview.Flex

	FieldParameters []*SidebarFieldParameters

	ReadOnly bool
	// contains filtered or unexported fields
}

func NewSidebar added in v0.3.0

func NewSidebar(dbProvider string, readOnly bool) *Sidebar

func (*Sidebar) AddField added in v0.3.0

func (sidebar *Sidebar) AddField(title, text string, fieldWidth int, pendingEdit bool)

func (*Sidebar) Clear added in v0.3.0

func (sidebar *Sidebar) Clear()

func (*Sidebar) EditTextCurrentField added in v0.3.0

func (sidebar *Sidebar) EditTextCurrentField()

func (*Sidebar) FocusField added in v0.3.0

func (sidebar *Sidebar) FocusField(index int)

func (*Sidebar) FocusFirstField added in v0.3.0

func (sidebar *Sidebar) FocusFirstField()

func (*Sidebar) FocusLastField added in v0.3.0

func (sidebar *Sidebar) FocusLastField()

func (*Sidebar) FocusNextField added in v0.3.0

func (sidebar *Sidebar) FocusNextField()

func (*Sidebar) FocusPreviousField added in v0.3.0

func (sidebar *Sidebar) FocusPreviousField()

func (*Sidebar) GetCurrentFieldIndex added in v0.3.0

func (sidebar *Sidebar) GetCurrentFieldIndex() int

Getters

func (*Sidebar) Publish added in v0.3.0

func (sidebar *Sidebar) Publish(change models.StateChange)

Publish subscribers of changes in the sidebar state

func (*Sidebar) SetCurrentFieldIndex added in v0.3.0

func (sidebar *Sidebar) SetCurrentFieldIndex(index int)

Setters

func (*Sidebar) SetDisabledStyles added in v0.3.0

func (sidebar *Sidebar) SetDisabledStyles(item *tview.TextArea)

func (*Sidebar) SetEditedStyles added in v0.3.0

func (sidebar *Sidebar) SetEditedStyles(item *tview.TextArea)

func (*Sidebar) SetEditingStyles added in v0.3.0

func (sidebar *Sidebar) SetEditingStyles(item *tview.TextArea)

func (*Sidebar) Subscribe added in v0.3.0

func (sidebar *Sidebar) Subscribe() chan models.StateChange

Subscribe to changes in the sidebar state

type SidebarFieldParameters added in v0.3.0

type SidebarFieldParameters struct {
	OriginalValue string
	Height        int
}

type SidebarState added in v0.3.0

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

type Tab

type Tab struct {
	Content     TabContent
	NextTab     *Tab
	PreviousTab *Tab
	Header      *Header
	Name        string
	Reference   string
}

type TabContent added in v0.4.1

type TabContent interface {
	GetPrimitive() tview.Primitive
}

type TabbedPane

type TabbedPane struct {
	*tview.Pages
	HeaderContainer *tview.Flex
	// contains filtered or unexported fields
}

func NewTabbedPane

func NewTabbedPane() *TabbedPane

func (*TabbedPane) AppendTab

func (t *TabbedPane) AppendTab(name string, content TabContent, reference string)

func (*TabbedPane) GetCurrentTab

func (t *TabbedPane) GetCurrentTab() *Tab

func (*TabbedPane) GetLength added in v0.2.7

func (t *TabbedPane) GetLength() int

func (*TabbedPane) GetTabByName

func (t *TabbedPane) GetTabByName(name string) *Tab

func (*TabbedPane) GetTabByReference added in v0.2.7

func (t *TabbedPane) GetTabByReference(reference string) *Tab

func (*TabbedPane) Highlight

func (t *TabbedPane) Highlight()

func (*TabbedPane) HighlightTabHeader

func (t *TabbedPane) HighlightTabHeader(tab *Tab)

func (*TabbedPane) RemoveCurrentTab

func (t *TabbedPane) RemoveCurrentTab() *Tab

func (*TabbedPane) SetBlur

func (t *TabbedPane) SetBlur()

func (*TabbedPane) SetCurrentTab

func (t *TabbedPane) SetCurrentTab(tab *Tab) *Tab

func (*TabbedPane) SwitchToFirstTab

func (t *TabbedPane) SwitchToFirstTab() *Tab

func (*TabbedPane) SwitchToLastTab

func (t *TabbedPane) SwitchToLastTab() *Tab

func (*TabbedPane) SwitchToNextTab

func (t *TabbedPane) SwitchToNextTab() *Tab

func (*TabbedPane) SwitchToPreviousTab

func (t *TabbedPane) SwitchToPreviousTab() *Tab

func (*TabbedPane) SwitchToTabByName

func (t *TabbedPane) SwitchToTabByName(name string) *Tab

func (*TabbedPane) SwitchToTabByReference added in v0.2.7

func (t *TabbedPane) SwitchToTabByReference(reference string) *Tab

type TabbedPaneState

type TabbedPaneState struct {
	CurrentTab *Tab
	FirstTab   *Tab
	LastTab    *Tab
	Length     int
}

type Tree

type Tree struct {
	DBDriver drivers.Driver
	*tview.TreeView

	Filter              *tview.InputField
	Wrapper             *tview.Flex
	FoundNodeCountInput *tview.InputField

	Schemas []string
	// contains filtered or unexported fields
}

func NewTree

func NewTree(dbName string, dbdriver drivers.Driver, schemas []string) *Tree

func (*Tree) ClearSearch added in v0.3.5

func (tree *Tree) ClearSearch()

func (*Tree) CollapseAll added in v0.2.8

func (tree *Tree) CollapseAll()

func (*Tree) ExpandAll added in v0.2.8

func (tree *Tree) ExpandAll()

func (*Tree) ForceRemoveHighlight

func (tree *Tree) ForceRemoveHighlight()

func (*Tree) GetIsFiltering added in v0.2.8

func (tree *Tree) GetIsFiltering() bool

func (*Tree) GetSelectedDatabase

func (tree *Tree) GetSelectedDatabase() string

Getters and Setters

func (*Tree) GetSelectedTable

func (tree *Tree) GetSelectedTable() string

func (*Tree) GetTreeNodeData added in v0.4.4

func (tree *Tree) GetTreeNodeData(node *tview.TreeNode) *TreeNodeData

func (*Tree) Highlight

func (tree *Tree) Highlight()

Focus func

func (*Tree) InitializeNodes added in v0.3.3

func (tree *Tree) InitializeNodes(dbName string)

func (*Tree) Publish

func (tree *Tree) Publish(change models.StateChange)

Publish subscribers of changes in the tree state

func (*Tree) Refresh added in v0.3.3

func (tree *Tree) Refresh(dbName string)

func (*Tree) RemoveHighlight

func (tree *Tree) RemoveHighlight()

Blur func

func (*Tree) SetIsFiltering added in v0.2.8

func (tree *Tree) SetIsFiltering(isFiltering bool)

func (*Tree) SetSelectedDatabase

func (tree *Tree) SetSelectedDatabase(database string)

func (*Tree) SetSelectedProcedure added in v0.4.4

func (tree *Tree) SetSelectedProcedure(name string)

func (*Tree) SetSelectedTable

func (tree *Tree) SetSelectedTable(table string)

func (*Tree) SetSelectedUserDefinedFunction added in v0.4.4

func (tree *Tree) SetSelectedUserDefinedFunction(name string)

func (*Tree) SetSelectedView added in v0.4.4

func (tree *Tree) SetSelectedView(name string)

func (*Tree) Subscribe

func (tree *Tree) Subscribe() chan models.StateChange

Subscribe to changes in the tree state

type TreeNodeData added in v0.4.4

type TreeNodeData struct {
	Type     TreeNodeType
	Database string
	Schema   string
	Name     string
}

type TreeNodeType added in v0.4.4

type TreeNodeType int
const (
	NodeTypeSection TreeNodeType = iota
	NodeTypeDatabase
	NodeTypeTable
	NodeTypeFunction
	NodeTypeProcedure
	NodeTypeView
)

type TreeState

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

Jump to

Keyboard shortcuts

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