Documentation
¶
Index ¶
- type Cmd
- func (c *Cmd) Add(args []string)
- func (c *Cmd) CommandInspect(args []string)
- func (c *Cmd) CommandSelect(args []string)
- func (c *Cmd) Compare(args []string)
- func (c *Cmd) Data(args []string)
- func (c *Cmd) Export(args []string)
- func (c *Cmd) Gen(args []string)
- func (c *Cmd) GenDals(g *gen.Gen, database *lib.Database)
- func (c *Cmd) GenInterfaces(g *gen.Gen)
- func (c *Cmd) GenModels(g *gen.Gen, database *lib.Database)
- func (c *Cmd) GenRepos(g *gen.Gen, database *lib.Database)
- func (c *Cmd) GenRoutes(g *gen.Gen)
- func (c *Cmd) Import(args []string)
- func (c *Cmd) Init(args []string)
- func (c *Cmd) Insert(args []string)
- func (c *Cmd) Ls(args []string)
- func (c *Cmd) PrintHelp(args []string)
- func (c *Cmd) Refresh(args []string)
- func (c *Cmd) Rm(args []string)
- func (c *Cmd) Run(inputArgs []string) (err error)
- type Command
- type SearchType
- type TablesCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct {
Options lib.Options
Config *lib.Config
// contains filtered or unexported fields
}
Cmd is a container for handling commands
func (*Cmd) CommandInspect ¶
CommandInspect is the inspect command
func (*Cmd) CommandSelect ¶
CommandSelect selects rows from the database
func (*Cmd) GenInterfaces ¶
GenInterfaces generates interfaces
func (*Cmd) Import ¶
Import fetches the sql schema from the target database (specified in dvc.toml) and from that generates the json representation at `[schema name].schema.json`
func (*Cmd) Ls ¶
Ls lists database information TODO search fields TODO select from tables TODO show row counts in a table
type Command ¶
type Command string
Command is a type that represents the possible commands passed in at run time
const ( CommandAdd Command = "add" CommandInspect Command = "inspect" CommandRm Command = "rm" CommandInit Command = "init" CommandLs Command = "ls" CommandImport Command = "import" CommandExport Command = "export" CommandGen Command = "gen" CommandGenApp Command = "app" CommandGenCLI Command = "cli" CommandGenAPI Command = "api" CommandGenDal Command = "dal" CommandGenDals Command = "dals" CommandGenRepos Command = "repos" CommandGenModels Command = "models" CommandGenInterfaces Command = "interfaces" CommandGenTests Command = "tests" CommandGenModel Command = "model" CommandGenServices Command = "services" CommandGenRoutes Command = "routes" CommandGenTypescript Command = "typescript" CommandCompare Command = "compare" CommandHelp Command = "help" CommandRefresh Command = "refresh" CommandInstall Command = "install" CommandInsert Command = "insert" CommandSelect Command = "select" CommandGenTSPerms Command = "tsperms" CommandData Command = "data" )
Command Names
type SearchType ¶
type SearchType int
SearchType is the type of search
const ( // SearchTypeWildcard is a wildcard SearchTypeWildcard SearchType = iota // SearchTypeStartingWildcard is a wildcard at the start (e.g. `*foo`) SearchTypeStartingWildcard // SearchTypeEndingWildcard is a wildcard at the end (e.g. `foo*`) SearchTypeEndingWildcard // SearchTypeBoth is a wildcard on both the start and the end (e.g. `*foo*`) SearchTypeBoth )
type TablesCache ¶
TablesCache stores an md5 hash of the JSON representation of a table in the schema.json file These hashes are used to skip unchanged models for DAL and Model generation
func NewTablesCache ¶
func NewTablesCache() TablesCache
NewTablesCache is a factory method for TablesCache