Page 1 of 1

Is there hstore type support?

Posted: Wed 16 Dec 2020 19:47
by mbarsegyan
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.

Re: Is there hstore type support?

Posted: Fri 18 Dec 2020 17:12
by Shalex
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?

Posted: Wed 23 Dec 2020 18:14
by Shalex
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?

Re: Is there hstore type support?

Posted: Fri 25 Dec 2020 09:08
by mbarsegyan
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.

Re: Is there hstore type support?

Posted: Sat 20 Feb 2021 09:48
by nbestuzhev
Hi!
Is there are any updates on the topic?

Re: Is there hstore type support?

Posted: Thu 25 Feb 2021 17:40
by Shalex
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?

Re: Is there hstore type support?

Posted: Mon 01 Mar 2021 09:50
by nbestuzhev
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.

Re: Is there hstore type support?

Posted: Fri 12 Mar 2021 09:33
by Shalex
A timeframe for the hstore support in our EF Core implementation publicly is the 3d quarter of 2021.

Re: Is there hstore type support?

Posted: Thu 30 Sep 2021 12:40
by Shalex
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.

Re: Is there hstore type support?

Posted: Fri 24 Dec 2021 10:11
by nbestuzhev
Thank you very much! You helped us a lot.