Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CfgFile = filepath.Join(CfgPath, "config.yaml")
View Source
var CfgPath = os.ExpandEnv("$HOME/.config/squix/")
Functions ¶
func FromConnectionYaml ¶
func FromConnectionYaml(yc *ConnectionYAML) db.DatabaseConnection
Types ¶
type Config ¶
type Config struct {
CurrentConnection string `yaml:"current_connection"`
Connections map[string]*ConnectionYAML `yaml:"connections"`
ColorScheme string `yaml:"color_scheme"`
CustomColorScheme *styles.ColorScheme `yaml:"custom_colors,omitempty"`
History History `yaml:"history"`
DefaultRowLimit int `yaml:"default_row_limit"`
DefaultColumnWidth int `yaml:"default_column_width"`
}
func LoadConfig ¶
func (*Config) SaveQueryAndLast ¶
func (*Config) SaveQueryToConnection ¶
SaveQueryToConnection saves a query to a connection, generating an ID if needed If the query already exists (by name), it returns an error If query.Id == -1, a new ID will be generated
type ConnectionYAML ¶
type ConnectionYAML struct {
Name string `yaml:"name"`
DBType string `yaml:"db_type"`
ConnString string `yaml:"conn_string"`
Schema string `yaml:"schema,omitempty"`
Queries map[string]db.Query `yaml:"queries"`
LastQuery db.Query `yaml:"last_query"`
}
func ToConnectionYAML ¶
func ToConnectionYAML(conn db.DatabaseConnection) *ConnectionYAML
Click to show internal directories.
Click to hide internal directories.