This commit is contained in:
go-jet 2022-08-23 12:38:16 +02:00
parent 4e1ff65023
commit a2ea1892e5
17 changed files with 44 additions and 43 deletions

View file

@ -18,7 +18,7 @@ type NumericExpression = jet.NumericExpression
// IntegerExpression interface
type IntegerExpression = jet.IntegerExpression
//FloatExpression is interface
// FloatExpression is interface
type FloatExpression = jet.FloatExpression
// TimeExpression interface

View file

@ -296,7 +296,8 @@ const (
)
// EXTRACT function retrieves subfields such as year or hour from date/time values
// EXTRACT(DAY, User.CreatedAt)
//
// EXTRACT(DAY, User.CreatedAt)
func EXTRACT(field unit, from Expression) FloatExpression {
return FloatExp(jet.EXTRACT(unitToString(field), from))
}

View file

@ -120,7 +120,8 @@ type intervalExpression struct {
}
// INTERVAL creates new interval expression from the list of quantity-unit pairs.
// INTERVAL(1, DAY, 3, MINUTE)
//
// INTERVAL(1, DAY, 3, MINUTE)
func INTERVAL(quantityAndUnit ...quantityAndUnit) IntervalExpression {
quantityAndUnitLen := len(quantityAndUnit)
if quantityAndUnitLen == 0 || quantityAndUnitLen%2 != 0 {

View file

@ -65,7 +65,7 @@ type SelectStatement interface {
AsTable(alias string) SelectTable
}
//SELECT creates new SelectStatement with list of projections
// SELECT creates new SelectStatement with list of projections
func SELECT(projection Projection, projections ...Projection) SelectStatement {
return newSelectStatement(nil, append([]Projection{projection}, projections...))
}