0.6.0 • Published 10 years ago

simple-orm-mysql-adapter v0.6.0

Weekly downloads
6
License
MIT
Repository
github
Last release
10 years ago

Simple ORM MySQL Adapter

Mysql (and MariaDB) adapter for simple orm.

Tests

There are no tests in this repository, tests are handled with the core repository.

Feature Support

  • Transactions - Supported
  • Joins - Supported

Quick Start

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.js
var mysql = require('mysql');
var configuration = require('../configurations/data.json');

module.exports = {
  connection: mysql.createConnection({
    host: configuration.host,
    user: configuration.username,
    password: configuration.password,
    port: configuration.port,
    database: configuration.database
  })
};
var mysqlAdapter = require('simple-orm-mysql-adapter').create();
mysqlAdapter.setConnection(require('./mysql-connection'));

LICENSE

MIT

0.6.0

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago