| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per the spec (https://www.w3.org/TR/sparql11-query/#BGPsparqlBNodes):
Since SPARQL treats blank node identifiers in a results format document
as scoped to the document, they cannot be understood as identifying
nodes in the active graph of the dataset.
This is precisely what tracker_sparql_connection_update_blank() (and async
variant) are doing. While that works given the interpretation of blank
nodes in a TrackerSparqlConnection with default flags, this is precisely
what TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES implements, and at
best it is not great to advise this inconsistency as public API.
It is best to deprecate this set of functions, any user should devise
their own IRI generation scheme, instead of relying on blank nodes being
sort of one.
|
| |
|
|
|
|
|
|
| |
This will be used from more public headers than the connection's, and
it's easier to move to a separate header than shuffling header dependencies
so other users pull tracker-connection.h
|
|
|
|
|
|
|
|
|
| |
This API takes a GInputStream containing RDF data (loaded from a
file, obtained from tracker_sparql_connection_serialize on another
connection, ...) and loads it into the TrackerSparqlConnection.
So far it's an empty stub, implementations will be added in direct
and dbus connections.
|
|
|
|
|
|
|
|
|
|
|
| |
This API call allows hooking up a local TrackerSparqlConnection into
another, so it is possible to access other local connections from
one of them. This happens via the SERVICE SPARQL syntax, using
special local:$handle_name URIs.
This may be useful if there is data with different relevance (e.g.
cache vs persistent) that the application is interested in maintaining
separately, but query altogether.
|
|
|
|
|
| |
This is currently unused, but might be used for future expansion points (e.g.
hint the desire for pretty RDF)
|
|
|
|
|
|
| |
This format is similar to turtle, but allows keeping graph information.
It might be more convenient for exporting/importing sometimes, so support
serializing to this format.
|
|
|
|
|
|
| |
This new call serializes a DESCRIBE or CONSTRUCT query into one of the
supported RDF formats. This may be useful in a number of situations,
such as data exporting, and bulk migrations.
|
|
|
|
|
|
|
| |
This is a default behavior of SPARQL that we deviate from. Add a
new TrackerSparqlConnectionFlags value that will be used to honor this.
Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/148
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This TrackerSparqlConnection method creates a TrackerSparqlStatement from
a query located in a resource path. This could allow a better code/model
separation where all Tracker resources are separately editable in the
source tree (e.g. distinct per-query .rq files, with syntax highlighting,
etc), and still directly available at runtime without further disk reads.
There's other nice side effects of this, like having queries nicely
indented in logging output (instead of the usual string concatenation in
code that makes queries alright to see in the source code, but a mess when
logged), or avoiding hard to follow code changes (e.g. mass reindenting)
when only query changes are required. Also, queries would be easily
readable with the "gresource list/extract" command line tool without
looking across the source code.
|
|
|
|
| |
Already in some but not all.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bus connection started creating a dbus proxy that we did not need
to autostart, nor read properties from, so we could initially afford
to not have an asynchronous version.
But later we added more things on it, like session registration in the
portal, and pings to check for direct access permissions within a
possible sandbox.
It now makes sense to have that async variant, so add one.
|
|
|
|
|
| |
This API allows pushing a series of update commands, in either SPARQL or
TrackerResource form. This is committed as a single transaction.
|
|
|
|
|
| |
And an async variant. This takes a TrackerResource and pushes it directly
to the DB.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should not return TrackerDBInterfaceError, from the internal
libtracker-data library, from public functions in libtracker-sparql.
This problem is noticable as we register D-Bus error codes only for the
public TrackerSparqlError type.
Before, apps would show error messages like this:
GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._tracker_2ddb_2dinterface_2derror_2dquark.Code0: example error message
After this patch, the error is:
GDBus.Error:org.freedesktop.Tracker.Error.QueryFailed: example error message
|
|
|
|
| |
Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/218
|
|
|
|
| |
Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/218
|
|
|
|
|
|
|
|
| |
URNs are the preferred way to identify resources in a tracker store,
don't treat them as an afterthought here and query the URNs right
away. Drop the flags argument entirely as it becomes unneeded, any
further information cannot be inferred and should be performed by
the user.
|
|
|
|
|
|
|
|
|
|
| |
DBus errors before:
gi.repository.GLib.GError: tracker-sparql-error-quark: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._tracker_2dsparql_2derror_2dquark.Code0: Parser error at byte 0: Expected Query (0)
DBus errors now:
gi.repository.GLib.GError: tracker-sparql-error-quark: GDBus.Error:org.freedesktop.Tracker.Error.Parse: Parser error at byte 0: Expected Query (0)
|
|
|
|
|
|
| |
Since a0efd1972b122d0a2 it was possible to crash by passing a NULL
ontology path to tracker_sparql_connection_new(). Now we raise an
error instead.
|
|
|
|
|
| |
Since it may be "expensive" with a big amount of pending requests, add
an async variant so it doesn't have to block the main loop.
|
|
|
|
|
|
|
|
|
|
| |
Those flags are based on the FTS gschema settings, although kind of
reduced. The flags are propagated down the FTS parser, and stored/
checked as main DB metadata, so we catch changes in those and rebuild
FTS tokens accordingly.
Readonly connections will not be able to issue any changes, and will
go with the settings as stored in the metadata table.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
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.
|