Documentation ¶
Index ¶
- Constants
- Variables
- func ClearTableRecords()
- func ConnectCallback(form *tview.Form) func()
- func FillTableWithQueryResult(fields []string, result [][]string)
- func GetDbName() string
- func Init()
- func PrintfTextView(format string, a ...any)
- func PrintlnTextView(a ...any)
- func QuitCallback() func()
- func RenderDashBoardPage() *tview.Flex
- func RenderInputFiedl() *tview.InputField
- func RenderLoginPage() *tview.Flex
- func RenderQueryWidget() *tview.Flex
- func RenderTable() *tview.Table
- func RenderTextView() *tview.TextView
- func RenderTreeView() *tview.TreeView
- func SaveCallback(form *tview.Form) func()
- func SetBorderStyle() ...
- func SetCell(row int, column int, text string, color tcell.Color)
- func SetRootTreeNodeName(dbName string)
- type DB
- func (db *DB) Close()
- func (db *DB) FetchTableFields(table string) ([]string, error)
- func (db *DB) FetchTableRecords(table string) ([][]string, error)
- func (db *DB) RawExec(query string) (sql.Result, error)
- func (db *DB) RawQuery(query string) (fields []string, records [][]string, err error)
- func (db *DB) RawSqlCommand(query string) (rawCmdResult RawCommandResult, err error)
- func (db *DB) ShowCurrentDatabaseTables() ([]string, error)
- func (db *DB) ShowDatabaseTables(database string) ([]string, error)
- func (db *DB) ShowDatabases() ([]string, error)
- type RawCommandResult
Constants ¶
View Source
const ( // DQL SELECT = "select" SHOW = "show" )
Variables ¶
View Source
var LoginErrOut *tview.TextView
View Source
var RootTreeNode *tview.TreeNode
View Source
var TableRecords *tview.Table
Functions ¶
func ClearTableRecords ¶
func ClearTableRecords()
func ConnectCallback ¶
func PrintfTextView ¶
This wiil be used when the inputField capture the enter key
func PrintlnTextView ¶
func PrintlnTextView(a ...any)
func QuitCallback ¶
func QuitCallback() func()
func RenderDashBoardPage ¶
func RenderInputFiedl ¶
func RenderInputFiedl() *tview.InputField
func RenderLoginPage ¶
func RenderQueryWidget ¶
func RenderTable ¶
func RenderTextView ¶
func RenderTreeView ¶
func SaveCallback ¶
func SetBorderStyle ¶
func SetBorderStyle() *struct { Horizontal rune Vertical rune TopLeft rune TopRight rune BottomLeft rune BottomRight rune LeftT rune RightT rune TopT rune BottomT rune Cross rune HorizontalFocus rune VerticalFocus rune TopLeftFocus rune TopRightFocus rune BottomLeftFocus rune BottomRightFocus rune }
set new border style and return old one
func SetRootTreeNodeName ¶
func SetRootTreeNodeName(dbName string)
Types ¶
type DB ¶
var (
DbClinet *DB
)
func (*DB) RawSqlCommand ¶
func (db *DB) RawSqlCommand(query string) (rawCmdResult RawCommandResult, err error)
func (*DB) ShowCurrentDatabaseTables ¶
func (*DB) ShowDatabases ¶
Click to show internal directories.
Click to hide internal directories.