Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

dao function to check if database contains value

@Query("SELECT EXISTS (SELECT 1 FROM example_table WHERE id = :id)")
fun exists(id: Int): Boolean
 
PREVIOUS NEXT
Tagged: #dao #function #check #database
ADD COMMENT
Topic
Name
6+3 =