cloud-sdk-json-query
v1.0.6
Published
Use MongoDB-like JSON Queries to query create ODATA Requests with the SAP Cloud SDK for JS
Downloads
6
Readme
Cloud Sdk Json Query
Use MongoDB-esque JSON Queries to query create ODATA Requests (via the SAP Cloud SDK).
Install
Install from the NPM repository using yarn or npm:
yarn add cloud-sdk-json-query
npm install cloud-sdk-json-query
Usage
import { createRequest } from 'cloud-sdk-json-query';
import { ExampleItem1 } from './client/generated/by/sdk/...';
const query = {
filter: { num1: 42 },
top: 10,
};
// Create Request
const request = createRequest(ExampleItem1, query);
// Execute Request (with SAP Cloud SDK for Javascript)
const result = await request.execute({ url: 'https://...' });
For more examples take a look at the tests.