orm

package
v0.0.0-...-6cdb919 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatFilterExp

func FormatFilterExp(query *q.Query, columnInTable map[string]string) (string, []interface{})

FormatFilterExp returns a where condition string which has prefixed "and"

func FormatSortExp

func FormatSortExp(query *q.Query) string

func NewMySQLDB

func NewMySQLDB(db *MySQL) (*gorm.DB, error)

func NewSqliteDB

func NewSqliteDB(file string) (*gorm.DB, error)

func ValidateQuery

func ValidateQuery(query q.Query, columnInTable map[string]string) map[string]interface{}

Types

type MySQL

type MySQL struct {
	Host              string `json:"host"`
	Port              int    `json:"port"`
	Username          string `json:"username"`
	Password          string `json:"password,omitempty"`
	Database          string `json:"database"`
	PrometheusEnabled bool   `json:"prometheusEnabled"`
}

MySQL ...

type MySQLMetricsCollector

type MySQLMetricsCollector struct {
	Prefix        string
	Interval      uint32
	VariableNames []string
	// contains filtered or unexported fields
}

func (*MySQLMetricsCollector) Metrics

Jump to

Keyboard shortcuts

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