Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Oct 8, 2024
1 parent 1d06b62 commit 515b82f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions database/gdb/gdb_model_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ func (m *Model) Array(fieldsAndWhere ...interface{}) ([]Value, error) {
}
var field string
if len(all) > 0 {
// the result might be modified by custom hook function,
// which might make the internalData.FirstResultColumn missing.
var recordFields = m.getRecordFields(all[0])
if len(recordFields) > 1 {
// it returns error if there are multiple fields in the result record.
Expand Down Expand Up @@ -405,8 +403,6 @@ func (m *Model) Value(fieldsAndWhere ...interface{}) (Value, error) {
return nil, err
}
if len(all) > 0 {
// the result might be modified by custom hook function,
// which might make the internalData.FirstResultColumn missing.
var recordFields = m.getRecordFields(all[0])
if len(recordFields) == 1 {
for _, v := range all[0] {
Expand Down Expand Up @@ -454,8 +450,6 @@ func (m *Model) Count(where ...interface{}) (int, error) {
return 0, err
}
if len(all) > 0 {
// the result might be modified by custom hook function,
// which might make the internalData.FirstResultColumn missing.
var recordFields = m.getRecordFields(all[0])
if len(recordFields) == 1 {
for _, v := range all[0] {
Expand Down

0 comments on commit 515b82f

Please sign in to comment.