Skip to content

Commit

Permalink
fix(engine): Relation.Attribute() convert name argument to lower case…
Browse files Browse the repository at this point in the history
… to be case-insentive
  • Loading branch information
trakhimenok authored and proullon committed Aug 21, 2023
1 parent e12c987 commit 481f3e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engine/agnostic/relation.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"container/list"
"errors"
"fmt"
"strings"
"sync"
)

Expand Down Expand Up @@ -57,6 +58,7 @@ func NewRelation(schema, name string, attributes []Attribute, pk []string) (*Rel
}

func (r *Relation) Attribute(name string) (int, Attribute, error) {
name = strings.ToLower(name)
index, ok := r.attrIndex[name]
if !ok {
return 0, Attribute{}, errors.New("attribute not defined")
Expand Down

0 comments on commit 481f3e2

Please sign in to comment.