Package 

Class LocalCampaignTrackDbHelper

    • Method Summary

      Modifier and Type Method Description
      void onCreate(SQLiteDatabase sqLiteDatabase) Called when the database is created for the first time.
      void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion) Called when the database needs to be upgraded.
      void migrateToSchemaVersion3(SQLiteDatabase sqLiteDatabase) Migration of the database schema to version 3This add a new column custom_user_id to the view events table and recreate the table LocalCampaignsSQLTracker with the new unique constraint.
      String getTableAsString(SQLiteDatabase db) Helper function that parses a given table into a stringand returns it for easy printing.
      • Methods inherited from class android.database.sqlite.SQLiteOpenHelper

        close, getDatabaseName, getReadableDatabase, getWritableDatabase, onConfigure, onCreate, onDowngrade, onOpen, onUpgrade, setIdleConnectionTimeout, setLookasideConfig, setOpenParams, setWriteAheadLoggingEnabled
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LocalCampaignTrackDbHelper

        LocalCampaignTrackDbHelper(Context context)
        Constructor for the LocalCampaignTrackDbHelper
        Parameters:
        context - the context
    • Method Detail

      • onCreate

         void onCreate(SQLiteDatabase sqLiteDatabase)

        Called when the database is created for the first time.

        Parameters:
        sqLiteDatabase - The database.
      • onUpgrade

         void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion)

        Called when the database needs to be upgraded.

        Parameters:
        sqLiteDatabase - The database.
        oldVersion - The old database version.
        newVersion - The new database version.
      • migrateToSchemaVersion3

         void migrateToSchemaVersion3(SQLiteDatabase sqLiteDatabase)

        Migration of the database schema to version 3This add a new column custom_user_id to the view events table and recreate the table LocalCampaignsSQLTracker with the new unique constraint.

        Parameters:
        sqLiteDatabase - The database.
      • getTableAsString

         String getTableAsString(SQLiteDatabase db)

        Helper function that parses a given table into a stringand returns it for easy printing. The string consists ofthe table name and then each row is iterated through withcolumn_name: value pairs printed out.

        Parameters:
        db - the database to get the table from