Skip to content

Commit

Permalink
fix issue #1965 (#2177)
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn authored and houseme committed Oct 22, 2022
1 parent 7685966 commit feee43f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 6 additions & 1 deletion database/gdb/gdb_driver_wrapper_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ func (d *DriverWrapperDB) Tables(ctx context.Context, schema ...string) (tables
//
// It's using cache feature to enhance the performance, which is never expired util the
// process restarts.
func (d *DriverWrapperDB) TableFields(ctx context.Context, table string, schema ...string) (fields map[string]*TableField, err error) {
func (d *DriverWrapperDB) TableFields(
ctx context.Context, table string, schema ...string,
) (fields map[string]*TableField, err error) {
if table == "" {
return nil, nil
}
charL, charR := d.GetChars()
table = gstr.Trim(table, charL+charR)
if gstr.Contains(table, " ") {
Expand Down
5 changes: 0 additions & 5 deletions database/gdb/gdb_model_utility.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ 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)
}

Expand Down

0 comments on commit feee43f

Please sign in to comment.