A Node.js Mongoose like ORM for MySQL
npm install hyena
Better documentation to follow...
var hyena = ;var connection = ;var Schema = hyenaSchema;hyena;var userSchema =name: type: 'string' required: trueemail: type: 'email' requried: trueclubhouse: type: 'Clubhouse' field: 'causes_sponsors_id' required: true;var clubhouseSchema =cause: type: 'Cause' field: 'cause_id' required: truesponsor: type: 'Sponsor' field: 'sponsor_id' required: trueis_wellness: type: 'boolean' default: falseis_public: type: 'boolean' default: trueis_open: type: 'boolean' default: false;var sponsorSchema =name: type: 'string' required: truelogo: type: 'url' default: '';sponsorSchema;sponsorSchema;var causeSchema =name: type: 'string' required: truelogo: type: 'url' default: '';var User = hyena;var Clubhouse = hyena;var Sponsor = hyena;var Cause = hyena;var sponsor = ;sponsorname = 'Test Sponsor';var cause = name: 'Test Cause' ;var clubhouse = cause: cause sponsor: sponsor ;var user = name: 'Jon Doe' email: 'email@example.com' clubhouse: clubhouse ;async;
Hyena's are the closest relative to the Mongoose even though they look very different. SO when using this library keep that in mind. While this library is very similar to Mongoose it's also very different.
The MIT License (MIT)
Copyright (c) 2013 plus3network
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.