I've implemented SupportSQLiteOpenHelper.Factory
to open a spatialite database (sqlite with spatial functions). However when my queries use spatialite functions such as ST_AREA
, Room complains that no such function exists. Is there a way to tell room about these custom functions or configure it to skip function checking?
Asked
Active
Viewed 430 times
8

kptlronyttcna
- 1,461
- 1
- 16
- 22
-
2Possible duplicate of [Calling custom SQLite functions in Room](https://stackoverflow.com/questions/56043431/calling-custom-sqlite-functions-in-room) – Daniel Rust May 11 '19 at 03:45
1 Answers
0
Room can't verify queries with custom functions, please annotate your method with @SkipQueryVerification.
Room verifies your Dao queries using sqlite-jdbc which uses a vanilla prebuilt SQLite native library which doesn't have your custom functions and thus causes the verifier to fail. However, with the @SkipQueryVerification you can make Room skip verifying that query allowing you to still use Room but losing the ability to verify the query at runtime.

Devesh mehta
- 1,505
- 8
- 22