diff --git a/query.go b/query.go index 00c6a5a..d83ec3d 100644 --- a/query.go +++ b/query.go @@ -8,7 +8,8 @@ import ( // List of available operators. const ( - EQ int = iota + NOOP int = iota // No operation, skip query verification in circuit + EQ LT GT IN @@ -24,11 +25,12 @@ type Query struct { // QueryOperators represents operators for atomic circuits var QueryOperators = map[string]int{ - "$eq": EQ, - "$lt": LT, - "$gt": GT, - "$in": IN, - "$nin": NIN, + "$noop": NOOP, + "$eq": EQ, + "$lt": LT, + "$gt": GT, + "$in": IN, + "$nin": NIN, } // Comparer value. diff --git a/query_test.go b/query_test.go index 1153588..c3ef6b2 100644 --- a/query_test.go +++ b/query_test.go @@ -1,10 +1,10 @@ package circuits import ( -"math/big" -"testing" + "math/big" + "testing" -"github.com/stretchr/testify/require" + "github.com/stretchr/testify/require" ) func TestScalarCompare(t *testing.T) { @@ -64,7 +64,7 @@ func TestScalarCompare(t *testing.T) { name: "testing unknown operator", x: big.NewInt(0), y: big.NewInt(1), - operator: 4, // unknown operator. + operator: 6, // unknown operator. expected: false, withErr: true, },