Documentation
¶
Index ¶
- func Execute(params ExecutionParams) error
- func ExecuteNonSelect(params ExecutionParams)
- func ExecuteSelect(sql, queryName string, params ExecutionParams) error
- func IsLikelySQL(s string) bool
- func IsSelectQuery(sql string) bool
- func ShouldCreateNewQuery(resolved ResolvedQuery) bool
- type ExecutionParams
- type Flags
- type ResolvedQuery
- type SaveQueryCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute(params ExecutionParams) error
func ExecuteNonSelect ¶
func ExecuteNonSelect(params ExecutionParams)
func ExecuteSelect ¶
func ExecuteSelect(sql, queryName string, params ExecutionParams) error
func IsLikelySQL ¶
func IsSelectQuery ¶
func ShouldCreateNewQuery ¶
func ShouldCreateNewQuery(resolved ResolvedQuery) bool
Types ¶
type ExecutionParams ¶
type ExecutionParams struct {
Query db.Query
Connection db.DatabaseConnection
Config *config.Config
SaveCallback SaveQueryCallback
OnRerun func(editedSQL string)
Args []any // Arguments for parameterized queries
DisplaySQL string // Human-readable SQL with values substituted (for TUI display)
}
type ResolvedQuery ¶
func ResolveQuery ¶
func ResolveQuery(flags Flags, cfg *config.Config, currentConn string, conn db.DatabaseConnection) (ResolvedQuery, error)
ResolveQuery determines which query to run based on flags and config Priority:
- Last query (if --last/-l flag)
- Inline SQL (if selector looks like SQL)
- Saved query by name/ID
- Create new in editor (default)
Click to show internal directories.
Click to hide internal directories.