1
1
# Native PostgreSQL JSON(B) Compared to EQL
2
2
3
- EQL supports a subset of functionality supported by the native PostgreSQL JSON(B) functions and operators.
3
+ EQL supports a subset of functionality supported by the native PostgreSQL JSON(B) functions and operators.
4
4
The following examples compare native PostgreSQL JSON(B) functions and operators to the related functionality in EQL.
5
5
6
6
## ` json ->> text ` → ` text ` and ` json -> text ` → ` jsonb ` /` json `
@@ -17,7 +17,7 @@ SELECT plaintext_jsonb->>'field_a' FROM examples;
17
17
18
18
### EQL
19
19
20
- EQL JSONB functions accept an eJSONPath as an argument (instead of using ` -> ` /` ->> ` ) for lookups.
20
+ EQL JSONB functions accept an [ eJSONPath] ( ./JSON.md ) as an argument (instead of using ` -> ` /` ->> ` ) for lookups.
21
21
22
22
#### Decryption example
23
23
@@ -100,7 +100,7 @@ SELECT plaintext_jsonb->>0 FROM examples;
100
100
101
101
### EQL
102
102
103
- EQL JSONB functions accept an eJSONPath as an argument (instead of using ` -> ` /` ->> ` ) for lookups.
103
+ EQL JSONB functions accept an [ eJSONPath] ( ./JSON.md ) as an argument (instead of using ` -> ` /` ->> ` ) for lookups.
104
104
105
105
#### Decryption example
106
106
@@ -211,9 +211,9 @@ SELECT plaintext_jsonb#>>'{field_a,field_b}' FROM examples;
211
211
212
212
### EQL
213
213
214
- EQL JSONB functions accept an eJSONPath as an argument (instead of using ` #> ` /` #>> ` ) for lookups.
214
+ EQL JSONB functions accept an [ eJSONPath] ( ./JSON.md ) as an argument (instead of using ` #> ` /` #>> ` ) for lookups.
215
215
216
- Note that these are similar to the examples for ` -> ` /` ->> ` .
216
+ Note that these are similar to the examples for ` -> ` /` ->> ` .
217
217
The difference in these examples is that the path does a lookup multiple levels deep.
218
218
219
219
#### Decryption example
@@ -411,7 +411,7 @@ Would return the EQL plaintext payload with an array (`[1, 2, 3]` for example):
411
411
412
412
#### Comparison example
413
413
414
- ` cs_ste_vec_terms_v1 ` (note that terms is plural) can be used to return an array of ORE terms for comparison.
414
+ ` cs_ste_vec_terms_v1 ` (note that terms is plural) can be used to return an array of ORE terms for comparison.
415
415
The array can be ` unnest ` ed to work with a ` SETOF ` ORE terms for comparison.
416
416
417
417
The eJSONPath used with ` cs_ste_vec_terms_v1 ` needs to end with ` [*] ` (` $.some_array_field[*] ` for example).
0 commit comments