demetrixbio / FSharp.Data.Npgsql

F# type providers to support statically typed access to input parameters and result set of sql statement in idiomatic F# way. Data modifications via statically typed tables.
Apache License 2.0
128 stars 15 forks source link

Fix postgis params issue #85

Closed Swoorup closed 4 years ago

Swoorup commented 4 years ago

Fixes the bug in https://github.com/demetrixbio/FSharp.Data.Npgsql/issues/84

The geometry reports itself as a user-defined type hence appears to crash when using the accessor, if not found, I just let try to deduce itself.

Swoorup commented 4 years ago

~idk where to place the NetTopologySuite Npgsql typemapping registration. Should it be initialized globally for the parameter extraction to deduce commands. This is to fix the first problem in the reported bug. Should probably be in TypeProviderAssembly instead of invoking it every commands?~

For odd reasons, this was failing for non postgis enabled database. Registering globally fixed the problem.