@@ -114,8 +114,8 @@ CipherStash Proxy refreshes the configuration every 60 seconds. To force an imme
114
114
SELECT cs_refresh_encrypt_config();
115
115
```
116
116
117
- > Note: This statement must be executed when connected to CipherStash Proxy.
118
- When connected to the database directly, it is a no-op.
117
+ > Note: This statement must be executed when connected to CipherStash Proxy.
118
+ > When connected to the database directly, it is a no-op.
119
119
120
120
## Storing data
121
121
@@ -177,14 +177,14 @@ Data is returned as:
177
177
}
178
178
```
179
179
180
- > Note: If you execute this query directly on the database, you will not see any plaintext data but rather the ` jsonb ` payload with the ciphertext.
180
+ > Note: If you execute this query directly on the database, you will not see any plaintext data but rather the ` jsonb ` payload with the ciphertext.
181
181
182
182
## Configuring indexes for searching data
183
183
184
184
In order to perform searchable operations on encrypted data, you must configure indexes for the encrypted columns.
185
185
186
186
> ** IMPORTANT:** If you have existing data that's encrypted and you add or modify an index, all the data will need to be re-encrypted.
187
- This is due to the way CipherStash Proxy handles searchable encryption operations.
187
+ > This is due to the way CipherStash Proxy handles searchable encryption operations.
188
188
189
189
### Adding an index (` cs_add_index_v1 ` )
190
190
@@ -207,9 +207,9 @@ You can read more about the index configuration options [here][https://github.co
207
207
208
208
``` sql
209
209
SELECT cs_add_index_v1(
210
- ' users' ,
211
- ' encrypted_email' ,
212
- ' unique' ,
210
+ ' users' ,
211
+ ' encrypted_email' ,
212
+ ' unique' ,
213
213
' text'
214
214
);
215
215
```
@@ -235,9 +235,9 @@ Enable equality search on encrypted data.
235
235
236
236
``` sql
237
237
SELECT cs_add_index_v1(
238
- ' users' ,
239
- ' encrypted_email' ,
240
- ' unique' ,
238
+ ' users' ,
239
+ ' encrypted_email' ,
240
+ ' unique' ,
241
241
' text'
242
242
);
243
243
```
@@ -265,10 +265,10 @@ Enables basic full-text search on encrypted data.
265
265
266
266
``` sql
267
267
SELECT cs_add_index_v1(
268
- ' users' ,
269
- ' encrypted_email' ,
270
- ' match' ,
271
- ' text' ,
268
+ ' users' ,
269
+ ' encrypted_email' ,
270
+ ' match' ,
271
+ ' text' ,
272
272
' {"token_filters": [{"kind": "downcase"}], "tokenizer": { "kind": "ngram", "token_length": 3 }}'
273
273
);
274
274
```
@@ -348,8 +348,8 @@ The only difference is that you need to specify the `cast_as` parameter as `json
348
348
349
349
``` sql
350
350
SELECT cs_add_index_v1(
351
- ' users' ,
352
- ' encrypted_json' ,
351
+ ' users' ,
352
+ ' encrypted_json' ,
353
353
' ste_vec' ,
354
354
' jsonb' ,
355
355
' {"prefix": "users/encrypted_json"}' -- The prefix is in the form of "table/column"
@@ -360,7 +360,7 @@ You can read more about the index configuration options [here](https://github.co
360
360
361
361
### Inserting JSON data
362
362
363
- When inserting JSON data, this works the same as inserting text data.
363
+ When inserting JSON data, this works the same as inserting text data.
364
364
You need to wrap the JSON data in the appropriate EQL payload.
365
365
CipherStash Proxy will ** encrypt** the data automatically.
366
366
@@ -372,7 +372,7 @@ Assuming you want to store the following JSON data:
372
372
{
373
373
"name" : " John Doe" ,
374
374
"metadata" : {
375
- "age" : 42 ,
375
+ "age" : 42
376
376
}
377
377
}
378
378
```
@@ -487,7 +487,7 @@ CipherStash Proxy handles the encoding, and EQL provides the functions.
487
487
488
488
### How do I integrate CipherStash EQL with my application?
489
489
490
- Use CipherStash Proxy to intercept database queries and handle encryption and decryption automatically.
490
+ Use CipherStash Proxy to intercept database queries and handle encryption and decryption automatically.
491
491
The proxy interacts with the database using the EQL functions and types defined in this documentation.
492
492
493
493
Use the [ helper packages] ( #helper-packages ) to integate EQL functions into your application.
@@ -505,8 +505,12 @@ Encryption and decryption are handled by CipherStash Proxy.
505
505
506
506
We've created a few langague specific packages to help you interact with the payloads:
507
507
508
- - ** JavaScript/TypeScript** : [ @cipherstash/eql ] ( https://github.com/cipherstash/encrypt-query-language/tree/main/languages/javascript/packages/eql )
509
- - ** Go** : [ github.com/cipherstash/goeql] ( https://github.com/cipherstash/goeql )
508
+ | Language | ORM | Example | Package |
509
+ | ---------- | ----------- | ----------------------------------------------------------------- | ---------------------------------------------------------------- |
510
+ | Go | Xorm | [ Go/Xorm examples] ( ./languages/go/xorm/README.md ) | [ goeql] ( https://github.com/cipherstash/goeql ) |
511
+ | Typescript | Drizzle | [ Drizzle examples] ( ./languages/javascript/apps/drizzle/README.md ) | [ cipherstash/eql] ( ./languages/javascript/packages/eql/README.md ) |
512
+ | Typescript | Prisma | [ Prisma examples] ( ./languages/javascript/apps/prisma/README.md ) | [ cipherstash/eql] ( ./languages/javascript/packages/eql/README.md ) |
513
+ | Python | SQL Alchemy | [ Python examples] ( ./languages/python/jupyter_notebook/README.md ) | |
510
514
511
515
## Releasing
512
516
0 commit comments