congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SupportSQLiteDatabase.isWriteAheadLoggingEnabled
Code IndexAdd Tabnine to your IDE (free)

How to use
isWriteAheadLoggingEnabled
method
in
androidx.sqlite.db.SupportSQLiteDatabase

Best Java code snippets using androidx.sqlite.db.SupportSQLiteDatabase.isWriteAheadLoggingEnabled (Showing top 3 results out of 315)

origin: commonsguy/cwac-saferoom

@Test
public void wal() throws IOException {
 SafeHelperFactory factory=
  SafeHelperFactory.fromUser(new SpannableStringBuilder(PASSPHRASE));
 SupportSQLiteOpenHelper helper=
  factory.create(InstrumentationRegistry.getTargetContext(), DB_NAME,
   new Callback(1));
 SupportSQLiteDatabase db=helper.getWritableDatabase();
 assertFalse(db.isWriteAheadLoggingEnabled());
 assertTrue(db.enableWriteAheadLogging());
 assertTrue(db.isWriteAheadLoggingEnabled());
 db.close();
 factory=SafeHelperFactory.fromUser(new SpannableStringBuilder(PASSPHRASE));
 helper=
  factory.create(InstrumentationRegistry.getTargetContext(), DB_NAME,
   new Callback(1));
 db=helper.getWritableDatabase();
 assertTrue(db.isWriteAheadLoggingEnabled());
 db.disableWriteAheadLogging();
 assertFalse(db.isWriteAheadLoggingEnabled());
 db.close();
}
origin: commonsguy/cwac-saferoom

@Test
public void notQuiteAsSafeButStillNice() {
 final Context ctxt=InstrumentationRegistry.getTargetContext();
 android.database.sqlite.SQLiteOpenHelper helper = new LessSafeNonRoomHelper(ctxt);
 helper.getWritableDatabase();
 helper.close();
 ImportingLessSafeDatabase room = ImportingLessSafeDatabase.gimme(ctxt);
 SupportSQLiteDatabase db=room.getOpenHelper().getWritableDatabase();
 try {
  assertTrue(db.isWriteAheadLoggingEnabled());
 }
 finally {
  room.close();
 }
}
origin: commonsguy/cwac-saferoom

@Test
public void safe() {
 final Context ctxt=InstrumentationRegistry.getTargetContext();
 SQLiteDatabase.loadLibs(ctxt);
 SQLiteOpenHelper helper = new SafeNonRoomHelper(ctxt);
 helper.getWritableDatabase(PASSPHRASE);
 helper.close();
 ImportingSafeDatabase room = ImportingSafeDatabase.gimme(ctxt);
 SupportSQLiteDatabase db=room.getOpenHelper().getWritableDatabase();
 try {
  assertTrue(db.isWriteAheadLoggingEnabled());
 }
 finally {
  room.close();
 }
}
androidx.sqlite.dbSupportSQLiteDatabaseisWriteAheadLoggingEnabled

Popular methods of SupportSQLiteDatabase

  • execSQL
  • close
  • query
  • beginTransaction
  • disableWriteAheadLogging
  • endTransaction
  • insert
  • setTransactionSuccessful
  • enableWriteAheadLogging
  • getPath
  • inTransaction
  • isOpen
  • inTransaction,
  • isOpen,
  • setForeignKeyConstraintsEnabled,
  • update

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • String (java.lang)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now