mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
add switch of brief stack for package gerror (#2153)
This commit is contained in:
@ -33,11 +33,8 @@ func (m *Model) QuoteWord(s string) string {
|
||||
func (m *Model) TableFields(tableStr string, schema ...string) (fields map[string]*TableField, err error) {
|
||||
var (
|
||||
table = m.db.GetCore().guessPrimaryTableName(tableStr)
|
||||
usedSchema = m.schema
|
||||
usedSchema = gutil.GetOrDefaultStr(m.schema, schema...)
|
||||
)
|
||||
if len(schema) > 0 && schema[0] != "" {
|
||||
usedSchema = schema[0]
|
||||
}
|
||||
return m.db.TableFields(m.GetCtx(), table, usedSchema)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user