How to print query in Room
? Not the query written in dao but the query generated by room itself.
For every DAO class you add to your project marked with @Dao
Room generate a class that implement your class. Hence for operations like Insert, Update and Delete that you don't provide any query Room will create a query itself. You can see this generated classes in the following file inside your project:
{root project}/app/build/generated/source/apt
, now navigate to the package that contains DAO classes and you will see classes like IssueDao_Impl.java
. Inside this class you will see queries like this:
"INSERT OR REPLACE INTO `Issue`(`id`,`displayOrder`,`pdf`,`date`,`purchasable`,`source_id`,`thumb`,`full`,`mobile`,`width`,`height`,`download_count`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)";
, created with the help of the annotations you did inside your class. Cheers!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With