An OData V4 request to SQL query compiler, converting OData query segments ($filter, $select, $skip, $top, $orderby, $expand) into SQL WHERE clauses or full SELECT statements. Version 0.1.2 is current, with basic support for $filter, $select, $skip, $top, $orderby, and $expand. It differs from alternatives by focusing solely on SQL generation, not full OData server implementations. Ships TypeScript types.
npm install odata-v4-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to convert an OData $filter string into a SQL WHERE clause using the createFilter function.
Always validate or parameterize queries when combining with user input.
Use `createQuery` instead to generate full SELECT statements.
Update calls to pass options object: createFilter(filterString, options).
Use alternative packages or manually implement unsupported features.
Run npm install odata-v4-sql
Use import { createFilter } from 'odata-v4-sql'Use createQuery instead of filter.from()
Validate filter string against OData spec or use odata-v4-parser for better error messages.