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
EQL supports encrypting and decrypting JSONB objects.
339
-
We also support a wide range of JSONB functions and operators.
340
-
You can read more about the JSONB support in the [JSONB reference guide][#jsonb-reference].
342
+
EQL supports encrypting, decrypting, and searching JSON and JSONB objects.
341
343
342
-
## Data format
344
+
### Configuring the index
345
+
346
+
Similar to how you configure indexes for text data, you can configure indexes for JSON and JSONB data.
347
+
The only difference is that you need to specify the `cast_as` parameter as `json` or `jsonb`.
348
+
349
+
```sql
350
+
SELECT cs_add_index_v1(
351
+
'users',
352
+
'encrypted_json',
353
+
'ste_vec',
354
+
'jsonb',
355
+
'{"prefix": "users/encrypted_json"}'-- The prefix is in the form of "table/column"
356
+
);
357
+
```
358
+
359
+
You can read more about the index configuration options [here](https://github.com/cipherstash/encrypt-query-language/blob/main/docs/reference/INDEX.md).
360
+
361
+
### Inserting JSON data
362
+
363
+
When inserting JSON data, this works the same as inserting text data.
364
+
You need to wrap the JSON data in the appropriate EQL payload.
365
+
CipherStash Proxy will **encrypt** the data automatically.
366
+
367
+
**Example:**
368
+
369
+
Assuming you want to store the following JSON data:
We support a wide range of JSON/JSONB functions and operators.
432
+
You can read more about the JSONB support in the [JSONB reference guide](https://github.com/cipherstash/encrypt-query-language/blob/main/docs/reference/JSON.md).
433
+
434
+
## EQL payload data format
343
435
344
436
Encrypted data is stored as `jsonb` with a specific schema:
0 commit comments