Fix linter errors
This commit is contained in:
parent
3021a6a0fd
commit
38541522e6
7 changed files with 18 additions and 14 deletions
|
|
@ -440,42 +440,42 @@ func RawWithParent(raw string, parent ...Expression) Expression {
|
|||
return rawExp
|
||||
}
|
||||
|
||||
// Raw helper that for integer expressions
|
||||
// RawInt helper that for integer expressions
|
||||
func RawInt(raw string, namedArgs ...map[string]interface{}) IntegerExpression {
|
||||
return IntExp(Raw(raw, namedArgs...))
|
||||
}
|
||||
|
||||
// Raw helper that for float expressions
|
||||
// RawFloat helper that for float expressions
|
||||
func RawFloat(raw string, namedArgs ...map[string]interface{}) FloatExpression {
|
||||
return FloatExp(Raw(raw, namedArgs...))
|
||||
}
|
||||
|
||||
// Raw helper that for string expressions
|
||||
// RawString helper that for string expressions
|
||||
func RawString(raw string, namedArgs ...map[string]interface{}) StringExpression {
|
||||
return StringExp(Raw(raw, namedArgs...))
|
||||
}
|
||||
|
||||
// Raw helper that for time expressions
|
||||
// RawTime helper that for time expressions
|
||||
func RawTime(raw string, namedArgs ...map[string]interface{}) TimeExpression {
|
||||
return TimeExp(Raw(raw, namedArgs...))
|
||||
}
|
||||
|
||||
// Raw helper that for time with time zone expressions
|
||||
// RawTimez helper that for time with time zone expressions
|
||||
func RawTimez(raw string, namedArgs ...map[string]interface{}) TimezExpression {
|
||||
return TimezExp(Raw(raw, namedArgs...))
|
||||
}
|
||||
|
||||
// Raw helper that for timestamp expressions
|
||||
// RawTimestamp helper that for timestamp expressions
|
||||
func RawTimestamp(raw string, namedArgs ...map[string]interface{}) TimestampExpression {
|
||||
return TimestampExp(Raw(raw, namedArgs...))
|
||||
}
|
||||
|
||||
// Raw helper that for timestamp with time zone expressions
|
||||
// RawTimestampz helper that for timestamp with time zone expressions
|
||||
func RawTimestampz(raw string, namedArgs ...map[string]interface{}) TimestampzExpression {
|
||||
return TimestampzExp(Raw(raw, namedArgs...))
|
||||
}
|
||||
|
||||
// Raw helper that for date expressions
|
||||
// RawDate helper that for date expressions
|
||||
func RawDate(raw string, namedArgs ...map[string]interface{}) DateExpression {
|
||||
return DateExp(Raw(raw, namedArgs...))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ type lateralImpl struct {
|
|||
selectTableImpl
|
||||
}
|
||||
|
||||
// NewLateral creates new lateral expression from select statement with alias
|
||||
func NewLateral(selectStmt SerializerStatement, alias string) SelectTable {
|
||||
return lateralImpl{selectTableImpl: NewSelectTable(selectStmt, alias)}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,12 +73,12 @@ var TimestampExp = jet.TimestampExp
|
|||
// RawArgs is type used to pass optional arguments to Raw method
|
||||
type RawArgs = map[string]interface{}
|
||||
|
||||
// Raw can be used for any unsupported functions, operators or expressions.
|
||||
// For example: Raw("current_database()")
|
||||
// Raw helper methods for each of the mysql types
|
||||
var (
|
||||
// Raw can be used for any unsupported functions, operators or expressions.
|
||||
// For example: Raw("current_database()")
|
||||
Raw = jet.Raw
|
||||
|
||||
// Raw helper methods for each of the mysql type
|
||||
RawInt = jet.RawInt
|
||||
RawFloat = jet.RawFloat
|
||||
RawString = jet.RawString
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package mysql
|
|||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
|
||||
// LATERAL derived tables constructor from select statement
|
||||
func LATERAL(selectStmt SelectStatement) lateralImpl {
|
||||
return lateralImpl{
|
||||
selectStmt: selectStmt,
|
||||
|
|
|
|||
|
|
@ -84,12 +84,12 @@ var TimestampzExp = jet.TimestampzExp
|
|||
// RawArgs is type used to pass optional arguments to Raw method
|
||||
type RawArgs = map[string]interface{}
|
||||
|
||||
// Raw can be used for any unsupported functions, operators or expressions.
|
||||
// For example: Raw("current_database()")
|
||||
// Raw helper methods for each of the postgres types
|
||||
var (
|
||||
// Raw can be used for any unsupported functions, operators or expressions.
|
||||
// For example: Raw("current_database()")
|
||||
Raw = jet.Raw
|
||||
|
||||
// Raw helper methods for each of the postgres type
|
||||
RawInt = jet.RawInt
|
||||
RawFloat = jet.RawFloat
|
||||
RawString = jet.RawString
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package postgres
|
|||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
|
||||
// LATERAL derived tables constructor from select statement
|
||||
func LATERAL(selectStmt SelectStatement) lateralImpl {
|
||||
return lateralImpl{
|
||||
selectStmt: selectStmt,
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ func Query(ctx context.Context, db DB, query string, args []interface{}, destPtr
|
|||
}
|
||||
}
|
||||
|
||||
// ScanOneRowToDest will scan one row into struct destination
|
||||
func ScanOneRowToDest(rows *sql.Rows, destPtr interface{}) error {
|
||||
utils.MustBeInitializedPtr(destPtr, "jet: destination is nil")
|
||||
utils.MustBe(destPtr, reflect.Ptr, "jet: destination has to be a pointer to slice or pointer to struct")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue