Documentation
¶
Index ¶
- Constants
- type Focus
- type Query
- type State
- type Tab
- type Workflow
- func (w *Workflow) BeginOpening(target, status string)
- func (w *Workflow) CancelQuery()
- func (w *Workflow) ChangeBrowsePage(delta int) bool
- func (w *Workflow) Fail(status string)
- func (w *Workflow) FinishQuery() (canceled, quit bool)
- func (w *Workflow) MatchesQuery(requestID uint64) bool
- func (w *Workflow) Opened(target string, service sharedsql.Service, status string)
- func (w *Workflow) RecoverToPicker(status string)
- func (w *Workflow) RequestQuit()
- func (w *Workflow) Running() bool
- func (w *Workflow) SelectDatabase(database string)
- func (w *Workflow) SelectSchema(database, schema string)
- func (w *Workflow) SelectTable(table string)
- func (w *Workflow) StartQuery(ctx context.Context, statement string) (Query, bool)
- func (w *Workflow) StartQueryForTest(ctx context.Context) uint64
- func (w *Workflow) StatusRevision() uint64
- type WorkspaceTarget
- type WorkspaceTargetKind
Constants ¶
const BrowsePageSize = 25
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tab ¶
type Tab uint8
const ( TabSQL Tab = iota TabBrowse TabStructure TabIndexes TabForeignKeys TabDiagram // TabCustom marks that a driver-advertised custom workspace view is // active instead of a standard tab; the view's id lives in the // workbench's workspace-view state. The standard tab policy never // selects it directly. TabCustom )
type Workflow ¶
type Workflow struct {
State State
Focus Focus
Tab Tab
Target string
Status string
ReadOnly bool
Database sharedsql.Service
SelectedTable string
WorkspaceTarget WorkspaceTarget
BrowsePage int
// contains filtered or unexported fields
}
func (*Workflow) BeginOpening ¶
func (*Workflow) CancelQuery ¶
func (w *Workflow) CancelQuery()
func (*Workflow) ChangeBrowsePage ¶
func (*Workflow) FinishQuery ¶
func (*Workflow) MatchesQuery ¶
func (*Workflow) RecoverToPicker ¶
func (*Workflow) RequestQuit ¶
func (w *Workflow) RequestQuit()
func (*Workflow) SelectDatabase ¶
SelectDatabase opens a database scope: the table selection is cleared, the target set, and the workspace lands on the Browse tab.
func (*Workflow) SelectSchema ¶
SelectSchema opens a schema scope: the table selection is cleared, the target set, and the workspace lands on the Browse tab.
func (*Workflow) SelectTable ¶
SelectTable opens the qualified table in the workspace: the table target is set, SelectedTable retained for the existing table features, the browse page reset, and the workspace focused on the structure tab.
func (*Workflow) StartQuery ¶
func (*Workflow) StartQueryForTest ¶
func (*Workflow) StatusRevision ¶
StatusRevision returns a counter incremented on every Status write through the workflow methods, so callers can observe a status event even when the text is identical to the previous one.
type WorkspaceTarget ¶
type WorkspaceTarget struct {
Kind WorkspaceTargetKind
Database string
Schema string
Table string
}
WorkspaceTarget is the workspace's active scope: no selection, a database, a PostgreSQL schema, or a qualified table/collection. The tab policy derives the visible tabs from it; SelectedTable mirrors the table kind for the existing table features.
type WorkspaceTargetKind ¶
type WorkspaceTargetKind uint8
WorkspaceTargetKind is the sidebar scope the workspace tabs serve.
const ( WorkspaceNone WorkspaceTargetKind = iota WorkspaceDatabase WorkspaceSchema WorkspaceTable )