You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3a8b721
Browse filesBrowse the repository at this point in the historyBrowse files
fix(golang): address the second review of the operator exports
- The catalog reader and se_query_term's reader share one parser each for
an operator's name, fidelity and index. A name is one of eq, lt, lte,
gt, gte, between and matches, the set the engine's OpSpec::parse
accepts. The catalog took any non-empty name, so "like" or "Eq" parsed
and failed later as unknown_operator from Cipher.QueryTerm, and
se_query_term took any operator and any index, which the catalog
refused. Both now refuse the same values, and a test feeds every name
the engine writes through both.
- The query fixture test checks that query_operators.json was recorded
under queryPlan, so a fixture regenerated under another plan fails by
name rather than as mismatched term bytes.
Copy file name to clipboardExpand all lines: packages/stack-encrypt/tests/ui/op_at_path_not_a_leaf.stderr
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,12 @@ error[E0277]: `Contains` is not a leaf operator, so it cannot be applied at a pa
9
9
= help: the trait `Leaf` is not implemented for `Contains`
10
10
= note: `op::AtPath` applies `op::Eq`, `Lt`, `Lte`, `Gt`, `Gte`, `Between` or `Matches` at a path; `op::Contains` and `op::ContainedBy` compare whole documents, and an accessor does not nest
11
11
= help: the following other types implement trait `Leaf`:
12
-
Between
13
-
Gt
14
-
Gte
15
-
Lt
16
-
Lte
12
+
stack_encrypt::op::Between
17
13
stack_encrypt::op::Eq
14
+
stack_encrypt::op::Gt
15
+
stack_encrypt::op::Gte
16
+
stack_encrypt::op::Lt
17
+
stack_encrypt::op::Lte
18
18
stack_encrypt::op::Matches<C>
19
19
= note: required for `AtPath<Contains>` to implement `Operator`
20
20
note: required by a bound in `operator`
@@ -34,12 +34,12 @@ error[E0277]: `AtPath<stack_encrypt::op::Eq>` is not a leaf operator, so it cann
34
34
= help: the trait `Leaf` is not implemented for `AtPath<stack_encrypt::op::Eq>`
35
35
= note: `op::AtPath` applies `op::Eq`, `Lt`, `Lte`, `Gt`, `Gte`, `Between` or `Matches` at a path; `op::Contains` and `op::ContainedBy` compare whole documents, and an accessor does not nest
36
36
= help: the following other types implement trait `Leaf`:
37
-
Between
38
-
Gt
39
-
Gte
40
-
Lt
41
-
Lte
37
+
stack_encrypt::op::Between
42
38
stack_encrypt::op::Eq
39
+
stack_encrypt::op::Gt
40
+
stack_encrypt::op::Gte
41
+
stack_encrypt::op::Lt
42
+
stack_encrypt::op::Lte
43
43
stack_encrypt::op::Matches<C>
44
44
= note: required for `AtPath<AtPath<stack_encrypt::op::Eq>>` to implement `Operator`
Copy file name to clipboardExpand all lines: packages/stack-encrypt/tests/ui/op_between_takes_a_pair.stderr
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ note: required by a bound in `plan::chain::<impl StackCipher<K>>::query`
22
22
| F<Q>: Input<Op::Arity>,
23
23
| ^^^^^^^^^^^^^^^^ required by this bound in `plan::chain::<impl StackCipher<K>>::query`
24
24
25
-
error[E0599]: the method `on` exists for struct `QueryBuilder<'_, Between, u32, FakeDataKeySource>`, but its trait bounds were not satisfied
25
+
error[E0599]: the method `on` exists for struct `QueryBuilder<'_, stack_encrypt::op::Between, u32, FakeDataKeySource>`, but its trait bounds were not satisfied
26
26
--> tests/ui/op_between_takes_a_pair.rs:12:47
27
27
|
28
28
12 | let _ = cipher.query(op::Between, &40u32).on(&age_plan);
@@ -39,7 +39,7 @@ error[E0271]: type mismatch resolving `<(u32, {integer}) as Input<One>>::Plainte
39
39
|
40
40
= note: expected type `u32`
41
41
found tuple `(u32, {integer})`
42
-
= note: required for `ValuePlan<u32, Indexed<stack_encrypt::Ore>>` to implement `Chooses<Lt, (u32, {integer}), Whole>`
42
+
= note: required for `ValuePlan<u32, Indexed<stack_encrypt::Ore>>` to implement `Chooses<stack_encrypt::op::Lt, (u32, {integer}), Whole>`
43
43
44
44
error[E0277]: `(u32, {integer})` is not ordered: the ordering operators are answered over the integer types only
45
45
--> tests/ui/op_between_takes_a_pair.rs:13:48
@@ -59,5 +59,5 @@ error[E0277]: `(u32, {integer})` is not ordered: the ordering operators are answ
59
59
u16
60
60
u32
61
61
and $N others
62
-
= note: required for `Lt` to implement `DefaultIndex<(u32, {integer})>`
63
-
= note: required for `ValuePlan<u32, Indexed<stack_encrypt::Ore>>` to implement `Chooses<Lt, (u32, {integer}), Whole>`
62
+
= note: required for `stack_encrypt::op::Lt` to implement `DefaultIndex<(u32, {integer})>`
63
+
= note: required for `ValuePlan<u32, Indexed<stack_encrypt::Ore>>` to implement `Chooses<stack_encrypt::op::Lt, (u32, {integer}), Whole>`
@@ -25,13 +25,13 @@ error[E0277]: `(&str, &str)` is not what a query of arity `Pathed<One>` takes
25
25
| required by a bound introduced by this call
26
26
|
27
27
= note: an operator of arity `One` takes one value, `op::Between` (arity `Pair`) takes a pair, `&(lo, hi)`, and `op::AtPath` (arity `Pathed`) takes no input yet: it arrives with the JSON index
28
-
help: the trait `Input<Pathed<One>>` is not implemented for `(&str, &str)`
28
+
help: the trait `Input<Pathed<stack_encrypt::op::One>>` is not implemented for `(&str, &str)`
29
29
but trait `Input<Pair>` is implemented for it
30
30
--> src/op/mod.rs
31
31
|
32
32
| impl<S: 'static> Input<Pair> for (S, S) {
33
33
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
-
= help: for that trait implementation, expected `Pair`, found `Pathed<One>`
34
+
= help: for that trait implementation, expected `Pair`, found `Pathed<stack_encrypt::op::One>`
35
35
note: required by a bound in `plan::chain::<impl StackCipher<K>>::query`
36
36
--> src/plan/chain.rs
37
37
|
@@ -51,4 +51,4 @@ error[E0599]: the method `on` exists for struct `QueryBuilder<'_, AtPath<stack_e
51
51
| |_________-^^
52
52
|
53
53
= note: the following trait bounds were not satisfied:
0 commit comments