arenadotio / pgx

A pure OCaml PostgreSQL client library
Other
122 stars 16 forks source link

Pgx value opaque #85

Closed brendanlong closed 4 years ago

brendanlong commented 4 years ago

This makes Pgx_value an opaque type, because it's not actually safe to depend on the internal representation, especially for data from bytea columns. This has also never really been safe, since people shouldn't be doing their own conversions. The postgres bool and float data types can't be converted with OCaml converters.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.2%) to 66.848% when pulling 90dec6c865a3cc189187f5e1c33f7d944f2b7135 on pgx-value-opaque into 287f2ed1b8bfabcdf850a8e0edb29df31410d408 on master.