I'm using the sqlite C API.
"Everything" is run in the main function (variables, open, execute a query, close the database, etc.)
In addition, I would like to now create separate user defined functions where I do, for example, a sort on the database.
What is the best method to pass the db objects and variables from main to this new function? Create them all as globals? Pass by reference? Is this what the Sqlite3_create_function is for?
Please let me know how I can clarify this question if needed.
Thanks.