Hi,

I'm trying to create a custom function for a SQLite database with Qt aswell. I have a table with items stored with geographic locations as latitude and longitude in degrees. I want to be able to perform a SELECT on this table and ORDER BY each row's distance from an arbitrary point. Hence, I need to create a distance function.

My problem is that I can't figure out where to get the definition for the sqlite3 struct. The code below will not compile as sqlite3 is not defined.

Qt Code:
  1. // Create a handler and attach functions.
  2. sqlite3* handler = *static_cast<sqlite3**>(v.data());
  3. if (!handler) {
  4. LOG_WARNING("Cannot get a sqlite3 handler.");
  5. return false;
  6. }
To copy to clipboard, switch view to plain text mode 

Any hint would be appreciated.