Documentation
¶
Index ¶
- Constants
- func BackupMySQL(dbUser, dbPassword, dbName, backupPath string, cmdModifier func() []string) (fullFile string, err error)
- func DockerExecCmd(containerName string) []string
- func Sum[E any](field string, defaultV E, newField string) string
- func UNIXSecToDate(field string, format string, newField string) string
- type DeleteBuilder
- type InsertBuilder
- type SelectBuilder
- type UpdateBuilder
Constants ¶
View Source
const ( DateFormatDef = "YYYY-MM-DD HH:MM:SS" DateFormatYMD = "%Y-%m-%d" DateFormatYM = "%Y-%m" )
View Source
const (
DateFormatter1 = "%Y-%m-%d %H:%i:%s"
)
Variables ¶
This section is empty.
Functions ¶
func BackupMySQL ¶ added in v1.11.40
func DockerExecCmd ¶ added in v1.11.40
Types ¶
type DeleteBuilder ¶
type DeleteBuilder interface { Table(name string) DeleteBuilder Where(query string, args ...any) DeleteBuilder Or(query string, args ...any) DeleteBuilder ToSql() string }
func NewDeleteSQL ¶
func NewDeleteSQL() DeleteBuilder
type InsertBuilder ¶
type InsertBuilder interface { Table(name string) InsertBuilder Columns(col ...string) InsertBuilder AppendValues(v ...any) InsertBuilder ToSql() string }
func NewInsertSQL ¶
func NewInsertSQL() InsertBuilder
type SelectBuilder ¶
type SelectBuilder interface { Table(query string) SelectBuilder Select(column ...string) SelectBuilder Joins(query string, args ...any) SelectBuilder Where(query string, args ...any) SelectBuilder Having(query string, args ...any) SelectBuilder Or(query string, args ...any) SelectBuilder Group(name string) SelectBuilder Order(v string) SelectBuilder PageLimit(page, limit int) SelectBuilder ToCountSql() string ToSql() string }
func NewSelectSQL ¶
func NewSelectSQL() SelectBuilder
type UpdateBuilder ¶
type UpdateBuilder interface { Table(name string) UpdateBuilder Where(query string, args ...any) UpdateBuilder Or(query string, args ...any) UpdateBuilder Update(column string, v any) UpdateBuilder ToSql() string }
func NewUpdateSQL ¶
func NewUpdateSQL() UpdateBuilder
Source Files
¶
Click to show internal directories.
Click to hide internal directories.