Adapter-specific query leak in FeathersJS service pagination
0 reputation · 10 Oct 2021, 20:17 UTC
Query Syntax Inconsistency Across Adapters
FeathersJS delegates query filtering and pagination logic directly to the underlying database adapter. While this allows for high performance, the framework does not provide a unified abstraction layer to normalize query syntax across different database drivers.
When transitioning a service from a NoSQL adapter to a SQL adapter, or when supporting multiple database types, the find method parameters may cause unexpected behavior because the adapter passes these filters directly to the driver without validation against a generic schema.
This creates a risk where adapter-specific query operators leak into the application logic, making the service layer tightly coupled to a specific database implementation.
- How can query syntax be normalized across different adapters to prevent driver-specific leaks?
- Is there a documented mechanism to intercept and translate
findparameters before they reach the adapter?