Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
glennliao
2022-10-08 19:36:05 +08:00
committed by GitHub
parent f1455ad37a
commit d7ae5624c8

View File

@ -35,6 +35,11 @@ func (m *Model) TableFields(tableStr string, schema ...string) (fields map[strin
table = m.db.GetCore().guessPrimaryTableName(tableStr)
usedSchema = gutil.GetOrDefaultStr(m.schema, schema...)
)
if table == "" {
return nil, nil
}
return m.db.TableFields(m.GetCtx(), table, usedSchema)
}