Skip to content

Commit

Permalink
shape: Fix Set method doing nothing. Fixes #982.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Jul 24, 2023
1 parent 0fd52c8 commit b8cb792
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions query/shape/shape.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 ?
}
Expand Down

0 comments on commit b8cb792

Please sign in to comment.