summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libtracker-data: Add quotes around string literalwip/carlosg/unrestricted-predicatesCarlos Garnacho2019-02-061-0/+4
| | | | | If the query is not cacheable, we were adding string literals unquoted. Oops.
* libtracker-data: Use "tracker_triples" table in variable predicate queriesCarlos Garnacho2019-02-064-379/+11
| | | | | | | | | | | | | | | | | 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.
* libtracker-data: Initialize "tracker_triples" virtual table on all interfacesCarlos Garnacho2019-02-065-1/+31
| | | | | This table may be used in either select or update queries, so make sure it gets initialized in all paths.
* libtracker-data: Add "triples" virtual tableCarlos Garnacho2019-02-063-0/+562
| | | | | | | | | | | | | | | | 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.
* Update Turkish translationSabri Ünal2019-02-051-507/+518
|
* Update Indonesian translationKukuh Syafaat2019-02-021-500/+525
|
* Update Friulian translationFabio Tomat2019-02-021-106/+105
|
* Update Romanian translationDaniel Șerbănescu2019-01-311-516/+529
|
* Update Galician translationFran Dieguez2019-01-291-517/+531
|
* Update Hungarian translationBalázs Úr2019-01-271-1415/+514
|
* Merge branch 'azzaronea/tracker-fix-issue-71' into HEADSam Thursfield2019-01-261-2/+4
|\ | | | | | | See: https://gitlab.gnome.org/GNOME/tracker/merge_requests/53
| * tracker-monitor: Prevent stack smashingAndrea Azzarone2019-01-241-2/+4
| | | | | | | | | | | | | | | | | | 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
* | Updated Slovenian translationMatej Urbančič2019-01-251-105/+105
| |
* | Update Greek translationEfstathios Iosifidis2019-01-201-111/+113
| |
* | Merge branch 'azzaronea/tracker-tmp-dir-tracker-backup-test' into HEADSam Thursfield2019-01-191-1/+3
|\ \ | |/ |/| | | See: https://gitlab.gnome.org/GNOME/tracker/merge_requests/52
| * tests: Use tmp dir on testsAndrea Azzarone2019-01-181-1/+3
|/
* Update French translationCharles Monzat2019-01-171-12/+11
| | | | (cherry picked from commit 1594c2dd554170735f76c9045d18823d2635aefa)
* Update Polish translationPiotr Drąg2019-01-171-507/+501
|
* Merge branch 'wip/carlosg/property-paths'Carlos Garnacho2019-01-1331-73/+528
|\
| * tests: Add a bunch of property path testswip/carlosg/property-pathsCarlos Garnacho2018-12-2625-0/+56
| | | | | | | | | | Alternative, recursive, optional paths are tested, and combinations of those.
| * libtracker-data: Implement alternative path sequencesCarlos Garnacho2018-12-261-5/+47
| | | | | | | | | | | | | | | | | | 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.
| * libtracker-data: Implement PathModCarlos Garnacho2018-12-261-1/+59
| | | | | | | | | | | | | | | | | | | | 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.
| * libtracker-data: Handle current path operators through WITH clauseCarlos Garnacho2018-12-263-67/+364
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| * tests: Shutdown data manager in tracker-sparql-testCarlos Garnacho2018-12-261-0/+2
| | | | | | | | | | The TrackerDataManagers were not properly shutdown, thus leaking memory and FDs. Adding more tests makes the latter noticeable.
| * tests: Ensure ordering in property path testsCarlos Garnacho2018-12-263-3/+3
| | | | | | | | So we don't implicitly rely on the query/implementation underneath.
* | Merge branch 'sam/ft-dirs'Carlos Garnacho2019-01-132-35/+26
|\ \
| * | functional-tests: Rationalize handling of test directoriesSam Thursfield2019-01-052-35/+26
| | | | | | | | | | | | | | | This corresponds with a fix from tracker-miners.git in https://gitlab.gnome.org/GNOME/tracker-miners/merge_requests/27.
* | | Merge branch 'sam/ft-python2.7'Carlos Garnacho2019-01-1332-2631/+19
|\ \ \
| * | | functional-tests: Remove bundled unittest2 librarySam Thursfield2019-01-0532-2631/+19
| |/ / | | | | | | | | | This removes support for running the tests with Python 2.6 and older.
* | | Merge branch 'sam/ci-image-url'Carlos Garnacho2019-01-121-1/+1
|\ \ \
| * | | ci: Update container image URLSam Thursfield2019-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | The container image used for CI is now built from a project in the gitlab.gnome.org/GNOME/ namespace, rather than my personal namespace.
* | | | Merge branch 'sam/autotools-files'Carlos Garnacho2019-01-123-790/+0
|\ \ \ \
| * | | | Remove some vestigal Autotools filesSam Thursfield2019-01-053-790/+0
| | |/ / | |/| |
* | | | Updated Spanish translationDaniel Mustieles2019-01-081-108/+109
| |/ / |/| |
* | | Merge branch 'Pranav1999/tracker-my_work' into HEADSam Thursfield2019-01-051-1/+1
|\ \ \ | |/ / |/| | | | | See https://gitlab.gnome.org/GNOME/tracker/merge_requests/49
| * | tracker-status.c: Changes plural to singular formpranav19992019-01-051-1/+1
|/ / | | | | | | | | | | | | Changes incorrect plural to singular form in src/tracker/tracker-status.c Closes https://gitlab.gnome.org/GNOME/tracker/issues/68
* | Update Swedish translationAnders Jonsson2018-12-301-487/+500
| |
* | Update Friulian translationFabio Tomat2018-12-261-486/+500
|/
* libtracker-data: Gracefully exclude NULL subject/pred/object from resultsetCarlos Garnacho2018-12-261-3/+17
| | | | | | | | 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.
* Update Greek translationEfstathios Iosifidis2018-12-201-489/+502
|
* Merge branch 'azzaronea/tracker-fix-memory-leaks-tt2sgml' into HEADSam Thursfield2018-12-194-18/+26
|\ | | | | | | See: https://gitlab.gnome.org/GNOME/tracker/merge_requests/44/commits
| * tt2sgml: Fix memory leaks and memory corruptionsAndrea Azzarone2018-12-184-18/+26
| | | | | | | | Fixes: https://gitlab.gnome.org/GNOME/tracker/issues/66
* | Update POTFILES.inPiotr Drąg2018-12-181-3/+3
| |
* | libtracker-data: Update FTS if base tables were alteredCarlos Garnacho2018-12-181-2/+2
| | | | | | | | | | | | | | 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.
* | tests: Add tests for ontology changes involving FTSCarlos Garnacho2018-12-1813-0/+296
| | | | | | | | | | | | | | | | | | | | 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
* | libtracker-data: Reset property table name on cardinality changesCarlos Garnacho2018-12-181-0/+1
| | | | | | | | | | | | | | 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.
* | tests: Use random location for tracker-ontology-change test dataCarlos Garnacho2018-12-181-13/+2
| | | | | | | | | | So we don't possibly fail when opening an stale database from previous runs.
* | tests: Drop code to "delete the database" in ontology-change testsCarlos Garnacho2018-12-181-27/+0
|/ | | | | | | | | | | 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.
* Merge branch 'jbicha/tracker-reproducible-basename' into HEADSam Thursfield2018-12-188-8/+8
|\ | | | | | | See: https://gitlab.gnome.org/GNOME/tracker/merge_requests/41
| * Use basename instead of filename for reproducibilityChris Lamb2018-12-058-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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