Expand default set of Sequel extensions
timriley opened this issue · comments
@timriley What did you have in mind here? This definitely needs to be db-specific.
General extensions I use:
connection_validator
for our k8s readiness probeserror_sql
adds current SQL query to exceptions for diagnosis
PostgreSQL extensions:
pg_array
supports array typespg_json
supports json/jsonb types
It also needs to be possible to add to this through configuration for app-specific things (relevant to #1389). I use new_relic_instrumentation
for APM and I wrote a ksuid
extension for KSUID identifiers.
I know this is for Sequel extensions, but as far as ROM extensions go, but I think timestamps
would good to include by default since users will expect that to just work.
Then possibly include auto_restrictions
and pagination
as commented out in the configuration? It'd be nice if we can add a docs page listing all the most popular Sequel & ROM extensions.
@alassek So yep, I think we'll want some way to provide a set of defaults that is specific (a) per adapter, and (b) in the case of sql, per database type.
Users should be able to add their own extensions to this default set in a simple way.
Users should also be able to clear the default set for their given adapter/database type, if they want to exercise full control.
Is that enough for you to have a go at this? I think this is the kind of thing where the ideal solution will become clearer after having a few runs at it in code, so getting even something down would be a good start for us :)
FWIW, is use the uuid-ossp
extension for UUID generation, and the pg_trgm
extension to provide trigram functions I use to improve full-text search.