Nitrate Processed Mincemeat

    loke-mysql-orm

    1.11.0 • Public • Published

    loke-mysql-orm

    NPM Version Build Status Coverage Status NPM Downloads License

    Install

    npm install --save loke-mysql-orm

    Example

    var db = require('loke-mysql-orm').create('mysql://root@localhost/demo');
    var petRepository = db.table('Pets', {
      name: { type: String, defaultValue: () => 'Untitled' },
      description: db.Text
    });
    var userRepository = db.table('Users', {
      firstName: db.String,
      lastName: db.String,
      pets: [petRepository]
    });
     
    userRepository.find({firstName: 'Testing'})
    .then(function (users) {
      users[0].pets[0].description = 'Hello World!';
      // Save changes:
      return userRepository.persist(users[0]);
    });

    View Documentation.

    Tests

    npm test

    Coverage

    npm run coverage

    Keywords

    Install

    npm i loke-mysql-orm

    DownloadsWeekly Downloads

    2

    Version

    1.11.0

    License

    MIT

    Last publish

    Collaborators

    • aantthony