backend/business-management/bin/data/MongoDB.js
/**
     * Ensure Index creation
     * Returns an Obserable that resolve to a string log
     */
Ensure Index creation
Returns an Obserable that resolve to a string log
Ensure Index creation Returns an Obserable that resolve to a string log
createIndexes$() {
        return Rx.Observable.create(async (observer) => {
            observer.next('Creating index for Business-management.Business => ( { generalInfo.name: 1},{ unique: true })');
            await this.db.collection(CollectionName).createIndex( { 'generalInfo.name': 1},{ unique: true });  
            observer.next('Creating index for wallet.Business => ({id: 1, name: 1})  ');
            await this.db.collection('Business').createIndex( { id: 1, name: 1 }); 
            observer.next('All indexes created');
            observer.complete();
        });
    }
createIndexes$ ( ) { return Rx . Observable . create ( async ( observer ) => { observer . next ( 'Creating index for Business-management.Business => ( { generalInfo.name: 1},{ unique: true })' ) ; await this . db . collection ( CollectionName ) . createIndex ( { 'generalInfo.name' : 1 } , { unique : true } ) ; observer . next ( 'Creating index for wallet.Business => ({id: 1, name: 1})  ' ) ; await this . db . collection ( 'Business' ) . createIndex ( { id : 1 , name : 1 } ) ; observer . next ( 'All indexes created' ) ; observer . complete ( ) ; } ) ; }
Ensure Index creation
 Returns an Obserable that resolve to a string log
Ensure Index creation Returns an Obserable that resolve to a string log