Hyena
A Node.js Mongoose like ORM for MySQL
Install
npm install hyena
Example
Better documentation to follow...
var hyena = ;var connection = ;var Schema = hyenaSchema; hyena; var userSchema = name: type: 'string' required: true email: type: 'email' requried: true clubhouse: type: 'Clubhouse' field: 'causes_sponsors_id' required: true ; var clubhouseSchema = cause: type: 'Cause' field: 'cause_id' required: true sponsor: type: 'Sponsor' field: 'sponsor_id' required: true is_wellness: type: 'boolean' default: false is_public: type: 'boolean' default: true is_open: type: 'boolean' default: false ; var sponsorSchema = name: type: 'string' required: true logo: type: 'url' default: 'http://example.com/logo.png' ; sponsorSchema; sponsorSchema; var causeSchema = name: type: 'string' required: true logo: type: 'url' default: 'http://example.com/logo.png' ; 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: 'jon.doe@example.com' clubhouse: clubhouse ; async;
Why The Name?
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.
License
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.