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
Copy file name to clipboardExpand all lines: README.md
+56-46Lines changed: 56 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,7 @@
5
5
6
6
Encrypt Query Language (EQL) is a set of abstractions for transmitting, storing, and interacting with encrypted data and indexes in PostgreSQL.
7
7
8
-
> [!TIP]
9
-
> **New to EQL?** Start with the higher level helpers for EQL in [Python](https://github.com/cipherstash/eqlpy), [Go](https://github.com/cipherstash/goeql), or [JavaScript](https://github.com/cipherstash/jseql) and [TypeScript](https://github.com/cipherstash/jseql), or the [examples](#helper-packages-and-examples) for those languages.
8
+
> [!TIP] > **New to EQL?** Start with the higher level helpers for EQL in [Python](https://github.com/cipherstash/eqlpy), [Go](https://github.com/cipherstash/goeql), or [JavaScript](https://github.com/cipherstash/jseql) and [TypeScript](https://github.com/cipherstash/jseql), or the [examples](#helper-packages-and-examples) for those languages.
10
9
11
10
Store encrypted data alongside your existing data:
12
11
@@ -29,16 +28,15 @@ Store encrypted data alongside your existing data:
29
28
-[Inserting Data](#inserting-data)
30
29
-[Reading Data](#reading-data)
31
30
-[Configuring indexes for searching data](#configuring-indexes-for-searching-data)
32
-
-[Adding an index (`cs_add_index_v1`)](#adding-an-index-cs_add_index_v1)
31
+
-[Adding an index](#adding-an-index)
33
32
-[Searching data with EQL](#searching-data-with-eql)
**Note:** This function allows you to encrypt and decrypt data but does not enable searchable encryption. See [Querying Data with EQL](#querying-data-with-eql) for enabling searchable encryption.
99
+
**Note:** This function allows you to encrypt and decrypt data but does not enable searchable encryption. See [Searching data with EQL](#searching-data-with-eql) for enabling searchable encryption.
102
100
103
101
### Activating configuration
104
102
105
103
After modifying configurations, activate them by running:
106
104
107
105
```sql
108
-
SELECTcs_encrypt_v1();
109
-
SELECTcs_activate_v1();
106
+
SELECTeql_v1.encrypt();
107
+
SELECTeql_v1.activate();
110
108
```
111
109
112
110
**Important:** These functions must be run after any modifications to the configuration.
@@ -116,7 +114,7 @@ SELECT cs_activate_v1();
116
114
CipherStash Proxy refreshes the configuration every 60 seconds. To force an immediate refresh, run:
117
115
118
116
```sql
119
-
SELECTcs_refresh_encrypt_config();
117
+
SELECTeql_v1.reload_config();
120
118
```
121
119
122
120
> Note: This statement must be executed when connected to CipherStash Proxy.
@@ -191,13 +189,12 @@ In order to perform searchable operations on encrypted data, you must configure
191
189
> **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.
192
190
> This is due to the way CipherStash Proxy handles searchable encryption operations.
193
191
194
-
### Adding an index (`cs_add_index_v1`)
192
+
### Adding an index
195
193
196
-
Add an index to an encrypted column.
197
-
This function also behaves the same as `cs_add_column_v1` but with the additional index configuration.
194
+
Add an index to an encrypted column using the `eql_v1.add_index` function:
198
195
199
196
```sql
200
-
SELECTcs_add_index_v1(
197
+
SELECTeql_v1.add_index(
201
198
'table_name', -- Name of the table
202
199
'column_name', -- Name of the column
203
200
'index_name', -- Index kind ('unique', 'match', 'ore', 'ste_vec')
@@ -211,19 +208,19 @@ You can read more about the index configuration options [here](docs/reference/IN
211
208
**Example (Unique index):**
212
209
213
210
```sql
214
-
SELECTcs_add_index_v1(
211
+
SELECTeql_v1.add_index(
215
212
'users',
216
213
'encrypted_email',
217
214
'unique',
218
215
'text'
219
216
);
220
217
```
221
218
222
-
After adding an index, you have to activate the configuration.
219
+
After adding an index, you have to activate the configuration:
223
220
224
221
```sql
225
-
SELECTcs_encrypt_v1();
226
-
SELECTcs_activate_v1();
222
+
SELECTeql_v1.encrypt();
223
+
SELECTeql_v1.activate();
227
224
```
228
225
229
226
## Searching data with EQL
@@ -232,14 +229,14 @@ EQL provides specialized functions to interact with encrypted data, supporting o
232
229
233
230
In order to use the specialized functions, you must first configure the corresponding indexes.
234
231
235
-
### Equality search (`cs_unique_v1`)
232
+
### Equality search
236
233
237
-
Enable equality search on encrypted data.
234
+
Enable equality search on encrypted data using the `eql_v1.unique` function.
0 commit comments