Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@odata/server

Soontao259MITdeprecated0.2.48TypeScript support: included

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

OData(V4) Server

OData, Rest, OData(V4), ORM

readme

OData(V4) Server

npm (scoped) npm (scoped) npm (scoped) npm (scoped)

Unit Test Status MySQL Integration Status PostgreSQL Integration Status Codecov

Security Rating Reliability Rating Technical Debt

NodeJS OData(V4) Server Implementation.

This project is under heavy development, if you are looking forward an OData Framework for production usage, please try the SAP CAP Framework

Just check the demo project for features preview.

Features

  • OASIS Standard OData Version 4.0 server
  • usable as a standalone server, or as an Express router
  • expose service document and service metadata - $metadata
  • setup metadata using decorators or @odata/metadata
  • supported data types are Edm primitives, complex types, navigation properties
  • support create, read, update, and delete the EntitySets,
  • support action imports, function imports, bounded actions and bounded functions on EntitySets
  • support for full OData query language using @odata/parser
    • filtering entities - $filter
    • sorting - $orderby
    • paging - $skip and $top
    • projection of entities - $select
    • expanding entities - $expand
    • count records - $count
  • support async controller functions using Promise, async/await
  • support OData V4.01 JSON format $batch operation
  • support dependency inject
  • support deep insert

Concepts

Domain Model

Define domain model class, it will be transformed to database schema.

Action & Function

Define Action/Function on the Domain Models.

Using the actions implement the partially focused business logics, and use the functions implement complex queries.

Hook

Hook is general business logic for specify Domain Model, like beforeCreate/beforeUpdate, and it's mapped from OData/HTTP Method.

Define Hooks to implement the general business logics for entity.

Service

Using services in hook/action/function, keep the business consistence for single domain model.

Each model will have its own standard CRUD service which enhanced with hooks logic.

Transaction

Each TransactionContext will use single database transaction (connection).

CHANGELOG

LICENSE

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.2.48 (2021-06-07)

Bug Fixes

0.2.47 (2021-01-04)

Features

0.2.46 (2020-11-04)

Features

0.2.45 (2020-10-28)

Features

Bug Fixes

0.2.44 (2020-10-11)

Bug Fixes

  • $select for many to one navigation (cc02c22)

0.2.43 (2020-10-11)

Bug Fixes

0.2.42 (2020-10-11)

Bug Fixes

  • projection not works correctly in deep expand (fc52615)

0.2.41 (2020-10-11)

Features

  • #96 enhance $expand logic on SQL build (fcffee4)

Bug Fixes

0.2.40 (2020-10-11)

Features

0.2.39 (2020-09-24)

Features

Bug Fixes

0.2.38 (2020-09-22)

Bug Fixes

  • getConnection of typed service (9a3509d)

0.2.37 (2020-09-22)

Bug Fixes

  • avoid update un-necessary field for hana (dc583cc)

0.2.36 (2020-09-22)

Features

  • mapping guid when query (9cda2e7)

Bug Fixes

0.2.35 (2020-09-21)

Features

Bug Fixes

0.2.34 (2020-09-07)

0.2.33 (2020-09-03)

Features

Bug Fixes

0.2.32 (2020-09-01)

0.2.31 (2020-08-31)

Features

  • add new api to typed-server (ed28944)

Bug Fixes

0.2.30 (2020-08-20)

Bug Fixes

0.2.29 (2020-08-20)

Features

Bug Fixes

0.2.28 (2020-08-16)

Features

Bug Fixes

0.2.27 (2020-08-10)

Features

Bug Fixes

  • connection issue (a12a9c8)
  • get connection from wrong location (e7259b5)
  • hana instance data issue (b5add91)

0.2.26 (2020-08-10)

Features

Bug Fixes

0.2.25 (2020-08-07)

Features

Bug Fixes

0.2.24 (2020-08-04)

Features

0.2.23 (2020-08-02)

Features

0.2.22 (2020-08-01)

Features

  • refactor server type & hook (445adcd)

Bug Fixes

0.2.21 (2020-08-01)

Features

0.2.20 (2020-08-01)

Bug Fixes

0.2.19 (2020-08-01)

Features

Bug Fixes

0.2.18 (2020-08-01)

Features

Bug Fixes

0.2.17 (2020-07-30)

Bug Fixes

  • type: for hook processor (5938a88)

0.2.16 (2020-07-30)

Features

Bug Fixes

0.2.15 (2020-07-29)

Features

Bug Fixes

0.2.14 (2020-07-08)

Bug Fixes