lib/describing/mysql_describer.js
function (database, callback) {
        var s = this,
            querier = s._querier;
        querier.connect();
        async.waterfall([
            function (callback) {
                querier.showTables(database, function (err, tables) {
                    callback(err, tables);
                });
            },
            function (tables, callback) {
                var tableNames = s._parseTableNames(tables);
                async.map(tableNames, function (table, callback) {
                    querier.descTable(database, table, function (err, data1) {
                        querier.selectKeyColumnUsage(database, table, function (err, data2) {
                            callback(err, {
                                name: table,
                                columns: s._parseTableData(data1),
                                relations: s._getRelations(data2, table)
                            });
                        });
                    });
                }, callback);
            },
            function (data, callback) {
                var database = {};
                data.forEach(function (data) {
                    database[data.name] = data;
                });
                callback(null, database);
            }
        ], function (err, result) {
            querier.disconnect();
            callback(err, result);
        });
        return s;
    }
function (database, callback) {
        var s = this,
            querier = s._querier;
        querier.connect();
        async.waterfall([
            function (callback) {
                querier.showTables(database, function (err, tables) {
                    callback(err, tables);
                });
            },
            function (tables, callback) {
                var tableNames = s._parseTableNames(tables);
                async.map(tableNames, function (table, callback) {
                    querier.descTable(database, table, function (err, data1) {
                        querier.selectKeyColumnUsage(database, table, function (err, data2) {
                            callback(err, {
                                name: table,
                                columns: s._parseTableData(data1),
                                relations: s._getRelations(data2, table)
                            });
                        });
                    });
                }, callback);
            },
            function (data, callback) {
                var database = {};
                data.forEach(function (data) {
                    database[data.name] = data;
                });
                callback(null, database);
            }
        ], function (err, result) {
            querier.disconnect();
            callback(err, result);
        });
        return s;
    }
function ( database , callback ) { var s = this , querier = s . _querier ; querier . connect ( ) ; async . waterfall ( [ function ( callback ) { querier . showTables ( database , function ( err , tables ) { callback ( err , tables ) ; } ) ; } , function ( tables , callback ) { var tableNames = s . _parseTableNames ( tables ) ; async . map ( tableNames , function ( table , callback ) { querier . descTable ( database , table , function ( err , data1 ) { querier . selectKeyColumnUsage ( database , table , function ( err , data2 ) { callback ( err , { name : table , columns : s . _parseTableData ( data1 ) , relations : s . _getRelations ( data2 , table ) } ) ; } ) ; } ) ; } , callback ) ; } , function ( data , callback ) { var database = { } ; data . forEach ( function ( data ) { database [ data . name ] = data ; } ) ; callback ( null , database ) ; } ] , function ( err , result ) { querier . disconnect ( ) ; callback ( err , result ) ; } ) ; return s ; }
Describe database.
@param {string} database - Name of database.
@param {function} callback - Callback when done.
@returns {MysqlDescriber} - Returns self.
Describe database .