Commit bd046bd
committed
do not encrypt in values
Take the following example
```
ActiveRecord::Encryption.config.support_unencrypted_data = true
EncryptedBook.find_by(name: "Dune")
```
Before:
```
EXEC sp_executesql N'SELECT [encrypted_books].* FROM [encrypted_books]
WHERE [encrypted_books].[name] IN (@0, @1) ORDER BY [encrypted_books].[id] ASC
OFFSET 0 ROWS FETCH NEXT @2 ROWS ONLY', N'@0 nvarchar(max), @1 nvarchar(max), @2 int',
@0 =
N'{"p":"BbyqDSWICbMEBTtrN4iv0paan00brX1ly6wT92lFrgOQZomP5jBjhPlalbTvucTFX249bJHp7j6usa7SBpAuQFzN+sZFa3dMnlTcaei5","h":{"iv":"2esXR4qnvSteG+o7","at":"pXZzi+SpMNxpAvA8eQYVqA=="}}',
@1 =
N'{"p":"DIohhw==","h":{"iv":"wEPaDcJP3VNIxaiz","at":"X7+2xvvcu1k1if6Dy28Esw=="}}',
@2 = 1 [["name", nil], ["name", nil], ["LIMIT", nil]]
```
After:
```
EXEC sp_executesql N'SELECT [encrypted_books].* FROM [encrypted_books]
WHERE [encrypted_books].[name] IN (@0, @1) ORDER BY [encrypted_books].[id] ASC
OFFSET 0 ROWS FETCH NEXT @2 ROWS ONLY', N'@0 nvarchar(max), @1nvarchar(max), @2 int',
@0 =
N'{"p":"DIohhw==","h":{"iv":"wEPaDcJP3VNIxaiz","at":"X7+2xvvcu1k1if6Dy28Esw=="}}',
@1 = N'Dune',
@2 = 1 [["name", nil], ["name", nil], ["LIMIT", nil]]
```1 parent f5fc1c4 commit bd046bd
2 files changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
0 commit comments