Loopback Connector for MySQL
Go to file
dgsan ac8f882175 This adds support for indexes to automigrate() and adds a check for the indexes existence to the migration.coffee 'should run migration' test.
All unit tests continue to pass. The code snippets for adding indexes are the declarative versions of the methods used in alterTable(), so the indexes should be consistant with previous declarations/additions.
Should resolve bug #5.
As a side node, also removed the 'UNIQUE' clause from the `id` declaration as it is redundant with the 'PRIMARY KEY' declaration so far as I'm aware and results in what seems to be a second index getting maintained for no reason. (If I'm wrong about this I'd be intrested in the explanation. MySQL does have a lot of oddities.)
2013-02-14 09:37:32 -07:00
lib This adds support for indexes to automigrate() and adds a check for the indexes existence to the migration.coffee 'should run migration' test. 2013-02-14 09:37:32 -07:00
test This adds support for indexes to automigrate() and adds a check for the indexes existence to the migration.coffee 'should run migration' test. 2013-02-14 09:37:32 -07:00
.gitignore Init 2012-12-14 18:01:44 +04:00
.travis.yml Init 2012-12-14 18:01:44 +04:00
README.md rename PostgreSQL as MySQL in README 2012-12-25 16:29:09 +08:00
index.js Init 2012-12-14 18:01:44 +04:00
package.json Updated deps 2013-02-12 17:10:15 +08:00

README.md

JugglingDB-MySQL Build Status

MySQL adapter for JugglingDB.

Usage

To use it you need jugglingdb@0.2.x.

  1. Setup dependencies in package.json:

    {
      ...
      "dependencies": {
        "jugglingdb": "0.2.x",
        "jugglingdb-mysql": "latest"
      },
      ...
    }
    
  2. Use:

        var Schema = require('jugglingbd').Schema;
        var schema = new Schema('mysql', {
            database: 'myapp_test',
            username: 'root'
        });
    

Running tests

npm test

MIT License

Copyright (C) 2012 by Anatoliy Chakkaev

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.