@@ -161,7 +161,7 @@ In your `psql` connection to Proxy:
161161docker compose exec proxy psql postgres://cipherstash:3ncryp7@localhost:6432/cipherstash
162162```
163163
164- Insert more records via Proxy, and search by salary :
164+ Insert more records via Proxy, and query by email :
165165
166166``` sql
167167INSERT INTO users (encrypted_email, encrypted_dob, encrypted_salary) VALUES (' bob@cipherstash.com' , ' 1991-03-06' , ' 10' );
@@ -175,13 +175,24 @@ In the `SELECT` statement, the `encrypted_salary` value is transparently encrypt
175175In the ` SELECT ` statement, the ` <= ` comparison operation in the ` WHERE ` clause is evaluated against ** encrypted** data.
176176In the ` SELECT ` statement, the ` SELECT ` returns ` alice ` and ` bob ` , but not ` carol ` .
177177
178+ Query ` users ` by email:
179+
180+ ``` sql
181+ SELECT encrypted_email, encrypted_dob, encrypted_salary FROM users WHERE encrypted_email LIKE ' alice' ;
182+ ```
183+
184+ The literal string ` alice ` is transparently encrypted by Proxy, and compared in the database against the stored encrypted date value.
185+ The ` LIKE ` comparison operation is evaluated against ** encrypted** data.
186+ The ` SELECT ` will only return ` alice ` .
187+
188+
178189Finally, query ` users ` by date:
179190
180191``` sql
181192SELECT encrypted_email, encrypted_dob, encrypted_salary FROM users WHERE encrypted_dob > ' 2000-01-01' ;
182193```
183194
184- The ` encrypted_dob ` value is transparently encrypted by Proxy, and compared in the database against the stored encrypted date value.
195+ The literal date ` 2000-01-01 ` is transparently encrypted by Proxy, and compared in the database against the stored encrypted date value.
185196The ` > ` comparison operation is evaluated against ** encrypted** data.
186197The ` SELECT ` will only return ` carol ` .
187198
0 commit comments