Get a Room
summary
Room is a compile-time code generator over SQLite that uses @Entity/@Dao/@Database annotations to map POJOs (example schema: tracks and sessions), requires constructors for final fields, and creates integer autoincrement primary keys by default. Relations use separate queries or a transaction-wrapped relation (to avoid race conditions and the megabyte cursor-window problem). Queries can return synchronous results, LiveData vs RxJava reactive types, and Room can be wired to SQLCipher (via an open-helper factory) to produce an encrypted DB; the generated code and demos compile and run.
AI-written summary · about
