index.js
function ( config, tables, context, callback )
    {
        var self = this;
        var db = Array(),
            counter = 0,
            query = 'SHOW INDEX FROM %s.%s;';
        db[ 0 ] = Array();
        db[ 1 ] = Array();
        var len = ( tables.tables[ 0 ].length > tables.tables[ 1 ].length ) ?
            tables.tables[ 0 ].length : tables.tables[ 1 ].length;

        for ( var i = 0; i < len; ++i )
        {
            var q = '',
                stmt = 0;


            if ( tables.tables[ 0 ][ i ] )
                q = util.format( query, config.database, tables.tables[ 0 ][ i ] );
            else ++stmt;

            if ( tables.tables[ 1 ][ i ] )
                q += util.format( query, config.database_diff, tables.tables[ 1 ][ i ] );

            //scoping stmt and interator to event
            ( function ( stmt, i )
            {
                self.runSql( q, null, { useArray: true } )
                    .on( 'result', function ( res )
                    {
                        var local = stmt++;
                        res.on( 'data', function ( row )
                        {
                            row[ 0 ] = row[ 2 ]; //replace table by key name
                            row[ 1 ] = row[ 1 ] === '0';

                            row.splice( 2, 1 ); //delete moved key name

                            //<-- Seq_in_index has now moved one index lower
                            row.splice( 4, 4 ); //delete until null info
                            row[ 4 ] = ( row[ 4 ] === 'YES' ) ? true : false;
                            //Comment and Index_comment will be simply ignored
                            //Maybe I'm going to implement them later, but not for now.

                            if ( !db[ local ][ tables.tables[ local ][ i ] ] )
                                db[ local ][ tables.tables[ local ][ i ] ] = Array();

                            db[ local ][ tables.tables[ local ][ i ] ].push( row );
                        } );
                    } )
                    .on( 'end', function ()
                    {
                        if ( ++counter >= len )
                            callback( context, db );
                    } );
            } )( stmt, i );
        }
    }
function ( config, tables, context, callback )
    {
        var self = this;
        var db = Array(),
            counter = 0,
            query = 'SHOW INDEX FROM %s.%s;';
        db[ 0 ] = Array();
        db[ 1 ] = Array();
        var len = ( tables.tables[ 0 ].length > tables.tables[ 1 ].length ) ?
            tables.tables[ 0 ].length : tables.tables[ 1 ].length;

        for ( var i = 0; i < len; ++i )
        {
            var q = '',
                stmt = 0;


            if ( tables.tables[ 0 ][ i ] )
                q = util.format( query, config.database, tables.tables[ 0 ][ i ] );
            else ++stmt;

            if ( tables.tables[ 1 ][ i ] )
                q += util.format( query, config.database_diff, tables.tables[ 1 ][ i ] );

            //scoping stmt and interator to event
            ( function ( stmt, i )
            {
                self.runSql( q, null, { useArray: true } )
                    .on( 'result', function ( res )
                    {
                        var local = stmt++;
                        res.on( 'data', function ( row )
                        {
                            row[ 0 ] = row[ 2 ]; //replace table by key name
                            row[ 1 ] = row[ 1 ] === '0';

                            row.splice( 2, 1 ); //delete moved key name

                            //<-- Seq_in_index has now moved one index lower
                            row.splice( 4, 4 ); //delete until null info
                            row[ 4 ] = ( row[ 4 ] === 'YES' ) ? true : false;
                            //Comment and Index_comment will be simply ignored
                            //Maybe I'm going to implement them later, but not for now.

                            if ( !db[ local ][ tables.tables[ local ][ i ] ] )
                                db[ local ][ tables.tables[ local ][ i ] ] = Array();

                            db[ local ][ tables.tables[ local ][ i ] ].push( row );
                        } );
                    } )
                    .on( 'end', function ()
                    {
                        if ( ++counter >= len )
                            callback( context, db );
                    } );
            } )( stmt, i );
        }
    }
function ( config , tables , context , callback ) { var self = this ; var db = Array ( ) , counter = 0 , query = 'SHOW INDEX FROM %s.%s;' ; db [ 0 ] = Array ( ) ; db [ 1 ] = Array ( ) ; var len = ( tables . tables [ 0 ] . length > tables . tables [ 1 ] . length ) ? tables . tables [ 0 ] . length : tables . tables [ 1 ] . length ; for ( var i = 0 ; i < len ; ++ i ) { var q = '' , stmt = 0 ; if ( tables . tables [ 0 ] [ i ] ) q = util . format ( query , config . database , tables . tables [ 0 ] [ i ] ) ; else ++ stmt ; if ( tables . tables [ 1 ] [ i ] ) q += util . format ( query , config . database_diff , tables . tables [ 1 ] [ i ] ) ; //scoping stmt and interator to event ( function ( stmt , i ) { self . runSql ( q , null , { useArray : true } ) . on ( 'result' , function ( res ) { var local = stmt ++ ; res . on ( 'data' , function ( row ) { row [ 0 ] = row [ 2 ] ; //replace table by key name row [ 1 ] = row [ 1 ] === '0' ; row . splice ( 2 , 1 ) ; //delete moved key name //<-- Seq_in_index has now moved one index lower row . splice ( 4 , 4 ) ; //delete until null info row [ 4 ] = ( row [ 4 ] === 'YES' ) ? true : false ; //Comment and Index_comment will be simply ignored //Maybe I'm going to implement them later, but not for now. if ( ! db [ local ] [ tables . tables [ local ] [ i ] ] ) db [ local ] [ tables . tables [ local ] [ i ] ] = Array ( ) ; db [ local ] [ tables . tables [ local ] [ i ] ] . push ( row ) ; } ) ; } ) . on ( 'end' , function ( ) { if ( ++ counter >= len ) callback ( context , db ) ; } ) ; } ) ( stmt , i ) ; } }
Returns an array containing the indizies.

General return information:

This array has 3 layers, the final information layer has
6 elements.

Array Format:
Layer 1:
[0] = real table, [1] = diff table

Layer 2:
['tablename'] = Array for final table indizies information

Layer 3 (Result formatting):
[0] = key name, [1] = unique( true or false ),
[2] = Position of column in index (Sequence in index),
[3] = column name, [4] = Nullable, [5] = index type

@return array
Returns an array containing the indizies .