With Power JSON PostgreSQL - EnterpriseDB
17 March 2021
Power JSON with PostgreSQL
Simon Riggs Postgres Fellow
Part 2: SQL/JSON and Schema Design
Example of Valid JSON
{ "oid": 521, "ots": "2021-01-16T15:52:14.70032+00:00", "price": 5.62, "descr": "Example of some text data", "boolfield": true, "tags": ["blue", "green", "red"], "addr": { "city": "New York", "state": "NY" }, "other": null
}
3
? Copyright EnterpriseDB Corporation, 2020. All rights reserved.
Advanced Search with SQL/JSON (jsonpath)
Simple SQL/JSON searches
-- Does the field "new" exist within the JSON SELECT jdoc FROM j WHERE jdoc @@
'exists($.new)'; -- not indexable
-- Does the field "new" have a value of "true" SELECT jdoc FROM j WHERE jdoc @@
'$.new == true'; -- indexable
-- Does array field "tags" contain "a" SELECT jdoc FROM j WHERE jdoc @@
'$.tags[*] == "a"'; -- indexable
-- Find rows where price between X and Y
SELECT jdoc FROM j WHERE jdoc @?
'$.price ? (@ > 11.08) ? (@ < 11.12)';
-- not indexable
5
? Copyright EnterpriseDB Corporation, 2020. All rights reserved.
? Comprehensive JSON Path language for searching within JSON documents
? $ is top-level ? .key is top level fieldname ? [*] means all in array
? ? adds a filter onto expression
? ==, , != etc.. ? == is indexable
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- cse 154 web programming fall 2017 homework 5 api
- jolt introduction
- avrstudio4 and atmega128 a beginner s guide
- metamap2016 usage notes
- fireeye and splunk intro to integration
- supervised and unsupervised approaches to the ontology
- the latest ibm z cobol compiler enterprise cobol v6 2
- 296 2013 efficient extraction of json information in sas
- with power json postgresql enterprisedb
- python data file hanling
Related searches
- calculator with power sign
- praying with power pdf
- using json with python
- working with json in python
- parse json with python
- working with json files in python
- parsing json data with python
- power automate json to excel
- parse json power automate
- power automate parse json generate from sample
- power automate parse json example
- sample power automate flow json array