I tried to execute this query in xamarin
SELECT * FROM GPSPoint WHERE SQRT( POW({0}-lat,2) + POW({1}-lng,2) ) < 5*5
But it gave me the error message
SQLite.SQLiteException: no such function: SQRT
And after searching I found that Android developers can use the sqlite3_create_function method to create new functions in SQLite.
How can I do the same thing in xamarin?
WHERE col = valuevar query = conn.Query<GPSPoint>(string.Format("SELECT * FROM GPSPoint WHERE SQRT( POW({0}-lat,2) + POW({1}-lng,2) ) < 5*5", lat, lng));