From 481f3e2bae694a3f9f9f68811bb4263f31b2e54d Mon Sep 17 00:00:00 2001 From: Alexander Trakhimenok <533159+trakhimenok@users.noreply.github.com> Date: Mon, 21 Aug 2023 15:39:58 +0100 Subject: [PATCH] fix(engine): Relation.Attribute() convert name argument to lower case to be case-insentive --- engine/agnostic/relation.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/agnostic/relation.go b/engine/agnostic/relation.go index ae06cad..5dd3b8d 100644 --- a/engine/agnostic/relation.go +++ b/engine/agnostic/relation.go @@ -4,6 +4,7 @@ import ( "container/list" "errors" "fmt" + "strings" "sync" ) @@ -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")