Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for PostgreSQL 12 jsonpath #1045

Closed
roji opened this issue Sep 25, 2019 · 6 comments
Closed

Support for PostgreSQL 12 jsonpath #1045

roji opened this issue Sep 25, 2019 · 6 comments
Labels
duplicate This issue or pull request already exists

Comments

@roji
Copy link
Member

roji commented Sep 25, 2019

See https://paquier.xyz/postgresql-2/postgres-12-jsonpath

See upcoming jsonpath support in System.Text.Json: dotnet/runtime#31068

@roji roji added the enhancement New feature or request label Sep 25, 2019
@roji roji added this to the 3.1.0 milestone Sep 25, 2019
@roji roji self-assigned this Sep 25, 2019
@roji roji modified the milestones: 3.1.0, 5.0.0 Nov 4, 2019
@zakeryooo
Copy link

@roji can I ask if this is still potentially planned for 5.0? Is this one of the features that would need to be implemented to query inside jsonb arrays? i.e:

[Column(TypeName = "jsonb")]
public List<AnotherClass> Examples { get; set; }

ctx.Items.Where(i => i.Examples.Any(e => e.Capacity >  100))

I'm building something that will need to search inside quite a large number of jsonb lists so just wondering if this feature is on the horizon or if I should go down the less ideal route of splitting each list into their own table and using normal joins to query the data instead. Thanks!

@roji
Copy link
Member Author

roji commented Aug 3, 2020

@zakeryooo there are many translation possibilities with jsonpath, so this could up a pretty big task done incrementally, over several releases. Given where we are and all the other work, I wouldn't depend on jsonpath being implemented for 5.0.

However, you shouldn't hesitate to use EF Core's raw SQL capability to express jsonpath queries yourself, and possibly compose additional SQL operations over that (plus EF Core will materialize your queries). This can be a very effective way to get the exact results you want, and when jsonpath support comes along you can replace those raw queries.

@roji
Copy link
Member Author

roji commented Jul 16, 2021

Punting this to work in v7 along with the rest of the JSON support in EF.

@roji roji modified the milestones: 6.0.0, 7.0.0 Jul 16, 2021
@atrauzzi
Copy link

atrauzzi commented Sep 29, 2021

Just chiming in to note that any search capabilities would be awesome if they also had some way to present jsonpath support as well as embedded expression checks.

Things like where json_column @@ '$.*.*.id !== null and similar. Especially where any functionality would be able to leverage GIN indexes.

@roji
Copy link
Member Author

roji commented Sep 29, 2021

Yeah. Some jsonpath improvements are likely coming to System.Text.Json in 7.0, hopefully we can map those APIs to PostgreSQL jsonpath queries. Otherwise we can roll our own custom APIs for translation, though that would be less nice.

@roji
Copy link
Member Author

roji commented Mar 1, 2023

Duplicate of #2570

@roji roji marked this as a duplicate of #2570 Mar 1, 2023
@roji roji closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2023
@roji roji added the duplicate This issue or pull request already exists label Mar 1, 2023
@roji roji removed this from the 8.0.0 milestone Mar 1, 2023
@roji roji removed their assignment Mar 1, 2023
@roji roji removed the enhancement New feature or request label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants