| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Alternative, recursive, optional paths are tested, and combinations
of those.
|
|
|
|
|
|
|
|
|
| |
The alternative path operator '|' allows multiplexing the ways to get a
value. For example:
{ ?u nie:title|nfo:fileName 'foo' }
will return elements whose title or filename matches the given string.
|
|
|
|
|
|
|
|
|
|
| |
All three modifiers in PathMod are implemented now:
- ?(zero or one): { ?u nfo:belongsToContainer? ?c } returns direct
children of ?c, plus ?c itself.
- *(zero or more): { ?u nfo:belongsToContainer* ?c } returns all children
of ?c recursively, including ?c itself.
- +(one or more): { ?u nfo:belongsToContainer+ ?c } returns all children
of ?c recursively.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using the WITH clause is already a pre-requisite for * and + operators
(as those queries need to be recursive). It then struck me that using
it for all path operators is simpler and easier to read both in code and
SQL, for starters:
- We were going long ways to invert the processing order of VerbPath and
ObjectList, so the latter would be handled within the former. This was
necessary so we could eg. invert subject and object in ^.
- Each property path element results in a rather simple SELECT in the
WITH clause, and nesting those comes off naturally. This is handy as
a property path is actually an expression tree, which we weren't
handling that well.
As a first step, add this infrastructure for property paths using the WITH
clause and use it for the currently supported operators.
We still fall through the usual code paths (no subqueries in WITH clause)
if the property path is formed of a single literal with no operators
(i.e. the good old "?s foo:bar ?o" case). This is still necessary for
fts:match (which is not really a property, thus can't be used in property
paths) and rdfs:domain special casing (which just applies if the predicate
is a variable, not the case with property paths).
|
|
|
|
|
| |
The TrackerDataManagers were not properly shutdown, thus leaking memory
and FDs. Adding more tests makes the latter noticeable.
|
|
|
|
| |
So we don't implicitly rely on the query/implementation underneath.
|
|
|
|
|
|
|
|
| |
This is mentioned in the spec, and was correctly handled in the previous
parser (although the comment mentioned text from a similar restriction with
CONSTRUCT). Solutions with unbound variables should simply be ignored,
this was kinda the case but just detected through g_return_if_fail() later
on.
|
| |
|
|\
| |
| |
| | |
See: https://gitlab.gnome.org/GNOME/tracker/merge_requests/44/commits
|
| |
| |
| |
| | |
Fixes: https://gitlab.gnome.org/GNOME/tracker/issues/66
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
That will issue an update of all tables, so the FTS view might be
affected. This is not caught by ontology change tests, as this
is a situation that can only happen when migrating from 1.x databases
ATM.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
So we can catch things going wrong in FTS table updates. The added steps
check:
- Addition of new FTS properties
- Unrelated modification of tables affected by the FTS view
- Cardinality changes in existing FTS properties
- Deleting FTS properties
|
| |
| |
| |
| |
| |
| |
| | |
This value is cached, but may change during database initialization,
making the TrackerProperty point to an incorrect table. The test update
in the following commit reproduces this situation, and would fail without
this in place.
|
| |
| |
| |
| |
| | |
So we don't possibly fail when opening an stale database from previous
runs.
|
|/
|
|
|
|
|
|
|
|
|
| |
This presumably was made to actually test ontology changes through
rebuilding from the journal. The catch is that it was made to look into the
wrong directory, so in essence we are testing live ontology updates.
Such test might be added to tracker-db-journal-test, and only if journal is
enabled. It is not a situation that will be triggered nowadays, and it is
preferable to keep the current actual behavior of the test, so just delete
this code to make it clearer.
|
|\
| |
| |
| | |
See: https://gitlab.gnome.org/GNOME/tracker/merge_requests/41
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We don't need to store the full path build filename
in comments in the header files.
This change was recommended by the Reproducible Builds
project.
https://reproducible-builds.org/
https://bugs.debian.org/915503
|
|\ \
| | |
| | |
| | | |
See: https://gitlab.gnome.org/GNOME/tracker/merge_requests/42
|
| |/
| |
| |
| | |
Fixes: https://gitlab.gnome.org/GNOME/tracker/issues/62
|
|\ \
| | |
| | |
| | | |
See: https://gitlab.gnome.org/GNOME/tracker/merge_requests/43
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Allow running tests without the need to install the gsettings schemas.
This commit moves all the gschemas in the data directory and compiles
them in the build directory. Tests that require gschemas need to be
launched with the proper GSETTINGS_SCHEMA_DIR env variable.
Fixes: https://gitlab.gnome.org/GNOME/tracker/issues/60
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
| |
We need to clean up on errors. There isn't a 'standard' way to do this,
so this script needs to explicitly depend on Bash.
Fixes https://gitlab.gnome.org/GNOME/tracker-miners/issues/42
|
|
|
|
|
|
|
|
|
| |
This got lost in the new parser, fixes a tracker-writeback query involving
variables in graph and predicate. Pointed out by Sam Thursfield on
https://gitlab.gnome.org/GNOME/tracker-miners/merge_requests/27#note_367289
Enabling the return_graph variable, we create the appropriate column and
the "no such column: predicate1.graph" error goes away.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Dropping that possibly fixes coalescing of URNs and datetimes with
other types transparently handled by SQLite. Eg. this broke the
"tracker search" CLI subcommand, where it uses:
SELECT COALESCE(nie:url(?u), ?u) ...
This resulted in "tracker search foo" returning "(null)" as the
file uri/urn.
We must translate each Expression to string so that correctly results
in the URL string being coalesced with the URN string. This is the
expected result, and a regression compared to the older parser.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This results in eg. URN strings or ISO8601 dates being passed to
those if used in one such function, instead of ROWIDs or timestamps.
It's unclear how that should behave as per the spec, this is however
what the old parser did, so better to stick to the same implementation
defined behavior.
|
|/
|
|
|
|
|
| |
The Expression element may be used in several places (eg. ArgList or
ExpressionList in functions) that may require them to be converted
to string, add a builtin toggle in the state so this can ben done
easily.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We must propagate the original types, despite converting the
resultset to string in the topmost select. Fixes warnings in the
bus backend (seen with several flatpak apps), since it's not as
lenient as the direct one wrt fetching values with the "wrong"
vfunc.
|
|
|
|
|
|
|
|
| |
The data != null check in get_string() really happens because of
fetching values on a finished or not yet started cursor, so make
it clearer to reason about.
This is of course a programming error.
|
|
|
|
|
| |
It says "NULL is returned if column is not between [0,n_columns]",
says nothing about it being a programming error though.
|
|
|
|
|
|
| |
We were missing it in the "SELECT ?a AS ?b ..." case, breaking
those types that require a conversion to string when exposed
through a cursor (resource, and presumably date/datetime).
|
|
|
|
|
|
|
| |
Unbound variables are unexpected/meaningless here, the spec says
nothing about raising errors though, and other SPARQL engines seem
to agree about it being a no-op. So just go with it and avoid
the crash.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
The blank node map must be set up there, both for the URN storage
aspect and the GVariant generation one.
Closes: https://gitlab.gnome.org/GNOME/tracker/issues/56
|
|/
|
|
|
| |
The blank node map must be set up there, both for the URN storage
aspect and the GVariant generation one.
|
|
|
|
|
|
|
|
| |
Commit c58f7aa419 late in wip/carlosg/sparql-parser-ng wrongly made this
dependent on the query being an update_blank() one (i.e. we need to
generate a GVariant with blank node results to give back). This actually
defeated the path where we generate unique URNs for blank nodes on inserts,
resulting in simple urns like <1> being generated.
|
|
|
|
|
|
| |
The SPARQL protocol is supposedly case insensitive, and
TrackerResource uses "TRUE"/"FALSE" for boolean strings. We must
use caseless comparion or we get false negatives.
|
| |
|
|
|
|
|
| |
The SPARQL was referring to a non-existent variable, which
older parser used to ignore.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the right conditions apply, tracker-store will shut down
after 30s of inactivity (no clients doing updates/selects).
Bringing it back again is relatively cheap, so let's see how
this flies.
For the cases it won't, tracker-store has a --disable-shutdown
switch (also useful for testing from terminal), also running on
other buses than the session one will disable it, since both
shutting down and later restart pose questions and risks.
In theory, this will make tracker-store disappear 99% of the
time, since database updates are sparse. There's also the
possibility of clients running with TRACKER_SPARQL_BACKEND=bus
or resorting to bus connection (eg. flatpak apps), that will
make selects go through tracker-store.
|
| |
| |
| |
| |
| | |
This no longer makes sense with tracker-store automatic shutdown, assume
the activatable through DBus and keep the miner running in that situation.
|