UNPKG

sql-to-graphql

Version:

Generate a GraphQL API based on your SQL database structure

21 lines (15 loc) 454 B
'use strict'; var async = require('async'); function getTableComments(adapter, opts, cb) { var tables = opts.tables.reduce(function(map, tbl) { map[tbl] = getTableCommentTask(adapter, tbl); return map; }, {}); async.parallel(tables, cb); } function getTableCommentTask(adapter, tblName) { return function getTableComment(cb) { adapter.getTableComment(tblName, cb); }; } module.exports = getTableComments;