// Path: app/src/main/java/com/nilhcem/devoxxfr/data/database/DbOpenHelper.java
// public class DbOpenHelper extends SQLiteOpenHelper {
// 
//     private static final String NAME = "devoxx.db";
//     private static final int VERSION = 1;
// 
//     public DbOpenHelper(Context context) {
//         super(context, NAME, null, VERSION);
//     }
// 
//     @Override
//     public void onCreate(SQLiteDatabase db) {
//         createSpeakersTable(db);
//         createSessionsTable(db);
//         createSelectedSessionsTable(db);
//     }
// 
//     @Override
//     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
//     }
// 
//     private void createSpeakersTable(SQLiteDatabase db) {
//         db.execSQL("CREATE TABLE " + Speaker.TABLE + " (" +
//                 Speaker.ID + " INTEGER PRIMARY KEY," +
//                 Speaker.NAME + " VARCHAR," +
//                 Speaker.TITLE + " VARCHAR," +
//                 Speaker.BIO + " VARCHAR," +
//                 Speaker.WEBSITE + " VARCHAR," +
//                 Speaker.TWITTER + " VARCHAR," +
//                 Speaker.GITHUB + " VARCHAR," +
//                 Speaker.PHOTO + " VARCHAR);");
//     }
// 
//     private void createSessionsTable(SQLiteDatabase db) {
//         db.execSQL("CREATE TABLE " + Session.TABLE + " (" +
//                 Session.ID + " INTEGER PRIMARY KEY," +
//                 Session.START_AT + " VARCHAR," +
//                 Session.DURATION + " INTEGER," +
//                 Session.ROOM_ID + " INTEGER," +
//                 Session.SPEAKERS_IDS + " VARCHAR," +
//                 Session.TITLE + " VARCHAR," +
//                 Session.DESCRIPTION + " VARCHAR);");
//     }
// 
//     private void createSelectedSessionsTable(SQLiteDatabase db) {
//         db.execSQL("CREATE TABLE " + SelectedSession.TABLE + " (" +
//                 SelectedSession.ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
//                 SelectedSession.SLOT_TIME + " VARCHAR," +
//                 SelectedSession.SESSION_ID + " INTEGER);");
//     }
// }


import android.app.Application;
import android.database.sqlite.SQLiteOpenHelper;
import com.nilhcem.devoxxfr.data.database.DbOpenHelper;
import com.squareup.sqlbrite.BriteDatabase;
import com.squareup.sqlbrite.SqlBrite;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import rx.schedulers.Schedulers;
import timber.log.Timber;
package com.nilhcem.devoxxfr.core.dagger.module;





@Module
public class DatabaseModule {

    static final String TAG = "database";

    @Provides @Singleton SQLiteOpenHelper provideSQLiteOpenHelper(Application application) {
// Path: app/src/main/java/com/nilhcem/devoxxfr/data/database/DbOpenHelper.java
// public class DbOpenHelper extends SQLiteOpenHelper {
// 
//     private static final String NAME = "devoxx.db";
//     private static final int VERSION = 1;
// 
//     public DbOpenHelper(Context context) {
//         super(context, NAME, null, VERSION);
//     }
// 
//     @Override
//     public void onCreate(SQLiteDatabase db) {
//         createSpeakersTable(db);
//         createSessionsTable(db);
//         createSelectedSessionsTable(db);
//     }
// 
//     @Override
//     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
//     }
// 
//     private void createSpeakersTable(SQLiteDatabase db) {
//         db.execSQL("CREATE TABLE " + Speaker.TABLE + " (" +
//                 Speaker.ID + " INTEGER PRIMARY KEY," +
//                 Speaker.NAME + " VARCHAR," +
//                 Speaker.TITLE + " VARCHAR," +
//                 Speaker.BIO + " VARCHAR," +
//                 Speaker.WEBSITE + " VARCHAR," +
//                 Speaker.TWITTER + " VARCHAR," +
//                 Speaker.GITHUB + " VARCHAR," +
//                 Speaker.PHOTO + " VARCHAR);");
//     }
// 
//     private void createSessionsTable(SQLiteDatabase db) {
//         db.execSQL("CREATE TABLE " + Session.TABLE + " (" +
//                 Session.ID + " INTEGER PRIMARY KEY," +
//                 Session.START_AT + " VARCHAR," +
//                 Session.DURATION + " INTEGER," +
//                 Session.ROOM_ID + " INTEGER," +
//                 Session.SPEAKERS_IDS + " VARCHAR," +
//                 Session.TITLE + " VARCHAR," +
//                 Session.DESCRIPTION + " VARCHAR);");
//     }
// 
//     private void createSelectedSessionsTable(SQLiteDatabase db) {
//         db.execSQL("CREATE TABLE " + SelectedSession.TABLE + " (" +
//                 SelectedSession.ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
//                 SelectedSession.SLOT_TIME + " VARCHAR," +
//                 SelectedSession.SESSION_ID + " INTEGER);");
//     }
// }


// Path: app/src/main/java/com/nilhcem/devoxxfr/core/dagger/module/DatabaseModule.java
import android.app.Application;
import android.database.sqlite.SQLiteOpenHelper;
import com.nilhcem.devoxxfr.data.database.DbOpenHelper;
import com.squareup.sqlbrite.BriteDatabase;
import com.squareup.sqlbrite.SqlBrite;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import rx.schedulers.Schedulers;
import timber.log.Timber;

package com.nilhcem.devoxxfr.core.dagger.module;





@Module
public class DatabaseModule {

    static final String TAG = "database";

    @Provides @Singleton SQLiteOpenHelper provideSQLiteOpenHelper(Application application) {
        return new DbOpenHelper(application);