@resolvr/query-engine
v0.0.10
Published
Load sequelize models from DB and expose a query engine
Downloads
23
Readme
Resolvr Query Engine
The Query Engine connects to your database, turns it into sequelize models, and then runs a query that was outputted from
@resolvr/code
Usage
const getQueryEngineFromDB = require('@resolvr/query-engine');
getQueryEngineFromDB({
host: 'localhost',
port: 3306,
type: 'mysql',
database: 'database_name',
username: 'user',
password: 'pass'
}).then((queryEngine) => {
// This returns an object of table tables and their columns
// queryEngine.getStructure()
// Run the actual query
// queryEngine.query(queryFromCore)
})