cmds

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const SelectSlug = "select"
View Source
const SqletonAppName = "sqleton"

Variables

View Source
var DbCmd = &cobra.Command{
	Use:   "db",
	Short: "Manage databases",
}

Functions

func NewCodegenCommand added in v0.1.79

func NewCodegenCommand() *cobra.Command

func NewSelectSection added in v0.4.0

func NewSelectSection() (*schema.SectionImpl, error)

func NewSqletonParserConfig added in v0.4.1

func NewSqletonParserConfig() cli.CobraParserConfig

Types

type QueryCommand added in v0.1.5

type QueryCommand struct {
	*cmds.CommandDescription
	// contains filtered or unexported fields
}

func NewQueryCommand added in v0.1.5

func NewQueryCommand(
	dbConnectionFactory sql.DBConnectionFactory,
	options ...cmds.CommandDescriptionOption,
) (*QueryCommand, error)

func (*QueryCommand) RunIntoGlazeProcessor added in v0.2.0

func (q *QueryCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type QuerySettings added in v0.2.0

type QuerySettings struct {
	Query string `glazed:"query"`
}

type RunCommand added in v0.1.5

type RunCommand struct {
	*cmds.CommandDescription
	// contains filtered or unexported fields
}

func NewRunCommand added in v0.1.5

func NewRunCommand(
	dbConnectionFactory sql.DBConnectionFactory,
	options ...cmds.CommandDescriptionOption,
) (*RunCommand, error)

func (*RunCommand) RunIntoGlazeProcessor added in v0.2.0

func (c *RunCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type RunSettings added in v0.2.0

type RunSettings struct {
	InputFiles []string `glazed:"input-files"`
}

type SelectCommand added in v0.1.5

type SelectCommand struct {
	*cmds.CommandDescription
	// contains filtered or unexported fields
}

func NewSelectCommand added in v0.1.5

func NewSelectCommand(
	dbConnectionFactory sql2.DBConnectionFactory,
	options ...cmds.CommandDescriptionOption,
) (*SelectCommand, error)

func (*SelectCommand) RunIntoGlazeProcessor added in v0.2.0

func (sc *SelectCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type SelectCommandSettings added in v0.1.8

type SelectCommandSettings struct {
	Columns     []string `glazed:"columns"`
	Limit       int      `glazed:"limit"`
	Offset      int      `glazed:"offset"`
	Count       bool     `glazed:"count"`
	Where       []string `glazed:"where"`
	OrderBy     string   `glazed:"order-by"`
	Distinct    bool     `glazed:"distinct"`
	Table       string   `glazed:"table"`
	CreateQuery string   `glazed:"create-query"`
}

type ServeCommand added in v0.1.35

type ServeCommand struct {
	*cmds.CommandDescription
	// contains filtered or unexported fields
}

func NewServeCommand added in v0.1.35

func NewServeCommand(
	dbConnectionFactory sql.DBConnectionFactory,
	repositoryPaths []string,
	options ...cmds.CommandDescriptionOption,
) (*ServeCommand, error)

func (*ServeCommand) Run added in v0.1.36

func (s *ServeCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

type ServeSettings added in v0.2.0

type ServeSettings struct {
	Dev         bool     `glazed:"dev"`
	Debug       bool     `glazed:"debug"`
	ServePort   int      `glazed:"serve-port"`
	ServeHost   string   `glazed:"serve-host"`
	ContentDirs []string `glazed:"content-dirs"`
	ConfigFile  string   `glazed:"serve-config-file"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL