3a06e0eae1
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 |
||
---|---|---|
example | ||
lib | ||
test | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
Makefile | ||
NOTICE.md | ||
README.md | ||
docs.json | ||
index.js | ||
package.json |
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
.
-
Setup dependencies in
package.json
:{ ... "dependencies": { "loopback-datasource-juggler": "latest", "loopback-connector-mysql": "latest" }, ... }
-
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 particularlypassword
andcollation
.Collation
currently defaults toutf8_general_ci
. Thecollation
value will also be used to derive the connection charset.