Exemplo n.º 1
0
 /*
  * The second two parameters here are just provided for compatbility with SQLiteDatabase
  * Support for them is not currently implemented
  */
 public static SQLiteBridge openDatabase(
     String path, SQLiteDatabase.CursorFactory factory, int flags) throws SQLiteException {
   SQLiteBridge bridge = null;
   try {
     bridge = new SQLiteBridge(path);
     bridge.mDbPointer = SQLiteBridge.openDatabase(path);
   } catch (SQLiteBridgeException ex) {
     // catch and rethrow as a SQLiteException to match SQLiteDatabase
     throw new SQLiteException(ex.getMessage());
   }
   return bridge;
 }
Exemplo n.º 2
0
  /*
   * The second two parameters here are just provided for compatibility with SQLiteDatabase
   * Support for them is not currently implemented.
   */
  public static SQLiteBridge openDatabase(
      String path, SQLiteDatabase.CursorFactory factory, int flags) throws SQLiteException {
    if (factory != null) {
      throw new RuntimeException("factory not supported.");
    }
    if (flags != 0) {
      throw new RuntimeException("flags not supported.");
    }

    SQLiteBridge bridge = null;
    try {
      bridge = new SQLiteBridge(path);
      bridge.mDbPointer = SQLiteBridge.openDatabase(path);
    } catch (SQLiteBridgeException ex) {
      // Catch and rethrow as a SQLiteException to match SQLiteDatabase.
      throw new SQLiteException(ex.getMessage());
    }

    prepareWAL(bridge);

    return bridge;
  }