mojoin-core

0.0.6 • Public • Published

npm version CircleCI Coverage Status Codacy Badge Maintainability Known Vulnerabilities JavaScript Style Guide: StandardJS License: MIT

mojoin-core

some general description goes here

Quick Start

const Mojoin = require('mojoin-core')
const mojoin = new Mojoin([
  {
    name: 'todos',
    type: 'json',
    location: './node_modules/mojoin-core/examples/datasource/todos.json'
  },
  {
    name: 'users',
    type: 'rest',
    location: 'https://jsonplaceholder.typicode.com/users'
  }
])
 
const query = {
  table: 'todos',
  where: {
    userId: 2,
    completed: 0
  },
  include: [{
    model: 'users',
    foreignKey: 'userId'
  }]
}
 
mojoin.syncAll()
  .then(() => mojoin.generateReport(query))
  .then(r => console.log(r))
  .catch(e => console.error(e))

Cache

Default

Specified

type: 'postgres' // 'mysql'|'sqlite'|'postgres'|'mssql',

MongoDB

Protocol: MongoDB

Protocol: SSH

  • privateKey
  • password

Readme

Keywords

none

Package Sidebar

Install

npm i mojoin-core

Weekly Downloads

0

Version

0.0.6

License

ISC

Unpacked Size

98.2 kB

Total Files

36

Last publish

Collaborators

  • ingo-eichhorst