Documentation
¶
Index ¶
- Variables
- func CollectParameters(sql string, missingParams []string, defaults map[string]string) (map[string]string, error)
- func ExtractParameters(sql string) map[string]string
- func GenerateDisplaySQL(sql string, paramValues map[string]string) string
- func GetMissingRequired(paramDefs, currentValues map[string]string) []string
- func MapPositionalArgs(sql string, positionals []string) map[string]string
- func ResolveParameters(paramDefs, cliValues map[string]string) map[string]string
- func SubstituteParameters(sql string, paramValues map[string]string, conn db.DatabaseConnection) (string, []any, error)
- func ValidateCLIValues(cliValues, paramDefs map[string]string) error
- func ValidateParamNames(paramDefs map[string]string) error
- type InputModel
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAborted = fmt.Errorf("parameter input aborted")
Functions ¶
func CollectParameters ¶
func ExtractParameters ¶
func GetMissingRequired ¶
func ResolveParameters ¶
func SubstituteParameters ¶
func ValidateCLIValues ¶
func ValidateParamNames ¶
Types ¶
type InputModel ¶
type InputModel struct {
// contains filtered or unexported fields
}
func NewInputModel ¶
func NewInputModel(sql string, missingParams []string, defaults map[string]string) InputModel
func (InputModel) GetValues ¶
func (m InputModel) GetValues() map[string]string
func (InputModel) Init ¶
func (m InputModel) Init() tea.Cmd
func (InputModel) View ¶
func (m InputModel) View() string
func (InputModel) WasAborted ¶
func (m InputModel) WasAborted() bool
Click to show internal directories.
Click to hide internal directories.