Skip to content

Commit

Permalink
add operators
Browse files Browse the repository at this point in the history
  • Loading branch information
vmidyllic committed Feb 27, 2024
1 parent b26426c commit ab13bcf
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions pubsignals/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,28 @@ import (
)

var allOperations = map[int]struct{}{
circuits.EQ: {},
circuits.LT: {},
circuits.LTE: {},
circuits.GT: {},
circuits.GTE: {},
circuits.IN: {},
circuits.NIN: {},
circuits.NE: {},
circuits.BETWEEN: {},
circuits.NULLIFY: {},
circuits.EQ: {},
circuits.LT: {},
circuits.LTE: {},
circuits.GT: {},
circuits.GTE: {},
circuits.IN: {},
circuits.NIN: {},
circuits.NE: {},
circuits.BETWEEN: {},
circuits.NULLIFY: {},
circuits.EXISTS: {},
circuits.NONBETWEEN: {},
}

var availableTypesOperations = map[string]map[int]struct{}{
ld.XSDBoolean: {circuits.EQ: {}, circuits.NE: {}},
ld.XSDBoolean: {circuits.EQ: {}, circuits.NE: {}, circuits.EXISTS: {}},
ld.XSDInteger: allOperations,
ld.XSDNS + "nonNegativeInteger": allOperations,
ld.XSDNS + "positiveInteger": allOperations,
ld.XSDString: {circuits.EQ: {}, circuits.NE: {}, circuits.IN: {}, circuits.NIN: {}},
ld.XSDString: {circuits.EQ: {}, circuits.NE: {}, circuits.IN: {}, circuits.NIN: {}, circuits.EXISTS: {}},
ld.XSDNS + "dateTime": allOperations,
ld.XSDDouble: {circuits.EQ: {}, circuits.NE: {}, circuits.IN: {}, circuits.NIN: {}},
ld.XSDDouble: {circuits.EQ: {}, circuits.NE: {}, circuits.IN: {}, circuits.NIN: {}, circuits.EXISTS: {}},
}

// PathToSubjectType path to description of subject type.
Expand Down

0 comments on commit ab13bcf

Please sign in to comment.