NoteDatabase

abstract class NoteDatabase : RoomDatabase

The main database class for the application, built using Room. This class defines the database configuration and serves as the main access point to the persisted data.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Companion object to provide a singleton instance of the NoteDatabase. This ensures that only one instance of the database is created throughout the application's lifecycle, which is important for performance and data consistency.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isOpen: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun beginTransaction()
Link copied to clipboard
abstract fun clearAllTables()
Link copied to clipboard
open fun close()
Link copied to clipboard
Link copied to clipboard
open fun endTransaction()
Link copied to clipboard
Link copied to clipboard
open fun <T> getTypeConverter(klass: Class<T>): T?
Link copied to clipboard
open fun init(configuration: DatabaseConfiguration)
Link copied to clipboard
Link copied to clipboard
abstract fun noteDao(): NoteDao

Abstract method to get an instance of the NoteDao. Room will generate the implementation for this method. This provides access to the Data Access Object for interacting with the 'notes' table.

Link copied to clipboard
open fun query(query: String, args: Array<out Any?>?): Cursor
Link copied to clipboard
open fun runInTransaction(body: Runnable)
open fun <V> runInTransaction(body: Callable<V>): V
Link copied to clipboard