| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
If the query is not cacheable, we were adding string literals unquoted.
Oops.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were some special cases that were handled individually:
- select * { <s> ?p ?o } was handled through querying the rdf:types of <s>,
and performing an UNION of all related tables. This doesn't play along
with parameterized variables where the subject might be a variable assigned
later through the TrackerSparqlStatement.
- select * { ?s ?p <o> } used similar tricks (querying <o> this time). It had
all those drawbacks, plus it only worked for properties with rdfs:Resource
range.
- select * { ?s ?p ?o . ?p rdfs:domain <dom> } was handled specially.
- select * { ?s ?p ?o } is unsupported
- select * { <s> ?p <o> } was silently unhandled
All those combinations are transparently handled with the tracker_triples
virtual table now.
|
|
|
|
|
| |
This table may be used in either select or update queries, so make sure it
gets initialized in all paths.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This eponymous virtual table is able to decompose the full database
in all its composing triples. This may be used to implement queries
with predicate variables in a generic way, and finally support the
kind of queries where we gave up (e.g. "select * { ?s ?p ?o }").
Internally it works by using the TrackerOntologies in order to
split the query into a set of queries for individual
properties/columns, some optimizations happen when specific matches
are given, and the SQLite engine does take care of the ones we don't
optimize, sorting, etc...
This virtual table will also be useful in the future when implementing
CONSTRUCT/DESCRIBE commands.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
See: https://gitlab.gnome.org/GNOME/tracker/merge_requests/53
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure to use GPOINTER_TO_UINT when using g_hash_table_lookup_extended() to
prevent stack smashing. This will make sure that in the architectures where
sizeof(GFileMonitorEvent) < sizeof(gpointer), g_hash_table_lookup_extended()
will not write more bytes than prev_event_type can hold.
Fixes: https://gitlab.gnome.org/GNOME/tracker/issues/71
|
| | |
|
| | |
|
|\ \
| |/
|/|
| | |
See: https://gitlab.gnome.org/GNOME/tracker/merge_requests/52
|
|/ |
|
|
|
|
| |
(cherry picked from commit 1594c2dd554170735f76c9045d18823d2635aefa)
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
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 corresponds with a fix from tracker-miners.git in
https://gitlab.gnome.org/GNOME/tracker-miners/merge_requests/27.
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | | |
This removes support for running the tests with Python 2.6 and older.
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The container image used for CI is now built from a project in the
gitlab.gnome.org/GNOME/ namespace, rather than my personal namespace.
|
|\ \ \ \ |
|
| | |/ /
| |/| | |
|
| |/ /
|/| | |
|
|\ \ \
| |/ /
|/| |
| | | |
See https://gitlab.gnome.org/GNOME/tracker/merge_requests/49
|
|/ /
| |
| |
| |
| |
| |
| | |
Changes incorrect plural to singular form in
src/tracker/tracker-status.c
Closes https://gitlab.gnome.org/GNOME/tracker/issues/68
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
| |
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
|