MySQL adapter for simple orm
Mysql (and MariaDB) adapter for simple orm.
There are no tests in this repository, tests are handled with the core repository.
You can install this data adapter with:
npm install simple-orm-data-adapter
The data adapter does not assume anything with the creation of the database connection, you are free to create the connection however you want. To create an instance of the data adapter, you need to pass the require an object with a property called connection. you could do something like this:
//mysql-connection.jsvar mysql = require'mysql';var configuration = require'../configurations/data.json';moduleexports =connection: mysqlcreateConnectionhost: configurationhostuser: configurationusernamepassword: configurationpasswordport: configurationportdatabase: configurationdatabase;
var mysqlAdapter = require'simple-orm-mysql-adapter'create;mysqlAdaptersetConnectionrequire'./mysql-connection';