question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for querying JSON data info

See original GitHub issue

Issue type:

[ ] question [ ] bug report [x] feature request [ ] documentation issue

Database system/driver:

[ ] cordova [ ] mongodb [x] mssql [x] mysql / mariadb [ ] oracle [x] postgres [ ] sqlite [ ] sqljs [ ] react-native

TypeORM version:

[x] latest [ ] @next [ ] 0.x.x (or put your version here)

It would be nice to be able to have a single API to be able to query information from a property in the JSON data stored in a mysql / mariadb / postgres database, as they all seem to have their own APIs.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:43
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

96reactions
mudkipmecommented, Sep 12, 2018

I store various JSONB data in Postgres. It would be nice to use

const user = await getRepository(User).findOne({
  profile: {
    id: profile.id,
    provider: profile.provider,
  },
});

Instead of:

const user = await getRepository(User).createQueryBuilder()
  .where('profile @> :profile', {
    profile: {
      id: profile.id,
      provider: profile.provider,
    },
  }).getOne();
13reactions
gostrikshcommented, Oct 14, 2020

Hi, any update on this thread? 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Work with JSON data - SQL Server - Microsoft Learn
To query JSON data, you can use standard T-SQL. If you must create a query or report on JSON data, you can easily...
Read more >
Querying JSON - Amazon Athena
Amazon Athena lets you parse JSON-encoded values, extract data from JSON, search for values, and find length and size of JSON arrays.
Read more >
Working with Postgres JSON Query | Made Easy - Learn | Hevo
This article will help you discover several operators and functions to query JSON data in PostgreSQL, as well as how to work out...
Read more >
How to Query a JSON Object in SQL Server - PopSQL
SQL Server has supported querying JSON columns since the version launched in 2016. This gives the advantage of storing and querying unstructured data....
Read more >
Is there a query language for JSON? - Stack Overflow
Lovefield is a relational query engine written in pure JavaScript. It also provides help with persisting data on the browser side, e.g. using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found