baku-toolkit/lib/src/main/java/io/v/rx/syncbase/SgHostUtil.java
/**
     * @return an observable that echos the db after the each db emitted by
     * {@link RxDb#getObservable()} has been ensured to possess the given table names. Upon
     * subscription, for each db emitted, the observable will create these app/db/table hierarchies
     * if not already present.
     */
@return an observable that echos the db after the each db emitted by
RxDb#getObservable() has been ensured to possess the given table names. Upon
subscription, for each db emitted, the observable will create these app/db/table hierarchies
if not already present.
@return an observable that echos the db after the each db emitted by RxDb#getObservable () has been ensured to possess the given table names . Upon subscription for each db emitted the observable will create these app / db / table hierarchies if not already present .
public static Observable<Database> ensureSyncgroupHierarchies(
            final RxDb rxDb, final Iterable<String> tableNames) {
        return rxDb.getObservable().switchMap(db -> Observable.merge(Iterables.transform(tableNames,
                t -> rxDb.rxTable(t)
                        .mapFrom(db)
                        .map(rxt -> db)))
                .lastOrDefault(db));
    }
public static Observable < Database > ensureSyncgroupHierarchies ( final RxDb rxDb , final Iterable < String > tableNames ) { return rxDb . getObservable ( ) . switchMap ( db -> Observable . merge ( Iterables . transform ( tableNames , t -> rxDb . rxTable ( t ) . mapFrom ( db ) . map ( rxt -> db ) ) ) . lastOrDefault ( db ) ) ; }
@return an observable that echos the db after the each db emitted by
 {@link RxDb#getObservable()} has been ensured to possess the given table names.
@return an observable that echos the db after the each db emitted by { @link RxDb#getObservable () } has been ensured to possess the given table names .