Skip to content

Commit 22f6ae5

Browse files
authored
Merge pull request #66 from cipherstash/chore/improve-readme-examples-v2
Update getting started tutorial
2 parents 06a4529 + 8451f53 commit 22f6ae5

File tree

9 files changed

+521
-116
lines changed

9 files changed

+521
-116
lines changed

README.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ CipherStash Proxy refreshes the configuration every 60 seconds. To force an imme
114114
SELECT cs_refresh_encrypt_config();
115115
```
116116

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.
119119
120120
## Storing data
121121

@@ -177,14 +177,14 @@ Data is returned as:
177177
}
178178
```
179179

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.
181181
182182
## Configuring indexes for searching data
183183

184184
In order to perform searchable operations on encrypted data, you must configure indexes for the encrypted columns.
185185

186186
> **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.
188188
189189
### Adding an index (`cs_add_index_v1`)
190190

@@ -207,9 +207,9 @@ You can read more about the index configuration options [here][https://github.co
207207

208208
```sql
209209
SELECT cs_add_index_v1(
210-
'users',
211-
'encrypted_email',
212-
'unique',
210+
'users',
211+
'encrypted_email',
212+
'unique',
213213
'text'
214214
);
215215
```
@@ -235,9 +235,9 @@ Enable equality search on encrypted data.
235235

236236
```sql
237237
SELECT cs_add_index_v1(
238-
'users',
239-
'encrypted_email',
240-
'unique',
238+
'users',
239+
'encrypted_email',
240+
'unique',
241241
'text'
242242
);
243243
```
@@ -265,10 +265,10 @@ Enables basic full-text search on encrypted data.
265265

266266
```sql
267267
SELECT cs_add_index_v1(
268-
'users',
269-
'encrypted_email',
270-
'match',
271-
'text',
268+
'users',
269+
'encrypted_email',
270+
'match',
271+
'text',
272272
'{"token_filters": [{"kind": "downcase"}], "tokenizer": { "kind": "ngram", "token_length": 3 }}'
273273
);
274274
```
@@ -348,8 +348,8 @@ The only difference is that you need to specify the `cast_as` parameter as `json
348348

349349
```sql
350350
SELECT cs_add_index_v1(
351-
'users',
352-
'encrypted_json',
351+
'users',
352+
'encrypted_json',
353353
'ste_vec',
354354
'jsonb',
355355
'{"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
360360

361361
### Inserting JSON data
362362

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.
364364
You need to wrap the JSON data in the appropriate EQL payload.
365365
CipherStash Proxy will **encrypt** the data automatically.
366366

@@ -372,7 +372,7 @@ Assuming you want to store the following JSON data:
372372
{
373373
"name": "John Doe",
374374
"metadata": {
375-
"age": 42,
375+
"age": 42
376376
}
377377
}
378378
```
@@ -487,7 +487,7 @@ CipherStash Proxy handles the encoding, and EQL provides the functions.
487487

488488
### How do I integrate CipherStash EQL with my application?
489489

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.
491491
The proxy interacts with the database using the EQL functions and types defined in this documentation.
492492

493493
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.
505505

506506
We've created a few langague specific packages to help you interact with the payloads:
507507

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) | |
510514

511515
## Releasing
512516

0 commit comments

Comments
 (0)