index.js
function ( config, callback )
    {
        var self = this;
        var db = Array(),
            diff = Array(),
            first = true;

        db[ 0 ] = Array();
        db[ 1 ] = Array();
        diff[ 0 ] = Array();
        diff[ 1 ] = Array();

        var query = 'SELECT name, modified, type FROM mysql.proc WHERE db = ?';
        this.runSql( query, [ config.database ] )
            .on( 'result', function ( res )
            {
                res.on( 'data', function ( row )
                {
                    if ( row.type === 'FUNCTION' )
                        db[ 0 ].push( [ row.name, row.modified ] );
                    else if ( row.type === 'PROCEDURE' )
                        db[ 1 ].push( [ row.name, row.modified ] );
                } );
            } )
            .on( 'end', function ()
            {
                if ( config.diffDump )
                    first = false;
                else
                    callback( db );
            } );

        if ( config.diffDump )
        {
            var query = 'SELECT name, modified, type FROM mysql.proc WHERE db = ?';
            this.runSql( query, [ config.database_diff ], false )
                .on( 'result', function ( res )
                {
                    res.on( 'data', function ( row )
                    {
                        if ( row.type === 'FUNCTION' )
                            diff[ 0 ].push( [ row.name, row.modified ] );
                        else if ( row.type === 'PROCEDURE' )
                            diff[ 1 ].push( [ row.name, row.modified ] );
                    } );
                } )
                .on( 'end', function ()
                {
                    while ( first )
                    {
                        deasync.sleep( 100 );
                    }

                    callback( db, diff );
                } );
        }
    }
function ( config, callback )
    {
        var self = this;
        var db = Array(),
            diff = Array(),
            first = true;

        db[ 0 ] = Array();
        db[ 1 ] = Array();
        diff[ 0 ] = Array();
        diff[ 1 ] = Array();

        var query = 'SELECT name, modified, type FROM mysql.proc WHERE db = ?';
        this.runSql( query, [ config.database ] )
            .on( 'result', function ( res )
            {
                res.on( 'data', function ( row )
                {
                    if ( row.type === 'FUNCTION' )
                        db[ 0 ].push( [ row.name, row.modified ] );
                    else if ( row.type === 'PROCEDURE' )
                        db[ 1 ].push( [ row.name, row.modified ] );
                } );
            } )
            .on( 'end', function ()
            {
                if ( config.diffDump )
                    first = false;
                else
                    callback( db );
            } );

        if ( config.diffDump )
        {
            var query = 'SELECT name, modified, type FROM mysql.proc WHERE db = ?';
            this.runSql( query, [ config.database_diff ], false )
                .on( 'result', function ( res )
                {
                    res.on( 'data', function ( row )
                    {
                        if ( row.type === 'FUNCTION' )
                            diff[ 0 ].push( [ row.name, row.modified ] );
                        else if ( row.type === 'PROCEDURE' )
                            diff[ 1 ].push( [ row.name, row.modified ] );
                    } );
                } )
                .on( 'end', function ()
                {
                    while ( first )
                    {
                        deasync.sleep( 100 );
                    }

                    callback( db, diff );
                } );
        }
    }
function ( config , callback ) { var self = this ; var db = Array ( ) , diff = Array ( ) , first = true ; db [ 0 ] = Array ( ) ; db [ 1 ] = Array ( ) ; diff [ 0 ] = Array ( ) ; diff [ 1 ] = Array ( ) ; var query = 'SELECT name, modified, type FROM mysql.proc WHERE db = ?' ; this . runSql ( query , [ config . database ] ) . on ( 'result' , function ( res ) { res . on ( 'data' , function ( row ) { if ( row . type === 'FUNCTION' ) db [ 0 ] . push ( [ row . name , row . modified ] ) ; else if ( row . type === 'PROCEDURE' ) db [ 1 ] . push ( [ row . name , row . modified ] ) ; } ) ; } ) . on ( 'end' , function ( ) { if ( config . diffDump ) first = false ; else callback ( db ) ; } ) ; if ( config . diffDump ) { var query = 'SELECT name, modified, type FROM mysql.proc WHERE db = ?' ; this . runSql ( query , [ config . database_diff ] , false ) . on ( 'result' , function ( res ) { res . on ( 'data' , function ( row ) { if ( row . type === 'FUNCTION' ) diff [ 0 ] . push ( [ row . name , row . modified ] ) ; else if ( row . type === 'PROCEDURE' ) diff [ 1 ] . push ( [ row . name , row . modified ] ) ; } ) ; } ) . on ( 'end' , function ( ) { while ( first ) { deasync . sleep ( 100 ) ; } callback ( db , diff ) ; } ) ; } }
No specification yet.

@return useless
No specification yet .