Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
odata-v4-inmemory
Advanced tools
Service OData v4 requests from an in memory data store.
The OData V4 InMemory Connector provides functionality to convert the varios types of OData segments into runnable JavaScript functions, that you can execute over an inmemory graph of objects.
In most cases servicing data from memory is not possible - in this case you can use the OData V4 MongoDB Connector
The InMemory connector can be safely used in IoT devices.
import { createFilter } from 'odata-v4-inmemory'
//example request: GET /api/products?$filter=category/id eq 5 or color eq 'Red'
app.get("/api/products", (req: Request, res: Response) => {
const data = getYourProductArray() //or similar :)
const filterFn = createFilter(req.query.$filter)
res.json(data.filter(filterFn))
})
var createFilter = require('odata-inmemory').createFilter
app.get("/api/products", function(req, res) {
var data = getYourProductArray() //or similar :)
var filterFn = createFilter(req.query.$filter)
res.json(data.filter(filterFn))
})
For now $filter, support for $select and $expand is next.
The OData v4 Parser layer supports 100% of the specification. The InMemory Connector is about 80% ready.
We are into creating a comprehensive feature availability chart for V1 release
✓ expression: 1 eq 1
✓ expression: A eq 1
✓ expression: A
✓ expression: A/b
✓ expression: A/b eq 1
✓ expression: A/b eq A/b
✓ expression: (A/b eq B/a) or (B/c lt 4) and ((E add 2) gt B add A)
✓ expression: A/$count
✓ expression: A/$count eq 3
✓ expression: A/$count gt 2
✓ expression: A and B
✓ expression: (A and B)
✓ expression: A/$count gt 2 and A/$count lt 4
✓ expression: (A/$count gt 2) and A/$count lt 3
✓ expression: A add B
✓ expression: A add 'B'
✓ expression: 'A' add 'B'
✓ expression: A/$count add B/$count eq 7
✓ expression: $it eq 5
✓ expression: true eq false
✓ expression: true eq false
✓ expression: A/all(i:i eq 1)
✓ expression: A/all(i:$it eq 1)
✓ expression: A/all(i: i/a eq 1)
✓ expression: A/any(i: i/a eq 1)
✓ expression: substring(A, 2) eq 'BC'
✓ expression: substring('ABC', D) eq 'BC'
✓ expression: substring('ABC', 2) eq 'BC'
FAQs
Service OData requests from an inmemory data store
The npm package odata-v4-inmemory receives a total of 63 weekly downloads. As such, odata-v4-inmemory popularity was classified as not popular.
We found that odata-v4-inmemory demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.