clientlinker-flow-mysql

6.1.4 • Public • Published

Clientlinker-flow-mysql

NPM Version NPM Downloads NPM License

Install

Install clientlinker pkg

npm i clientlinker --save

Install flow pkg

npm i clientlinker-flow-mysql --save

Usage

var clientlinker = require('clientlinker');
var linker = clientlinker({
  flows: ['mysql'],
  clients: {
    mysqlCustomClient: {
      mysqlConfigFile: '/etc/dbconfig.conf',
      mysqlConfigKey: 'DBItemName',
      mysqlhandler: {
        clientHanlder: {
          sql: 'SELECT `name` FROM `db_example` WHERE `id`= ?',
          keys: ['id'],
        },
        subKeys: {
          sql: 'INSERT INTO `db_example` (`name`, `value`) VALUES ?',
          keys: ['info'],
          subKeys: {info: ['name', 'value']}
        }
      }
    }
  }
});

linker.loadFlow('mysql', 'clientlinker-flow-mysql', module);


// use
linker.run('mysqlCustomClient.clientHanlder', null, {id: 13})
  .then(function(){});

linker.run('mysqlCustomClient.subKeys', null, {info: {name: 1, value: 2}});
linker.run('mysqlCustomClient.subKeys', null, {
  info: [
    {name: 1, value: 2},
    {name: 2, value: 2}
  ]});

Readme

Keywords

Package Sidebar

Install

npm i clientlinker-flow-mysql

Weekly Downloads

1

Version

6.1.4

License

MIT

Unpacked Size

6.18 kB

Total Files

4

Last publish

Collaborators

  • bacra