Loopback Connector for MySQL
Go to file
Samer Aldefai 3a06e0eae1 Update discovery.js
The issue is with the Discovery of Models. MYSQL Fields of Type 'POINT' are being discovered but loopback LDL model field provided by discovery functions is being of type 'String'.

missing code: case 'POINT': return 'GeoPoint';

for further information:
https://github.com/strongloop/loopback-connector-mysql/issues/17
2014-02-07 18:12:07 +01:00
example Fix discovery of exported keys 2013-10-08 13:44:37 -07:00
lib Update discovery.js 2014-02-07 18:12:07 +01:00
test Move mocha args to test/mocha.opts 2013-12-13 10:27:33 -08:00
.gitignore Prevent extra files from going into npm 2013-12-13 10:25:53 -08:00
.travis.yml Upd node version for travis 2013-03-27 20:32:13 +04:00
LICENSE Update license file 2013-09-04 14:43:47 -07:00
Makefile Remove blanket 2013-11-20 09:23:53 -08:00
NOTICE.md Add NOTICE and update READE 2013-10-30 23:02:12 -07:00
README.md Fix link to docs. 2014-01-09 16:48:24 -08:00
docs.json Update docs.json 2013-11-20 12:53:42 -08:00
index.js Init 2012-12-14 18:01:44 +04:00
package.json Move mocha args to test/mocha.opts 2013-12-13 10:27:33 -08:00

README.md

loopback-connector-mysql

loopback-connector-mysql is the MySQL connector module for loopback-datasource-juggler.

For complete documentation, see StrongLoop Documentation | MySQL Connector.

Installation

npm install loopback-connector-mysql --save

Basic use

To use it you need loopback-datasource-juggler.

  1. Setup dependencies in package.json:

    {
      ...
      "dependencies": {
        "loopback-datasource-juggler": "latest",
        "loopback-connector-mysql": "latest"
      },
      ...
    }
    
  2. Use:

        var DataSource = require('loopback-datasource-juggler').DataSource;
        var dataSource = new DataSource('mysql', {
            host: 'localhost',
            port: 3306,
            database: 'mydb',
            username: 'myuser',
            password: 'mypass'
        });
    

    You can optionally pass a few additional parameters supported by node-mysql, most particularly password and collation. Collation currently defaults to utf8_general_ci. The collation value will also be used to derive the connection charset.