2019-08-03 14:10:47 +02:00
|
|
|
package mysql
|
|
|
|
|
|
|
|
|
|
import "github.com/go-jet/jet/internal/jet"
|
|
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// Expression is common interface for all expressions.
|
|
|
|
|
// Can be Bool, Int, Float, String, Date, Time, Timez, Timestamp or Timestampz expressions.
|
2019-09-26 11:44:46 +02:00
|
|
|
type Expression = jet.Expression
|
2019-08-03 14:10:47 +02:00
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// BoolExpression interface
|
2019-09-26 11:44:46 +02:00
|
|
|
type BoolExpression = jet.BoolExpression
|
2019-08-03 14:10:47 +02:00
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// StringExpression interface
|
2019-09-26 11:44:46 +02:00
|
|
|
type StringExpression = jet.StringExpression
|
2019-08-03 14:10:47 +02:00
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// IntegerExpression interface
|
2019-09-26 11:44:46 +02:00
|
|
|
type IntegerExpression = jet.IntegerExpression
|
2019-08-03 14:10:47 +02:00
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// FloatExpression interface
|
2019-09-26 11:44:46 +02:00
|
|
|
type FloatExpression = jet.FloatExpression
|
2019-08-03 14:10:47 +02:00
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// TimeExpression interface
|
2019-09-26 11:44:46 +02:00
|
|
|
type TimeExpression = jet.TimeExpression
|
2019-08-06 10:29:04 +02:00
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// DateExpression interface
|
2019-09-26 11:44:46 +02:00
|
|
|
type DateExpression = jet.DateExpression
|
2019-08-03 14:10:47 +02:00
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// DateTimeExpression interface
|
2019-09-26 11:44:46 +02:00
|
|
|
type DateTimeExpression = jet.TimestampExpression
|
2019-08-03 14:10:47 +02:00
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// TimestampExpression interface
|
2019-09-26 11:44:46 +02:00
|
|
|
type TimestampExpression = jet.TimestampExpression
|
2019-08-03 14:10:47 +02:00
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// BoolExp is bool expression wrapper around arbitrary expression.
|
|
|
|
|
// Allows go compiler to see any expression as bool expression.
|
|
|
|
|
// Does not add sql cast to generated sql builder output.
|
2019-08-06 10:29:04 +02:00
|
|
|
var BoolExp = jet.BoolExp
|
2019-08-17 10:43:16 +02:00
|
|
|
|
|
|
|
|
// StringExp is string expression wrapper around arbitrary expression.
|
|
|
|
|
// Allows go compiler to see any expression as string expression.
|
|
|
|
|
// Does not add sql cast to generated sql builder output.
|
2019-08-06 10:29:04 +02:00
|
|
|
var StringExp = jet.StringExp
|
2019-08-17 10:43:16 +02:00
|
|
|
|
|
|
|
|
// IntExp is int expression wrapper around arbitrary expression.
|
|
|
|
|
// Allows go compiler to see any expression as int expression.
|
|
|
|
|
// Does not add sql cast to generated sql builder output.
|
2019-08-06 10:29:04 +02:00
|
|
|
var IntExp = jet.IntExp
|
2019-08-17 10:43:16 +02:00
|
|
|
|
|
|
|
|
// FloatExp is date expression wrapper around arbitrary expression.
|
|
|
|
|
// Allows go compiler to see any expression as float expression.
|
|
|
|
|
// Does not add sql cast to generated sql builder output.
|
2019-08-06 10:29:04 +02:00
|
|
|
var FloatExp = jet.FloatExp
|
2019-08-17 10:43:16 +02:00
|
|
|
|
|
|
|
|
// TimeExp is time expression wrapper around arbitrary expression.
|
|
|
|
|
// Allows go compiler to see any expression as time expression.
|
|
|
|
|
// Does not add sql cast to generated sql builder output.
|
2019-08-06 10:29:04 +02:00
|
|
|
var TimeExp = jet.TimeExp
|
2019-08-17 10:43:16 +02:00
|
|
|
|
|
|
|
|
// DateExp is date expression wrapper around arbitrary expression.
|
|
|
|
|
// Allows go compiler to see any expression as date expression.
|
|
|
|
|
// Does not add sql cast to generated sql builder output.
|
2019-08-06 10:29:04 +02:00
|
|
|
var DateExp = jet.DateExp
|
2019-08-17 10:43:16 +02:00
|
|
|
|
|
|
|
|
// DateTimeExp is timestamp expression wrapper around arbitrary expression.
|
|
|
|
|
// Allows go compiler to see any expression as timestamp expression.
|
|
|
|
|
// Does not add sql cast to generated sql builder output.
|
2019-08-06 10:29:04 +02:00
|
|
|
var DateTimeExp = jet.TimestampExp
|
2019-08-17 10:43:16 +02:00
|
|
|
|
|
|
|
|
// TimestampExp is timestamp expression wrapper around arbitrary expression.
|
|
|
|
|
// Allows go compiler to see any expression as timestamp expression.
|
|
|
|
|
// Does not add sql cast to generated sql builder output.
|
2019-08-06 10:29:04 +02:00
|
|
|
var TimestampExp = jet.TimestampExp
|
|
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// Raw can be used for any unsupported functions, operators or expressions.
|
|
|
|
|
// For example: Raw("current_database()")
|
2019-08-06 13:29:26 +02:00
|
|
|
var Raw = jet.Raw
|
2019-08-16 11:19:06 +02:00
|
|
|
|
2019-08-17 10:43:16 +02:00
|
|
|
// NewEnumValue creates new named enum value
|
2019-08-16 11:19:06 +02:00
|
|
|
var NewEnumValue = jet.NewEnumValue
|