Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

PostgreSql Jsonb datatype #399

Open
durlandd opened this issue Jul 8, 2015 · 5 comments
Open

PostgreSql Jsonb datatype #399

durlandd opened this issue Jul 8, 2015 · 5 comments

Comments

@durlandd
Copy link

durlandd commented Jul 8, 2015

Digging through the code I don't find any facility to map PostgreSql's Jsonb datatype or any other custom datatype. The TypeConverter facility is not help in this situation as PostgreSql expects a parameter with the NpgsqlDbType.Jsonb datatype. I looked into overriding BuildParameter in PostgreSqlDbDriver but that class as well as PostgreSqlDialect are internal sealed.

Anything I missed? I can always pull both the driver and dialect code out and put into my own implementation but I hate to re-implement code.

Thanks

@TrevorPilley
Copy link
Collaborator

That's pretty much the option at the moment since it's all based around the DbCommand etc. I'm planning to lift the drivers and dialects out into separate libraries in the next version so that they can reference the native client libraries for their respective databases and not depend on only understanding DbType. For now, you could create your own implementation which essentially does that and supply it when you configure the session factory by inheriting from the base SqlDialect and SqlDriver?

@durlandd
Copy link
Author

durlandd commented Jul 8, 2015

That is what I have done but it requires that I re-implement the PostgreSqlDbDriver and PostgreSqlDialect classes and run the risk that a defect is fixed or functionality is added and it is not picked up by my code. Is there any particular reason that the data store specific driver and dialect classes are internal sealed?

@TrevorPilley
Copy link
Collaborator

That's the only option until the dialects and drivers are split into separate libraries which reference the respective .NET client libraries - I'll link this issue to the V7 milestone and when the driver is split, feel free to add improvements to that project!

They're internal because they aren't designed to be extended at the moment.

@durlandd
Copy link
Author

durlandd commented Jul 9, 2015

Will do. Thanks for the hard work!

@TrevorPilley TrevorPilley modified the milestone: 7.0 Sep 23, 2015
@TrevorPilley
Copy link
Collaborator

Depends on #406

@TrevorPilley TrevorPilley removed this from the 7.0 milestone Feb 19, 2020
@TrevorPilley TrevorPilley added this to the 8.0 milestone Feb 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants