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 8bb6585
Browse filesBrowse the repository at this point in the historyBrowse files
docs(golang): show the query methods, the database/sql query and the decrypt-and-verify step, and say se_query is gone
The README and the package documentation describe one method per
operator, what each returns, why a matches query carries Verify and
TargetLimit and an exact one neither, and that a MatchQuery holds its text
because Go cannot wipe a string. The ADR-0007 amendment records
se_operators, the removal of se_query, and the one reason se_term stays.
Part of #1189
@@ -123,7 +123,11 @@ For `-type User`, the file `user_stash.go` holds:
123
123
-`Encrypt` and `Decrypt`, which take a slice and return a slice, and send one ZeroKMS request for each 500 sealed values in it, plus one the first time a keyset is used.
124
124
-`Fields`, with one entry for each sealed field.
125
125
An opaque struct, or a struct with no sealed field outside an opaque one, gets no `Fields`: nothing in it is sealed on its own, so nothing can be queried.
126
-
An entry encrypts one value, and it has a query method only for what the field declares: `Query` for `encrypt_into`, and `Equality`, `Match`, `Ore` or `Ope` for `index=`.
126
+
An entry encrypts one value, and has one query method for each operator the engine answers on the field: `Eq`, `Lt`, `Lte`, `Gt`, `Gte`, `Between` or `Matches`.
127
+
stashgen asks the embedded engine which operators each field answers, and which index answers each one, so it holds no copy of those rules: an equality index answers `Eq`, a match index on a string `Matches`, and an ORE or OPE index on an integer the four orderings and `Between`, through ORE when the field declares both.
128
+
`encrypt_into=TextEq` answers `Eq`, which returns the type's query value, `eql.TextEqQuery`.
129
+
The query of `Matches` carries `Verify` and `TargetLimit`, because its answer can hold rows that do not match; an exact operator's query carries neither.
130
+
See the encrypt package's README for each method's result and the query with `database/sql`.
127
131
-`String` and `LogValue` on `EncryptedUser`, which print the passthrough fields and hide the sealed ones.
128
132
- A copy of the fields of `User`, so a change to them stops the build.
0 commit comments