Postgres linter errors.
This commit is contained in:
parent
46a3dc7dfb
commit
ab6d85f886
20 changed files with 310 additions and 29 deletions
|
|
@ -98,6 +98,8 @@ func (c columnImpl) serialize(statement StatementType, out *SqlBuilder, options
|
|||
|
||||
//------------------------------------------------------//
|
||||
|
||||
// IColumnList is used to store list of columns for later reuse as single projection or
|
||||
// column list for UPDATE and INSERT statement.
|
||||
type IColumnList interface {
|
||||
Projection
|
||||
Column
|
||||
|
|
@ -105,6 +107,7 @@ type IColumnList interface {
|
|||
columns() []ColumnExpression
|
||||
}
|
||||
|
||||
// ColumnList function returns list of columns that be used as projection or column list for UPDATE and INSERT statement.
|
||||
func ColumnList(columns ...ColumnExpression) IColumnList {
|
||||
return columnListImpl(columns)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package jet
|
||||
|
||||
// DateExpression is interface for all SQL date expressions.
|
||||
// DateExpression is interface for date types
|
||||
type DateExpression interface {
|
||||
Expression
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ type integerLiteralExpression struct {
|
|||
integerInterfaceImpl
|
||||
}
|
||||
|
||||
// Int is constructor for integer expressions literals.
|
||||
// Int creates new integer literal
|
||||
func Int(value int64) IntegerExpression {
|
||||
numLiteral := &integerLiteralExpression{}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ type floatLiteral struct {
|
|||
literalExpressionImpl
|
||||
}
|
||||
|
||||
// Float creates new float literal expression
|
||||
// Float creates new float literal
|
||||
func Float(value float64) FloatExpression {
|
||||
floatLiteral := floatLiteral{}
|
||||
floatLiteral.literalExpressionImpl = *literal(value)
|
||||
|
|
@ -139,6 +139,7 @@ func Time(hour, minute, second int, nanoseconds ...time.Duration) TimeExpression
|
|||
return timeLiteral
|
||||
}
|
||||
|
||||
// TimeT creates new time literal expression from time.Time object
|
||||
func TimeT(t time.Time) TimeExpression {
|
||||
timeLiteral := &timeLiteral{}
|
||||
timeLiteral.literalExpressionImpl = *literal(t)
|
||||
|
|
@ -165,6 +166,7 @@ func Timez(hour, minute, second int, nanoseconds time.Duration, timezone string)
|
|||
return TimezExp(literal(timeStr))
|
||||
}
|
||||
|
||||
// TimezT creates new time with time zone literal expression from time.Time object
|
||||
func TimezT(t time.Time) TimezExpression {
|
||||
timeLiteral := &timezLiteral{}
|
||||
timeLiteral.literalExpressionImpl = *literal(t)
|
||||
|
|
@ -190,6 +192,7 @@ func Timestamp(year int, month time.Month, day, hour, minute, second int, nanose
|
|||
return timestamp
|
||||
}
|
||||
|
||||
// TimestampT creates new timestamp literal expression from time.Time object
|
||||
func TimestampT(t time.Time) TimestampExpression {
|
||||
timestamp := ×tampLiteral{}
|
||||
timestamp.literalExpressionImpl = *literal(t)
|
||||
|
|
@ -204,7 +207,7 @@ type timestampzLiteral struct {
|
|||
literalExpressionImpl
|
||||
}
|
||||
|
||||
// Timestamp creates new timestamp literal expression
|
||||
// Timestampz creates new timestamp with time zone literal expression
|
||||
func Timestampz(year int, month time.Month, day, hour, minute, second int, nanoseconds time.Duration, timezone string) TimestampzExpression {
|
||||
timestamp := ×tampzLiteral{}
|
||||
timeStr := fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, second)
|
||||
|
|
@ -216,6 +219,7 @@ func Timestampz(year int, month time.Month, day, hour, minute, second int, nanos
|
|||
return timestamp
|
||||
}
|
||||
|
||||
// TimestampzT creates new timestamp literal expression from time.Time object
|
||||
func TimestampzT(t time.Time) TimestampzExpression {
|
||||
timestamp := ×tampzLiteral{}
|
||||
timestamp.literalExpressionImpl = *literal(t)
|
||||
|
|
@ -230,7 +234,7 @@ type dateLiteral struct {
|
|||
literalExpressionImpl
|
||||
}
|
||||
|
||||
//Date creates new date expression
|
||||
// Date creates new date literal expression
|
||||
func Date(year int, month time.Month, day int) DateExpression {
|
||||
dateLiteral := &dateLiteral{}
|
||||
|
||||
|
|
@ -241,6 +245,7 @@ func Date(year int, month time.Month, day int) DateExpression {
|
|||
return dateLiteral
|
||||
}
|
||||
|
||||
// DateT creates new date literal expression from time.Time object
|
||||
func DateT(t time.Time) DateExpression {
|
||||
dateLiteral := &dateLiteral{}
|
||||
dateLiteral.literalExpressionImpl = *literal(t)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package jet
|
||||
|
||||
// TimezExpression interface 'time with time zone'
|
||||
// TimezExpression interface for 'time with time zone' types
|
||||
type TimezExpression interface {
|
||||
Expression
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue