OData V4 to TypeORM query compiler that translates OData query strings ($filter, $orderby, $top, $skip, $expand, $select, $search, etc.) into TypeORM query builder calls. Current stable version 1.0.3 (March 2024). Released under MIT license. Differs from other OData-to-ORM libraries by offering a simple middleware integration for Express and NestJS, direct support for TypeORM repositories and query builders, and TypeScript-first design. It wraps TypeORM's repository to produce OData-compliant endpoints with minimal boilerplate. Suitable for building REST APIs that follow the OData protocol on top of any SQL database supported by TypeORM. Requires TypeORM >=0.3.28.
npm install odata-v4-typeorm-improvedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an Express endpoint that translates OData query parameters to TypeORM queries using the provided repository.
Use import syntax or upgrade to Node 14+ with 'type':'module' in package.json.
Install 'odata-v4-typeorm-improved' and update imports.
Migrate to 'odata-v4-typeorm-improved' version 1.0.0 or later.
Ensure typeorm@^0.3.28 is installed.
Call executeQuery(repo, req.query) not executeQuery(repo, req).
Switch to import syntax or set type: module in package.json.
npm install odata-v4-typeorm-improved and update imports.
Use import { odataQuery } from 'odata-v4-typeorm-improved'.