sqldelight icon indicating copy to clipboard operation
sqldelight copied to clipboard

Annotate blocking API

Open bubenheimer opened this issue 3 years ago • 0 comments

I'd like to flag blocking SqlDelight API calls in suspending code. For my own APIs I can do this by adding an annotation on a blocking API definition, and adding the annotation class in the Inappropriate thread-blocking method call Android Studio inspection configuration.

The main SqlDelight APIs I have in mind are generated DML functions (insert/update/delete), plus the various runtime API functions for transaction wrapping and query execution. Perhaps it would even be possible to have the plugin automatically add the annotation class to the inspection.

I imagine this feature may be of general interest.

bubenheimer avatar Jun 08 '21 18:06 bubenheimer