jamestalton / koa-mongo-router Goto Github PK
View Code? Open in Web Editor NEWKOA Router REST API for MongoDB
KOA Router REST API for MongoDB
Callback that can indicate a users authorization for operations on a global level, per database level, an per collection level.
if-none-match will be used to only put items if nothing matching the passed in filter
i.e. create if nothing already exists
if-match will be used to only put items if there is something matching the passed in filter
i.e. replace only if it currently exists
I am seeing a warning DeprecationWarning: The option `reconnectTries` is incompatible with the unified topology, please read more by visiting http://bit.ly/2D8WfT6
Related to:
Line 22 in acc8b6c
And mongodb 3.3.5
Is your feature request related to a problem? Please describe.
For example, before a POST is done to a particular collection, I need to be able to run some special validation logic that can't be done by just using Mongo schema validation.
Describe the solution you'd like
Ability to specify a pre or post hook for a collection with custom logic.
When mongo is in a replica set we can listen for database changes and send websocket events for collections
If I have a document in my collection with a string property like this:
{
"someProp": "123456"
}
I can't query that document using that property using parseQueryString
, because it gets cast as a Number
here. For example:
import { parseQueryString } from "koa-mongo-router";
# my request is /getStuff?someProp=1232456
parseQueryString(ctx.req.query)
This results in my query being looking for a number value for someProp
, which doesn't work:
{ filter:
{ someProp: { '$eq': 123456} // now a number
}
Could we add an Operation
here for either saying "this is a Number"
and assuming a string otherwise, or on the flip side an operation for string equality specifically (i.e. "don't cast this as anything but a string")?
Support putting schema and reading schema using in mongo validation.
Is there a way to specify fields that should never be returned from the database (e.g. _id)? If not I can convert this to a feature request.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.