Documentation
¶
Index ¶
- Variables
- func InitFromArg(connectionString string, readOnly bool) error
- func MainPages() *tview.Pages
- func NewConnectionPages() *models.ConnectionPages
- func NewErrorModal(message string) *tview.Modal
- type CSVExportModal
- type CSVExportOptions
- type CSVExportScope
- type ConfirmationModal
- type ConnectionForm
- type ConnectionSelection
- type ConnectionsTable
- func (ct *ConnectionsTable) AddConnection(connection models.Connection)
- func (ct *ConnectionsTable) GetConnections() []models.Connection
- func (ct *ConnectionsTable) GetError() string
- func (ct *ConnectionsTable) SetConnections(connections []models.Connection)
- func (ct *ConnectionsTable) SetError(err error)
- type Header
- type HelpModal
- type HelpStatus
- type Home
- type JSONViewer
- type KeybindGroup
- type Pagination
- func (pagination *Pagination) GetIsFirstPage() bool
- func (pagination *Pagination) GetIsLastPage() bool
- func (pagination *Pagination) GetLimit() int
- func (pagination *Pagination) GetOffset() int
- func (pagination *Pagination) GetTotalRecords() int
- func (pagination *Pagination) SetLimit(limit int)
- func (pagination *Pagination) SetOffset(offset int)
- func (pagination *Pagination) SetTotalRecords(total int)
- type PaginationState
- type QueryHistoryComponent
- type QueryHistoryModal
- type QueryHistoryState
- type QueryPreviewModal
- type ResultsTable
- func (table *ResultsTable) AddInsertedRows()
- func (table *ResultsTable) AddRows(rows [][]string)
- func (table *ResultsTable) AppendNewChange(changeType models.DMLType, rowIndex int, colIndex int, value models.CellValue) error
- func (table *ResultsTable) AppendNewRow(cells []models.CellValue, index int, UUID string)
- func (table *ResultsTable) CheckIfRowIsInserted(rowID string) bool
- func (table *ResultsTable) FetchRecords(onError func()) [][]string
- func (table *ResultsTable) FinishSettingValue()
- func (table *ResultsTable) GetColumnIndexByName(columnName string) int
- func (table *ResultsTable) GetColumnNameByIndex(index int) string
- func (table *ResultsTable) GetColumns() [][]string
- func (table *ResultsTable) GetConstraints() [][]string
- func (table *ResultsTable) GetCurrentSort() string
- func (table *ResultsTable) GetDatabaseAndTableName() string
- func (table *ResultsTable) GetDatabaseName() string
- func (table *ResultsTable) GetForeignKeys() [][]string
- func (table *ResultsTable) GetIndexes() [][]string
- func (table *ResultsTable) GetIsEditing() bool
- func (table *ResultsTable) GetIsFiltering() bool
- func (table *ResultsTable) GetIsLoading() bool
- func (table *ResultsTable) GetItalicStyle() tcell.Style
- func (table *ResultsTable) GetPrimaryKeyColumnNames() []string
- func (table *ResultsTable) GetPrimaryKeySort() string
- func (table *ResultsTable) GetPrimaryKeyValue(rowIndex int) []models.PrimaryKeyInfo
- func (table *ResultsTable) GetPrimitive() tview.Primitive
- func (table *ResultsTable) GetRecords() [][]string
- func (table *ResultsTable) GetShowSidebar() bool
- func (table *ResultsTable) GetTableName() string
- func (table *ResultsTable) HighlightAll()
- func (table *ResultsTable) HighlightTable()
- func (table *ResultsTable) MutateInsertedRowCell(rowID string, newValue models.CellValue)
- func (table *ResultsTable) RemoveHighlightAll()
- func (table *ResultsTable) RemoveHighlightTable()
- func (table *ResultsTable) SetCellColor(rowIndex int, colIndex int, color tcell.Color)
- func (table *ResultsTable) SetColumns(columns [][]string)
- func (table *ResultsTable) SetConstraints(constraints [][]string)
- func (table *ResultsTable) SetCurrentSort(sort string)
- func (table *ResultsTable) SetDatabaseName(databaseName string)
- func (table *ResultsTable) SetError(err string, done func())
- func (table *ResultsTable) SetForeignKeys(foreignKeys [][]string)
- func (table *ResultsTable) SetIndexes(indexes [][]string)
- func (table *ResultsTable) SetIsEditing(editing bool)
- func (table *ResultsTable) SetIsFiltering(filtering bool)
- func (table *ResultsTable) SetLoading(show bool)
- func (table *ResultsTable) SetPrimaryKeyColumnNames(primaryKeyColumnNames []string)
- func (table *ResultsTable) SetRecords(rows [][]string)
- func (table *ResultsTable) SetResultsInfo(text string)
- func (table *ResultsTable) SetRowColor(rowIndex int, color tcell.Color)
- func (table *ResultsTable) SetSortedBy(column string, direction string)
- func (table *ResultsTable) SetTableName(tableName string)
- func (table *ResultsTable) ShowSidebar(show bool)
- func (table *ResultsTable) StartEditingCell(row int, col int, callback func(newValue string, row, col int))
- func (table *ResultsTable) UpdateRows(rows [][]string)
- func (table *ResultsTable) UpdateRowsColor(headerColor tcell.Color, rowColor tcell.Color)
- func (table *ResultsTable) UpdateSidebar()
- func (table *ResultsTable) WithEditor() *ResultsTable
- func (table *ResultsTable) WithFilter() *ResultsTable
- type ResultsTableFilter
- func (filter *ResultsTableFilter) GetCurrentFilter() string
- func (filter *ResultsTableFilter) Highlight()
- func (filter *ResultsTableFilter) HighlightLocal()
- func (filter *ResultsTableFilter) Publish(message string)
- func (filter *ResultsTableFilter) RemoveHighlight()
- func (filter *ResultsTableFilter) RemoveLocalHighlight()
- func (filter *ResultsTableFilter) Subscribe() chan models.StateChange
- type ResultsTableMenu
- type ResultsTableMenuState
- type ResultsTableState
- type SQLEditor
- type SQLEditorState
- type SaveQueryModal
- type SavedQueriesComponent
- type SavedQueriesState
- type SetValueList
- type Sidebar
- func (sidebar *Sidebar) AddField(title, text string, fieldWidth int, pendingEdit bool)
- func (sidebar *Sidebar) Clear()
- func (sidebar *Sidebar) EditTextCurrentField()
- func (sidebar *Sidebar) FocusField(index int)
- func (sidebar *Sidebar) FocusFirstField()
- func (sidebar *Sidebar) FocusLastField()
- func (sidebar *Sidebar) FocusNextField()
- func (sidebar *Sidebar) FocusPreviousField()
- func (sidebar *Sidebar) GetCurrentFieldIndex() int
- func (sidebar *Sidebar) Publish(change models.StateChange)
- func (sidebar *Sidebar) SetCurrentFieldIndex(index int)
- func (sidebar *Sidebar) SetDisabledStyles(item *tview.TextArea)
- func (sidebar *Sidebar) SetEditedStyles(item *tview.TextArea)
- func (sidebar *Sidebar) SetEditingStyles(item *tview.TextArea)
- func (sidebar *Sidebar) Subscribe() chan models.StateChange
- type SidebarFieldParameters
- type SidebarState
- type Tab
- type TabContent
- type TabbedPane
- func (t *TabbedPane) AppendTab(name string, content TabContent, reference string)
- func (t *TabbedPane) GetCurrentTab() *Tab
- func (t *TabbedPane) GetLength() int
- func (t *TabbedPane) GetTabByName(name string) *Tab
- func (t *TabbedPane) GetTabByReference(reference string) *Tab
- func (t *TabbedPane) Highlight()
- func (t *TabbedPane) HighlightTabHeader(tab *Tab)
- func (t *TabbedPane) RemoveCurrentTab() *Tab
- func (t *TabbedPane) SetBlur()
- func (t *TabbedPane) SetCurrentTab(tab *Tab) *Tab
- func (t *TabbedPane) SwitchToFirstTab() *Tab
- func (t *TabbedPane) SwitchToLastTab() *Tab
- func (t *TabbedPane) SwitchToNextTab() *Tab
- func (t *TabbedPane) SwitchToPreviousTab() *Tab
- func (t *TabbedPane) SwitchToTabByName(name string) *Tab
- func (t *TabbedPane) SwitchToTabByReference(reference string) *Tab
- type TabbedPaneState
- type Tree
- func (tree *Tree) ClearSearch()
- func (tree *Tree) CollapseAll()
- func (tree *Tree) ExpandAll()
- func (tree *Tree) ForceRemoveHighlight()
- func (tree *Tree) GetIsFiltering() bool
- func (tree *Tree) GetSelectedDatabase() string
- func (tree *Tree) GetSelectedTable() string
- func (tree *Tree) GetTreeNodeData(node *tview.TreeNode) *TreeNodeData
- func (tree *Tree) Highlight()
- func (tree *Tree) InitializeNodes(dbName string)
- func (tree *Tree) Publish(change models.StateChange)
- func (tree *Tree) Refresh(dbName string)
- func (tree *Tree) RemoveHighlight()
- func (tree *Tree) SetIsFiltering(isFiltering bool)
- func (tree *Tree) SetSelectedDatabase(database string)
- func (tree *Tree) SetSelectedProcedure(name string)
- func (tree *Tree) SetSelectedTable(table string)
- func (tree *Tree) SetSelectedUserDefinedFunction(name string)
- func (tree *Tree) SetSelectedView(name string)
- func (tree *Tree) Subscribe() chan models.StateChange
- type TreeNodeData
- type TreeNodeType
- type TreeState
Constants ¶
This section is empty.
Variables ¶
var App = app.App
var VALUES = []value{}
Functions ¶
func InitFromArg ¶ added in v0.3.3
func NewConnectionPages ¶
func NewConnectionPages() *models.ConnectionPages
func NewErrorModal ¶ added in v0.4.1
Types ¶
type CSVExportModal ¶ added in v0.4.6
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 ¶
func NewConfirmationModal ¶
func NewConfirmationModal(confirmationText string) *ConfirmationModal
type ConnectionForm ¶
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 ¶
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 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
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()
type KeybindGroup ¶ added in v0.4.3
type Pagination ¶
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 QueryHistoryComponent ¶ added in v0.4.1
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
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 (*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 (*SQLEditor) GetIsFocused ¶
func (*SQLEditor) SetIsFocused ¶
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
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
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 ¶ added in v0.3.0
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 (*Sidebar) EditTextCurrentField ¶ added in v0.3.0
func (sidebar *Sidebar) EditTextCurrentField()
func (*Sidebar) FocusField ¶ added in v0.3.0
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
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
Setters
func (*Sidebar) SetDisabledStyles ¶ added in v0.3.0
func (*Sidebar) SetEditedStyles ¶ added in v0.3.0
func (*Sidebar) SetEditingStyles ¶ added in v0.3.0
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 SidebarState ¶ added in v0.3.0
type SidebarState struct {
// contains filtered or unexported fields
}
type TabContent ¶ added in v0.4.1
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 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 (*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) ForceRemoveHighlight ¶
func (tree *Tree) ForceRemoveHighlight()
func (*Tree) GetIsFiltering ¶ added in v0.2.8
func (*Tree) GetSelectedDatabase ¶
Getters and Setters
func (*Tree) GetSelectedTable ¶
func (*Tree) GetTreeNodeData ¶ added in v0.4.4
func (tree *Tree) GetTreeNodeData(node *tview.TreeNode) *TreeNodeData
func (*Tree) InitializeNodes ¶ added in v0.3.3
func (*Tree) Publish ¶
func (tree *Tree) Publish(change models.StateChange)
Publish subscribers of changes in the tree state
func (*Tree) SetIsFiltering ¶ added in v0.2.8
func (*Tree) SetSelectedDatabase ¶
func (*Tree) SetSelectedProcedure ¶ added in v0.4.4
func (*Tree) SetSelectedTable ¶
func (*Tree) SetSelectedUserDefinedFunction ¶ added in v0.4.4
func (*Tree) SetSelectedView ¶ added in v0.4.4
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 )
Source Files
¶
- arg_connection.go
- confirmation_modal.go
- connection_form.go
- connection_page.go
- connection_selection.go
- connections_table.go
- constants.go
- csv_export_modal.go
- error_modal.go
- help_modal.go
- help_status.go
- home.go
- json_viewer.go
- pages.go
- pagination.go
- query_history_component.go
- query_history_modal.go
- query_preview_modal.go
- result_table_filter.go
- results_table.go
- results_table_menu.go
- save_query_modal.go
- saved_queries_component.go
- set_value_list.go
- sidebar.go
- sql_editor.go
- tabbed_menu.go
- tree.go