From b8cb792a0d3b6c2ec815ea1119a59f5bf6f281f9 Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Mon, 24 Jul 2023 11:44:20 +0300 Subject: [PATCH] shape: Fix Set method doing nothing. Fixes #982. --- query/shape/shape.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/query/shape/shape.go b/query/shape/shape.go index eebe21ff7..8ef7a3a4c 100644 --- a/query/shape/shape.go +++ b/query/shape/shape.go @@ -7,11 +7,12 @@ import ( "regexp" "strings" + "github.com/cayleygraph/quad" + "github.com/cayleygraph/cayley/clog" "github.com/cayleygraph/cayley/graph" "github.com/cayleygraph/cayley/graph/iterator" "github.com/cayleygraph/cayley/graph/refs" - "github.com/cayleygraph/quad" ) var ( @@ -176,7 +177,7 @@ func (q InternalQuad) Get(d quad.Direction) refs.Ref { } // Set assigns a specified direction of the quad to a given value. -func (q InternalQuad) Set(d quad.Direction, v refs.Ref) { +func (q *InternalQuad) Set(d quad.Direction, v refs.Ref) { switch d { case quad.Subject: q.Subject = v @@ -362,8 +363,8 @@ var _ ValueFilter = Wildcard{} // Wildcard is a filter for string patterns. // -// % - zero or more characters -// ? - exactly one character +// % - zero or more characters +// ? - exactly one character type Wildcard struct { Pattern string // allowed wildcards are: % and ? }