mirror of https://github.com/lqs/sqlingo
fix gofmt issues
This commit is contained in:
parent
9f85350cf8
commit
8834a4fefd
|
|
@ -53,4 +53,3 @@ func parseArgs(exampleDataSourceName string) (dataSourceName string, tableNames
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ func ensureIdentifier(name string) string {
|
|||
return result
|
||||
}
|
||||
|
||||
// Generate generates code for the given driverName.
|
||||
func Generate(driverName string, exampleDataSourceName string) (string, error) {
|
||||
dataSourceName, tableNames := parseArgs(exampleDataSourceName)
|
||||
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ func (s selectStatus) Offset(offset int) selectWithOffset {
|
|||
}
|
||||
|
||||
func (s selectStatus) Count() (count int, err error) {
|
||||
if s.lastUnion == nil && len(s.base.groupBys) == 0 && s.limit == nil {
|
||||
if s.lastUnion == nil && len(s.base.groupBys) == 0 && s.limit == nil {
|
||||
if s.base.distinct {
|
||||
fields := s.base.fields
|
||||
s.base.distinct = false
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/lqs/sqlingo/generator"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
|||
|
|
@ -59,9 +59,8 @@ func (s updateStatus) Set(field Field, value interface{}) updateWithSet {
|
|||
func (s updateStatus) SetIf(condition bool, field Field, value interface{}) updateWithSet {
|
||||
if condition {
|
||||
return s.Set(field, value)
|
||||
} else {
|
||||
return s
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func (s updateStatus) Where(conditions ...BooleanExpression) updateWithWhere {
|
||||
|
|
|
|||
Loading…
Reference in New Issue