gorm/clause/expression.go

42 lines
684 B
Go
Raw Normal View History

2020-01-30 10:14:48 +03:00
package clause
2020-02-04 03:56:15 +03:00
const (
PrimaryKey string = "@@@priamry_key@@@"
CurrentTable string = "@@@table@@@"
)
2020-01-30 10:14:48 +03:00
// Expression expression interface
type Expression interface {
Build(builder Builder)
}
// NegationExpressionBuilder negation expression builder
type NegationExpressionBuilder interface {
NegationBuild(builder Builder)
}
2020-02-04 03:56:15 +03:00
// Column quote with name
type Column struct {
Table string
Name string
Alias string
Raw bool
}
// Table quote with name
type Table struct {
Table string
Alias string
Raw bool
2020-01-30 10:14:48 +03:00
}
// Expr raw expression
type Expr struct {
Value string
}
// Build build raw expression
func (expr Expr) Build(builder Builder) {
builder.Write(expr.Value)
}