Removed blank lines and spaces

This commit is contained in:
Sergey Kurt 2017-03-18 15:18:04 +03:00
parent 4718e72b6d
commit f3f8074833
4 changed files with 1 additions and 9 deletions

View file

@ -32,7 +32,6 @@ func NewMSSQLDriver(user, pass, dbname, host string, port int, sslmode string) *
// MSSQLBuildQueryString builds a query string for MSSQL.
func MSSQLBuildQueryString(user, pass, dbname, host string, port int, sslmode string) string {
query := url.Values{}
query.Add("database", dbname)
query.Add("encrypt", sslmode)

View file

@ -524,16 +524,11 @@ func WhereClause(lq, rq string, start int, cols []string) string {
// WhereClauseRepeated returns the where clause repeated with OR clause using start as the $ flag index
// For example, if start was 2 output would be: "(colthing=$2 AND colstuff=$3) OR (colthing=$4 AND colstuff=$5)"
func WhereClauseRepeated(lq, rq string, start int, cols []string, count int) string {
var startIndex int
buf := GetBuffer()
defer PutBuffer(buf)
buf.WriteByte('(')
for i := 0; i < count; i++ {
if i != 0 {
buf.WriteString(") OR (")
}
@ -546,7 +541,6 @@ func WhereClauseRepeated(lq, rq string, start int, cols []string, count int) str
buf.WriteString(WhereClause(lq, rq, startIndex, cols))
}
buf.WriteByte(')')
return buf.String()

View file

@ -91,7 +91,7 @@ func (o *{{$tableNameSingular}}) Insert(exec boil.Executor, whitelist ... string
if len(cache.retMapping) != 0 {
{{if .UseLastInsertID -}}
cache.retQuery = fmt.Sprintf("SELECT {{.LQ}}%s{{.RQ}} FROM {{$schemaTable}} WHERE %s", strings.Join(returnColumns, "{{.RQ}},{{.LQ}}"), strmangle.WhereClause("{{.LQ}}", "{{.RQ}}", {{if .Dialect.IndexPlaceholders}}1{{else}}0{{end}}, {{$varNameSingular}}PrimaryKeyColumns))
{{else -}}
{{else -}}
cache.query += fmt.Sprintf(" RETURNING {{.LQ}}%s{{.RQ}}", strings.Join(returnColumns, "{{.RQ}},{{.LQ}}"))
{{- end}}
}

View file

@ -34,7 +34,6 @@ func (m *mssqlTester) setup() error {
createCmd := exec.Command("sqlcmd", "-S", m.host, "-U", m.user, "-P", m.pass, "-d", m.testDBName)
f, err := os.Open("tables_schema.sql")
if err != nil {
return errors.Wrap(err, "failed to open tables_schema.sql file")
}