bitemyapp / esqueleto

New home of Esqueleto, please file issues so we can get things caught up!
BSD 3-Clause "New" or "Revised" License
370 stars 107 forks source link

RDBMS-specific functions in generic `Database.Esqueleto` module #385

Open isomorpheme opened 6 months ago

isomorpheme commented 6 months ago

There's functions like ilike where the docs say:

Supported by PostgreSQL only.

Or others where both MySQL and Postgres support them, but no other RDBMSes. Then there's also modules like Database.Esqueleto.PostgreSQL that have RDBMS-specific code, and this is explicitly pointed out. So it seems like the intent is that such functions don't go in the generic Database.Esqueleto.

It's also pretty confusing as a user, and sometimes frustrating to find a function in HLS autocomplete that I can't actually use. It would be preferable if I can safely use anything from Database.Esqueleto (or of course .Experimental) without having to check individual docs if it's actually available on my RDBMS; anything that's implementation-specific should come from other modules.

belevy commented 5 months ago

True enough, though removing these functions from Database.Esqueleto is a breaking change.