Android Room 2.1.0-alpha03 @DatabaseView Missing syntax check and view name

Viewed 191

I'm using roomVersion = '2.1.0-alpha03' on the AndroidX branch

// Room (androidx)
implementation "androidx.room:room-runtime:$rootProject.roomVersion"
implementation "androidx.room:room-rxjava2:$rootProject.roomVersion"
implementation "androidx.room:room-guava:$rootProject.roomVersion"
testImplementation "androidx.room:room-testing:$rootProject.roomVersion"
annotationProcessor "androidx.room:room-compiler:$rootProject.roomVersion"

Here is my @DatabaseView query:

@DatabaseView("SELECT * FROM DataPointJoin " +
    "INNER JOIN Device ON Device.device_uid = DataPointJoin.device_uid " +
    "INNER JOIN Measurement ON Measurement.measurement_uid = DataPointJoin.measurement_uid " +
    "INNER JOIN Location ON Location.location_uid = DataPointJoin.location_uid " +
    "INNER JOIN User ON User.user_uid = DataPointJoin.user_uid " +
    "INNER JOIN SyncRecord ON SyncRecord.sync_uid = DataPointJoin.uid ")

And here is an example of how I'm using it:

@Query("SELECT * FROM DataPoint WHERE DataPoint.uid = :uid")
Flowable<Optional<DataPoint>> get(String uid);

When using the @DatabaseView() to encapsulate a join into a View, and after clean and rebuild:

  1. My @DatabaseView query isn't checked or highlighted like in @Query(), just a plain long string. enter image description here
  2. Compiles, but IDE can't resolve the View symbol. enter image description here
0 Answers
Related