UNPKG

sql-cli

Version:

Cross platform command line interface for SQL Server

21 lines (17 loc) 576 B
(function () { "use strict"; var Utils = require('./utils'), Queries = require('./queries'); class AnalyzeCommand { constructor(db) { this.db = db; this.prefix = '.analyze'; this.usage = '.analyze'; this.description = 'Analyzes the database for missing indexes.'; } run(messages, writer, args) { return Utils.runQuery(messages, writer, this.db.query.bind(this.db, Queries.listMissingIndexesSql())); } } module.exports = exports = AnalyzeCommand; } ());