Upstep Go dependencies (#340)

* Upstep Go dependencies

* tiny linter fix

* Tidy
This commit is contained in:
tobi 2021-12-12 15:47:51 +01:00 committed by GitHub
commit 67ac8db190
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
160 changed files with 248601 additions and 232400 deletions

View file

@ -452,9 +452,12 @@ func (q *UpdateQuery) afterUpdateHook(ctx context.Context) error {
// FQN returns a fully qualified column name. For MySQL, it returns the column name with
// the table alias. For other RDBMS, it returns just the column name.
func (q *UpdateQuery) FQN(name string) Ident {
if q.db.fmter.HasFeature(feature.UpdateMultiTable) {
return Ident(q.table.Alias + "." + name)
func (q *UpdateQuery) FQN(column string) Ident {
if q.table == nil {
panic("UpdateQuery.FQN requires a model")
}
return Ident(name)
if q.db.HasFeature(feature.UpdateMultiTable) {
return Ident(q.table.Alias + "." + column)
}
return Ident(column)
}