You can just concat using SQLite string concatenation.
@Query("SELECT * FROM hamster WHERE name LIKE '%' || :search || '%'")
fun loadHamsters(search: String?): Flowable<List<Hamster>>
More Related Contents:
- Android Room – simple select query – Cannot access database on the main thread
- Room Persistence: Error:Entities and Pojos must have a usable public constructor
- How can I represent a “many to many” relation with Android Room when column names are same?
- How to save enum field in the database room?
- How to make primary key as autoincrement for Room Persistence lib
- startForeground fail after upgrade to Android 8.1
- Android Persistence room: “Cannot figure out how to read this field from a cursor”
- How to fix ERROR: No signature of method: build_ap86oam3dut3pxce3x49rdtma.android()?
- Kotlin Error : Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.0.7
- Android room persistent library – TypeConverter error of error: Cannot figure out how to save field to database”
- Error: Execution failed for task ‘:app:clean’. Unable to delete file
- How are Android activities handled with Jetpack Compose and Compose Navigation?
- The ‘kotlin-android-extensions’ Gradle plugin is deprecated
- Why a viewmodel factory is needed in Android?
- Jetpack Compose collapsing toolbar
- Could not deserialize object. Class does not define a no-argument constructor.If you are using ProGuard, make sure these constructors are not stripped
- Android room persistent library – how to insert class that has a List object field
- Jetpack Compose Smart Recomposition
- No Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator
- Can’t create new Kotlin project after updating to Android Studio 4.2
- ‘setHasOptionsMenu(Boolean): Unit’ is deprecated. Deprecated in Java
- Room : LiveData from Dao will trigger Observer.onChanged on every Update, even if the LiveData value has no change
- FirebaseMessaging.getInstance(firebaseApp) for secondary app supposed to be public but it’s private?
- Execution failed for task ‘:app:checkReleaseDuplicateClasses’
- Close/hide the Android Soft Keyboard with Kotlin
- How I can retrieve current fragment in NavHostFragment?
- Kotlin Coroutines the right way in Android
- FragmentTransaction hide/show doesn’t work sometimes
- Kotlin Android debounce
- kotlin-stdlib-jre7 is deprecated. Please use kotlin-stdlib-jdk7 instead