helper

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckObject

func CheckObject(obj Object) error

func IfClause

func IfClause(conds []Cond) string

func JoinSetBuilder

func JoinSetBuilder(src *strings.Builder, setValue strings.Builder)

func JoinWhereBuilder

func JoinWhereBuilder(src *strings.Builder, whereValue strings.Builder)

func SetClause

func SetClause(conds []string) string

func WhereClause

func WhereClause(conds []string) string

Types

type Cond

type Cond struct {
	Cond   bool
	Result string
}

type Field

type Field interface {
	Name() string
	Type() string

	ColumnName() string
	GORMTag() string
	JSONTag() string
	Tag() string

	Comment() string
}

type JoinTblExpr

type JoinTblExpr struct {
	clause.Join
	TableExpr clause.Expression
}

JoinTblExpr join clause with table expression(sub query...)

func NewJoinTblExpr

func NewJoinTblExpr(join clause.Join, tbExpr clause.Expression) JoinTblExpr

func (JoinTblExpr) Build

func (join JoinTblExpr) Build(builder clause.Builder)

type Object

type Object interface {
	TableName() string
	StructName() string
	FileName() string
	ImportPkgPaths() []string

	Fields() []Field
}

Jump to

Keyboard shortcuts

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