Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions database/gdb/gdb_core_structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,13 @@ func (c *Core) mappingAndFilterData(ctx context.Context, schema, table string, d
if err != nil {
return nil, err
}
if len(fieldsMap) == 0 {
toLowerTableName := strings.ToLower(table)
if toLowerTableName == table {
return nil, gerror.Newf("The table %s may not exist, or the field is 0", table)
}
return nil, gerror.Newf("The table %s may not exist, or the field is 0, you can try %s", table, toLowerTableName)
}
fieldsKeyMap := make(map[string]interface{}, len(fieldsMap))
for k := range fieldsMap {
fieldsKeyMap[k] = nil
Expand Down