summaryrefslogtreecommitdiff
path: root/src/libtracker-sparql/tracker-cursor.h
Commit message (Collapse)AuthorAgeFilesLines
* libtracker-sparql: Update library API documentationCarlos Garnacho2023-02-271-6/+0
| | | | | | Port references and links to the gi-docgen format, and while at it flesh out some more documentation and adjust formatting to look better with the gi-docgen templates.
* libtracker-sparql: Deprecate tracker_sparql_cursor_rewind()Carlos Garnacho2023-01-111-1/+1
| | | | | | | | | | | | | | | | This function cannot be honored across all TrackerSparqlCursor implementation (direct one works, FD based ones only work as long as the FD is seekable). The alternative to make this call work everywhere is to buffer the FD contents (e.g. through a GBufferedInputStream), so rewinding happens in the in-memory buffer, but that pushes the need on all implementation to do this and cache full documents just for the extremely unlikely case that the cursor is rewound. This is not great, and the operation can be easily avoided (handle all effects from the cursor at once, or issue 2 queries), so deprecate this API call to avoid encouragement.
* libtracker-sparql: Add datetime helpers for statements and cursornis1302021-04-151-0/+3
| | | | | | | Currently one needs to convert the datetime manually to a string now GDateTime value can be easily binded to a statement Fixes #270
* Add G_BEGIN/END_DECLS to remaining headers included from tracker-sparql.hPekka Vuorela2021-04-141-0/+4
| | | | Already in some but not all.
* libtracker-sparql: Make class structs privateCarlos Garnacho2020-02-171-34/+0
| | | | | | No object in the public API is meant to be subclassed, hide the class definitions so we have room to extend those at will in the future.
* libtracker-sparql: Add define to export library functionsCarlos Garnacho2020-02-171-0/+16
| | | | | | | | | | And get rid of the map file. This allows us to selectively make API public, so we no longer need it, nor regexps. Also, add the beginning of TRACKER_AVAILABLE_IN_* defines, so we can help with testing minor version changes, add deprecation warnings, etc. So far we're heading towards 3.0, all public API started using this with TRACKER_AVAILABLE_IN_ALL, since we're bumping major version.
* libtracker-sparql: Reimplement public API in CCarlos Garnacho2020-02-171-0/+135
It is risky and clunky to have API/ABI in control of a transpiler like Vala is. Examples are: - Defining the abstract classes in vala necessarily exports these *_construct() functions, which are 100% useless as public API since no subclassing of Tracker objects is whatsoever allowed outside of Tracker. - While on the *_construct() functions topic, adding a constructor like tracker_sparql_connetion_new() somehow made valac stop exporting one for TrackerSparqlConnection. The warnings are somehow eaten when compiling the resulting C code, but hell breaks loose when the C compiler assumes an int return value (because it can't know better) but the constructor has a pointer-sized return value. Since those functions are exported, this change sneakily involves an ABI break too. - Even though we want some properties to be construct-only, vala will automatically export setter functions for those. This adds API like tracker_sparql_statement_set_connection() that can only break things if ever called. - The --abi-stability valac toggle was added too late for Tracker to use it. We could use 3.0 as an excuse to turn it on, but that doesn't magically fix the other points. - Vala doesn't allow us to be explicit wrt the exported functions (eg. through extern). We do resort to a .map file, but that's prone to errors and hairy to maintain. We still use vala at places for internal code, but I can't bring myself to think it's a good idea to keep vala in charge of our public API and ABI.