Skip to content

Remove config databaseURI, databaseOptions, collectionPrefix in favor of databaseAdapter #9908

@mtrezza

Description

@mtrezza

New Feature / Enhancement Checklist

Current Limitation

There are databaseURI , databaseOptions, collectionPrefix and databaseAdapter as config options. That is redundant:

  • It seems to be that databaseOptions takes some Parse Server custom options and some options that are then passed directly to the DB client. This requires complex filtering.
  • There are many native DB client options that are not supported by Parse Server because Parse Server validates native DB client options before passing them on. This validation is unnecessary and causes Parse Server to chronically lag behind supporting the latest DB driver options.

Feature / Enhancement Description

  • Remove databaseOptions and move the Parse Server native options, like enableSchemaHooks, schemaCacheTtl, etc. into a new sub key DatabaseAdapter.options. The DB client options can already be passed via DatabaseAdapter.mongoOptions for example. It may make sense to keep databaseOptions for Parse Server native options if it turns out too complex to pass them via the DB adapter, as it affects features like schema hooks that are implemented in Parse Server core, rather than the DB adapter.
  • Remove option databaseURI, as this can already be provided via DatabaseAdapter.uri.
  • Remove any obsolete logic like parsing the databaseURI string to auto-determine which DB the URI points to, to then automatically load the correct adapter.

This is in line with the larger plan to move all DB adapters out of the Parse Server core repository.

Example Use Case

Alternatives / Workarounds

3rd Party References

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions