Is there hstore type support?
-
- Posts: 2
- Joined: Wed 16 Dec 2020 19:33
Is there hstore type support?
Hi, we are licensed users of dotConnect for PostgreSQL. Some time ago we faced the issue that some of PostgreSQL issues like JSON functions were not supported by the dotConnect driver, and we do appreciate that now they have become available.
Is there any ability to map the hstore type to Dictionary using Entity Framework, and is there any option for us to use PostgreSQL functions for hstore? According to the release notes, it is supported since dotConnect for PostgreSQL 7.8, but declaring an entity's property of type Dictionary, with attribute [Column(Type="hstore")] gives an error. If it is supported, could you please point us to the documentation of the feature for Entity Framework Core? Thanks.
Is there any ability to map the hstore type to Dictionary using Entity Framework, and is there any option for us to use PostgreSQL functions for hstore? According to the release notes, it is supported since dotConnect for PostgreSQL 7.8, but declaring an entity's property of type Dictionary, with attribute [Column(Type="hstore")] gives an error. If it is supported, could you please point us to the documentation of the feature for Entity Framework Core? Thanks.
Re: Is there hstore type support?
The hstore data type is currently not supported in our EF Core implementation. We will investigate the question and notify you about the result.
Re: Is there hstore type support?
Could you please describe the feature implementation you need?
For example:
* .NET data types of the property mapped to the hstore column
* what functionality of LINQ queries is required to be translated to SQL queries on the database side?
For example:
* .NET data types of the property mapped to the hstore column
* what functionality of LINQ queries is required to be translated to SQL queries on the database side?
-
- Posts: 2
- Joined: Wed 16 Dec 2020 19:33
Re: Is there hstore type support?
Initially, we wondered if hstore can be properly & automatically mapped to Dictionary<string, string> and vice versa. Now, we read hstore fields as a string and do the parsing on our own.
From the other hand, we need to be able to partially update those fields. Now we have to use raw SQL for such operations as:
- 'a=>b,c=>d'::hstore || 'e=>f' (adding a record or updating the existing one by key) - not sure if it can be done with Linq, most likely with the whole entity update only;
- Read the value for a particular key - it would be also nice to select from hstore to make a subquery.
From the other hand, we need to be able to partially update those fields. Now we have to use raw SQL for such operations as:
- 'a=>b,c=>d'::hstore || 'e=>f' (adding a record or updating the existing one by key) - not sure if it can be done with Linq, most likely with the whole entity update only;
- Read the value for a particular key - it would be also nice to select from hstore to make a subquery.
-
- Posts: 3
- Joined: Sat 20 Feb 2021 09:45
Re: Is there hstore type support?
Hi!
Is there are any updates on the topic?
Is there are any updates on the topic?
Re: Is there hstore type support?
1. We are going to implement the feature this year. Could you tell us a timeframe suitable for you?
2. Are you interested in getting the functionality with the internal build while its final public release will take place much later?
2. Are you interested in getting the functionality with the internal build while its final public release will take place much later?
-
- Posts: 3
- Joined: Sat 20 Feb 2021 09:45
Re: Is there hstore type support?
Great news!
1. We don't have any timeframes now. Sooner is better for us, cause we needed it 'Yesterday' :)
2. We will wait until you released it publicly.
1. We don't have any timeframes now. Sooner is better for us, cause we needed it 'Yesterday' :)
2. We will wait until you released it publicly.
Re: Is there hstore type support?
A timeframe for the hstore support in our EF Core implementation publicly is the 3d quarter of 2021.
Re: Is there hstore type support?
Mapping of the PostgreSQL HSTORE data type to Dictionary, SortedDictionary, ImmutableDictionary, ImmutableSortedDictionary is supported in EF Core 3 and EF Core 5.
Refer to viewtopic.php?f=3&t=48312.
Refer to viewtopic.php?f=3&t=48312.
-
- Posts: 3
- Joined: Sat 20 Feb 2021 09:45
Re: Is there hstore type support?
Thank you very much! You helped us a lot.