@TypeConverters({ComponentNameTypeConverter.class}) @Query("SELECT COUNT(distinct imageUri) FROM artwork " + "WHERE sourceComponentName = :sourceComponentName") public abstract int getArtworkCountForSourceBlocking(ComponentName sourceComponentName);
@TypeConverters({ComponentNameTypeConverter.class}) @Query("SELECT * FROM artwork WHERE sourceComponentName = :sourceComponentName " + "ORDER BY date_added DESC") public abstract List<Artwork> getArtworkForSourceBlocking(ComponentName sourceComponentName);
@TypeConverters(UriTypeConverter.class) @Query("SELECT * FROM artwork WHERE imageUri=:imageUri ORDER BY date_added DESC") public abstract List<Artwork> getArtworkByImageUri(Uri imageUri);
@TypeConverters(ComponentNameTypeConverter.class) @Query("SELECT * FROM artwork WHERE sourceComponentName=:sourceComponentName") abstract Cursor getArtworkCursorForSourceBlocking(ComponentName sourceComponentName);
@TypeConverters(ComponentNameTypeConverter.class) @Query("DELETE FROM artwork WHERE sourceComponentName = :sourceComponentName " + "AND _id NOT IN (:ids)") abstract void deleteNonMatchingInternal(ComponentName sourceComponentName, List<Long> ids);
@TypeConverters(UriTypeConverter.class) @Query("DELETE FROM artwork WHERE imageUri=:imageUri") public abstract void deleteByImageUriInternal(Uri imageUri);
@TypeConverters(UriTypeConverter.class) @Query("SELECT * FROM artwork WHERE imageUri=:imageUri AND _id IN (:ids)") abstract List<Artwork> findMatchingByImageUri(Uri imageUri, List<Long> ids);
@TypeConverters(ComponentNameTypeConverter.class) @Query("SELECT component_name FROM sources") List<ComponentName> getSourceComponentNamesBlocking();
@TypeConverters(ComponentNameTypeConverter.class) @Query("SELECT component_name FROM sources WHERE component_name LIKE :packageName || '%'") List<ComponentName> getSourcesComponentNamesByPackageNameBlocking(String packageName);
@TypeConverters(ComponentNameTypeConverter.class) @Query("SELECT * FROM sources WHERE component_name = :componentName") Source getSourceByComponentNameBlocking(ComponentName componentName);
@TypeConverters({ComponentNameTypeConverter.class}) @Query("DELETE FROM sources WHERE component_name IN (:componentNames)") void deleteAll(ComponentName[] componentNames);
@TypeConverters(UriTypeConverter.class) @Query("SELECT * FROM metadata_cache WHERE uri = :uri") Metadata getMetadataForUri(Uri uri);