Object document mapper for JSON data that provides mongodb methods for querying and transformation as well as additional joining that is not provided by mongodb. >> IF YOU LIKE IT, PLEASE GIVE IT A STAR ON GITHUB <<
This Project aims to be provide a json object document mapper.
Why would I need this?
There are many cases where you do not want to have the server query your data. You may also see this mapper as a fancy way to filter your data or prepare a view model. The original use case was an ionic app that was not interactive so providing a server backend was not needed, but structuring my data into joinable collections seemed very helpful.
And if you can use a server you may consider our new WebSocket server project "connectanum" for Publish/Subscribe and RPC communication
If you like the project please support it with a star here on GitHub
If commercial support is needed please contact me.
npm install json-odm
npm install json-odmcd npm_modules/json-odm/npm installgulp
Unit test ran successfully under Chrome,iOS7+,IE9+,Firefox,Android 4.4.2+
To be tested: Safari on OSX, IE8(test driver does not run in IE < 9 so it will be hard to test)
<!-- add minified version from to the html head -->
// initialize The mappervar odm = ;// add a source to the mapperodm;// instantiate a collection objectvar people = 'Person';people;people;var q = people;// get all hairdresser and plumbervar hairdresser = q;// get all but hairdressers and plumbersvar hairdresser = q;// delete all plumbersq;
The MIT License (MIT)
Copyright (c) 2015 Richard Burkhardt - Konsultaner GmbH & Co. KG
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.