I am working on custom function of Sqlite on Xamarin.iOS. I got answer from here : Show markers on map within a given radius (Xamarin.Android) but I am running into issue of
Attempting to JIT compile method '(wrapper native-to-managed) Mono.Data.Sqlite.SqliteFunction:ScalarCallback (intptr,int,intptr)' while running with --aot-only.
After searching on stack I found that here is a solution: custom functions SQLite with Mono but solution mention there is tough for me to understand.
I am not sure how to annotate method with MonoPInvokeCallbackAttribute
and make it static because method in SqliteFunction class is overriden so, can't make it static.
It would be great if somebody can help me in understand that solution or provide missing steps on that solution.
I use the popular
sqlite-net
(by Frank A. Krueger) and it in turn usesSQLitePCLRaw.bundle_green
andSQLitePCL.raw
(both by Eric Sink).Thus, you can use
SQLitePCLRaw.ugly
-based API to easily setup and access SQLite UDFs.A
Xamarin.iOS
-basedSQLite
User Defined Function (UDF
):Usage:
Using
sqlite-net-pcl
to setup tables, load/update data, .....Using
SQLitePCLRaw.ugly
to create and query w/ a SQLite UDF