@@ -70,7 +70,7 @@ The EQL payload would be:
70
70
71
71
``` sql
72
72
INSERT INTO users (encrypted_json) VALUES (
73
- ' {"v":1 ,"k":"pt","p":"{\" name\" :\" John Doe\" ,\" metadata\" :{\" age\" :42}}","i":{"t":"users","c":"encrypted_json"}}'
73
+ ' {"v":2 ,"k":"pt","p":"{\" name\" :\" John Doe\" ,\" metadata\" :{\" age\" :42}}","i":{"t":"users","c":"encrypted_json"}}'
74
74
);
75
75
```
76
76
@@ -83,7 +83,7 @@ Data is stored in the database as:
83
83
"t" : " users"
84
84
},
85
85
"k" : " sv" ,
86
- "v" : 1 ,
86
+ "v" : 2 ,
87
87
"sv" : [[" ciphertext" ]]
88
88
}
89
89
```
@@ -108,7 +108,7 @@ Data is returned as:
108
108
"t" : " users" ,
109
109
"c" : " encrypted_json"
110
110
},
111
- "v" : 1 ,
111
+ "v" : 2 ,
112
112
"q" : null
113
113
}
114
114
```
@@ -141,7 +141,7 @@ We can query records that contain a specific structure.
141
141
SELECT * FROM examples
142
142
WHERE cs_ste_vec_v2(encrypted_json) @> cs_ste_vec_v2(
143
143
' {
144
- "v":1 ,
144
+ "v":2 ,
145
145
"k":"pt",
146
146
"p":{"top":{"nested":["a"]}},
147
147
"i":{"t":"examples","c":"encrypted_json"},
@@ -169,7 +169,7 @@ If we query for a value that does not exist in the data:
169
169
SELECT * FROM examples
170
170
WHERE cs_ste_vec_v2(encrypted_json) @> cs_ste_vec_v2(
171
171
' {
172
- "v":1 ,
172
+ "v":2 ,
173
173
"k":"pt",
174
174
"p":{"top":{"nested":["d"]}},
175
175
"i":{"t":"examples","c":"encrypted_json"},
@@ -203,7 +203,7 @@ We can extract the value of the `"top"` key.
203
203
``` sql
204
204
SELECT cs_ste_vec_value_v2(encrypted_json,
205
205
' {
206
- "v":1 ,
206
+ "v":2 ,
207
207
"k":"pt",
208
208
"p":"$.top",
209
209
"i":{"t":"examples","c":"encrypted_json"},
@@ -250,15 +250,15 @@ We can query records where the `"num"` field is greater than `2`.
250
250
SELECT * FROM examples
251
251
WHERE cs_ste_vec_term_v2(encrypted_json,
252
252
' {
253
- "v":1 ,
253
+ "v":2 ,
254
254
"k":"pt",
255
255
"p":"$.num",
256
256
"i":{"t":"examples","c":"encrypted_json"},
257
257
"q":"ejson_path"
258
258
}'
259
259
) > cs_ste_vec_term_v2(
260
260
' {
261
- "v":1 ,
261
+ "v":2 ,
262
262
"k":"pt",
263
263
"p":"2",
264
264
"i":{"t":"examples","c":"encrypted_json"},
@@ -298,7 +298,7 @@ We can group the data by the `"color"` field and count occurrences.
298
298
``` sql
299
299
SELECT cs_grouped_value_v2(cs_ste_vec_value_v2(encrypted_json,
300
300
' {
301
- "v":1 ,
301
+ "v":2 ,
302
302
"k":"pt",
303
303
"p":"$.color",
304
304
"i":{"t":"examples","c":"encrypted_json"},
@@ -308,7 +308,7 @@ SELECT cs_grouped_value_v2(cs_ste_vec_value_v2(encrypted_json,
308
308
FROM examples
309
309
GROUP BY cs_ste_vec_term_v2(encrypted_json,
310
310
' {
311
- "v":1 ,
311
+ "v":2 ,
312
312
"k":"pt",
313
313
"p":"$.color",
314
314
"i":{"t":"examples","c":"encrypted_json"},
@@ -408,7 +408,7 @@ SELECT cs_ste_vec_value_v2(encrypted_json, $1) FROM examples;
408
408
" t" : " examples" ,
409
409
" c" : " encrypted_json"
410
410
},
411
- " v" : 1 ,
411
+ " v" : 2 ,
412
412
" q" : " ejson_path"
413
413
}
414
414
```
@@ -436,7 +436,7 @@ WHERE cs_ste_vec_term_v2(examples.encrypted_json, $1) > cs_ste_vec_term_v2($2)
436
436
" t" : " examples" ,
437
437
" c" : " encrypted_json"
438
438
},
439
- " v" : 1 ,
439
+ " v" : 2 ,
440
440
" q" : " ejson_path"
441
441
}
442
442
@@ -448,7 +448,7 @@ WHERE cs_ste_vec_term_v2(examples.encrypted_json, $1) > cs_ste_vec_term_v2($2)
448
448
" t" : " examples" ,
449
449
" c" : " encrypted_json"
450
450
},
451
- " v" : 1 ,
451
+ " v" : 2 ,
452
452
" q" : " ste_vec"
453
453
}
454
454
```
@@ -495,7 +495,7 @@ With the params:
495
495
" t" : " examples" ,
496
496
" c" : " encrypted_json"
497
497
},
498
- " v" : 1 ,
498
+ " v" : 2 ,
499
499
" q" : " ejson_path"
500
500
}
501
501
```
@@ -511,7 +511,7 @@ Would return the EQL plaintext payload with an array (`[1, 2, 3]` for example):
511
511
" t" : " examples" ,
512
512
" c" : " encrypted_json"
513
513
},
514
- " v" : 1 ,
514
+ " v" : 2 ,
515
515
" q" : null
516
516
}
517
517
```
@@ -547,7 +547,7 @@ WHERE (cs_ste_vec_terms_v2(examples.encrypted_json, $1))[1] > cs_ste_vec_term_v2
547
547
" t" : " examples" ,
548
548
" c" : " encrypted_json"
549
549
},
550
- " v" : 1 ,
550
+ " v" : 2 ,
551
551
" q" : " ejson_path"
552
552
}
553
553
@@ -559,7 +559,7 @@ WHERE (cs_ste_vec_terms_v2(examples.encrypted_json, $1))[1] > cs_ste_vec_term_v2
559
559
" t" : " examples" ,
560
560
" c" : " encrypted_json"
561
561
},
562
- " v" : 1 ,
562
+ " v" : 2 ,
563
563
" q" : " ste_vec"
564
564
}
565
565
```
@@ -607,7 +607,7 @@ SELECT cs_ste_vec_value_v2(encrypted_json, $1) FROM examples;
607
607
" t" : " examples" ,
608
608
" c" : " encrypted_json"
609
609
},
610
- " v" : 1 ,
610
+ " v" : 2 ,
611
611
" q" : " ejson_path"
612
612
}
613
613
```
@@ -637,7 +637,7 @@ WHERE cs_ste_vec_term_v2(examples.encrypted_json, $1) > cs_ste_vec_term_v2($2)
637
637
" t" : " examples" ,
638
638
" c" : " encrypted_json"
639
639
},
640
- " v" : 1 ,
640
+ " v" : 2 ,
641
641
" q" : " ejson_path"
642
642
}
643
643
@@ -649,7 +649,7 @@ WHERE cs_ste_vec_term_v2(examples.encrypted_json, $1) > cs_ste_vec_term_v2($2)
649
649
" t" : " examples" ,
650
650
" c" : " encrypted_json"
651
651
},
652
- " v" : 1 ,
652
+ " v" : 2 ,
653
653
" q" : " ste_vec"
654
654
}
655
655
```
@@ -700,7 +700,7 @@ Example params:
700
700
" t" : " examples" ,
701
701
" c" : " encrypted_json"
702
702
},
703
- " v" : 1 ,
703
+ " v" : 2 ,
704
704
" q" : " ste_vec"
705
705
}
706
706
```
@@ -755,7 +755,7 @@ With the params:
755
755
" t" : " examples" ,
756
756
" c" : " encrypted_json"
757
757
},
758
- " v" : 1 ,
758
+ " v" : 2 ,
759
759
" q" : " ejson_path"
760
760
}
761
761
```
@@ -771,7 +771,7 @@ Would return the EQL plaintext payload with an array (`[1, 2, 3]` for example):
771
771
" t" : " examples" ,
772
772
" c" : " encrypted_json"
773
773
},
774
- " v" : 1 ,
774
+ " v" : 2 ,
775
775
" q" : null
776
776
}
777
777
```
@@ -808,7 +808,7 @@ WHERE EXISTS (
808
808
" t" : " examples" ,
809
809
" c" : " encrypted_json"
810
810
},
811
- " v" : 1 ,
811
+ " v" : 2 ,
812
812
" q" : " ejson_path"
813
813
}
814
814
@@ -820,7 +820,7 @@ WHERE EXISTS (
820
820
" t" : " examples" ,
821
821
" c" : " encrypted_json"
822
822
},
823
- " v" : 1 ,
823
+ " v" : 2 ,
824
824
" q" : " ste_vec"
825
825
}
826
826
```
@@ -874,7 +874,7 @@ Example data and params:
874
874
" t" : " examples" ,
875
875
" c" : " encrypted_json"
876
876
},
877
- " v" : 1 ,
877
+ " v" : 2 ,
878
878
" q" : " ejson_path"
879
879
}
880
880
```
0 commit comments