summaryrefslogtreecommitdiff
path: root/src/libtracker-sparql
Commit message (Collapse)AuthorAgeFilesLines
* libtracker-sparql: Add TrackerEndpointDBusCarlos Garnacho2019-09-107-1/+827
| | | | | This object allows exporting a sparql connection at a given DBus connection and object path.
* libtracker-sparql: Add public method to create a connection to a DBus serviceCarlos Garnacho2019-09-101-0/+2
|
* libtracker-sparql: Add "unknown graph" error enum valueCarlos Garnacho2019-09-101-1/+3
| | | | This will be used when we support graphs for real.
* libtracker-sparql: Escape single quotesCarlos Garnacho2019-08-311-1/+4
| | | | | | | | | | | According to https://www.w3.org/TR/sparql11-query/#grammarEscapes, double and single quotes may be escaped regardless of the type of string literal we are dealing with. We should make tracker_sparql_escape_string() match accordingly. Related: https://gitlab.gnome.org/GNOME/nautilus/issues/163 https://gitlab.gnome.org/GNOME/nautilus/merge_requests/456
* libtracker-sparql: Document the missing argumentsCorentin Noël2019-08-272-0/+5
|
* libtracker-sparql: Don't automatically call dispose() on TrackerResourceSam Thursfield2019-08-261-2/+0
| | | | | | | | Just because we changed a property, does not mean we should delete the old value of that property, because it might still be in use somewhere else. See https://gitlab.gnome.org/GNOME/tracker/issues/127
* libtracker-sparql: Implement dispose() in TrackerResourceCarlos Garnacho2019-08-101-0/+17
| | | | | | | TrackerResource may in some circumstances contain links to itself, or other reference cycles. We should eventually offer a destroy() method, but implementing dispose() will at least provide a tool to ensure those cycles are gone.
* Fixup mistake in 44fa3ffddb3728ec5cd4551f11e4c16de5ef4c6aSam Thursfield2019-08-071-1/+1
|
* libtracker-sparql: Fix introspection warningSam Thursfield2019-08-071-1/+1
| | | | | | Fixes this warning: ../../tracker/src/libtracker-sparql/tracker-namespace-manager.c:335: Warning: Tracker_C: tracker_namespace_manager_foreach: argument func: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)
* libtracker-common: Make TrackerDomainOntology totally not an objectCarlos Garnacho2019-07-311-1/+1
| | | | | | | | | Hopefully the last chapter in the "make libtracker-common static" saga... Turn this object into a refcounted struct, as we still may end up with multiple copies of libtracker-common in libtracker-miner, through libtracker-sparql.so and directly as it also uses libtracker-common. This resulted in assertions when trying to register the same type name twice.
* build: Use tracker_common_dep as a normal dependencySam Thursfield2019-07-101-4/+1
| | | | | | | | | | | | | | We were using 'link_with: libtracker-common' to link to libtracker-common in some places, which worked around an old Meson bug. The bug (https://github.com/mesonbuild/meson/issues/671) was fixed in Meson 0.42 so we can now remove the workaround. The advantage of using 'dependency: tracker_common_dep' is that transitive dependencies are now automatically propagated. We now probably have some redundant dependency information on some of the libraries, but that isn't a problem. Fixes https://gitlab.gnome.org/GNOME/tracker/issues/112
* build: libtracker-sparql C code depends on libtracker-sparql Vala codeSam Thursfield2019-05-041-0/+1
| | | | | | | | | | | We need to express this dependency, otherwise the C code might fail to build with this kind of error: ../src/libtracker-sparql/tracker-notifier.c:89:10: fatal error: tracker-generated-no-checks.h: No such file or directory The `tracker-generated-no-checks.h` file is generated by Vala. Hopefully fixes https://gitlab.gnome.org/GNOME/tracker/issues/96
* Merge branch 'sam/tracker-sparql-doc-cleanups' into 'master'Sam Thursfield2019-05-031-1/+1
|\ | | | | | | | | docs: Clean up some errors in libtracker-sparql-doc build See merge request GNOME/tracker!82
| * docs: Turn URI reference into a proper linkSam Thursfield2019-03-301-1/+1
| | | | | | | | | | | | This fixes the following warning while building the docs: html/TrackerNotifier.html:363: warning: no link for: "Audio" -> (<span class="type">Audio</span>).
* | libtracker-sparql: Don't try to create JSON nodes with unsigned integersSam Thursfield2019-04-011-0/+4
| | | | | | | | | | | | | | | | | | It turns out that json-glib only allows signed integer fields. This fixes missing values when running `tracker-extract -o json-ld` in certain cases. If you hit this bug you might also see the following error: Invalid value of type 'guint'
* | libtracker-sparql: Handle correctly backreferences in TrackerResource treeCarlos Garnacho2019-03-311-12/+9
|/ | | | | | | | | | | We do keep a notion of already visited TrackerResources when generating the output. However that could go wrong if the TrackerResource references itself or a "parent" TrackerResource. Add the resources to the done list beforehand, so they are ensured not to be visited again if such backreferences exist. Related: https://gitlab.gnome.org/GNOME/tracker-miners/issues/60
* docs: Modernize the libtracker-sparql documentationCorentin Noël2019-03-281-5/+5
| | | | Still not fixed the Tracker 2.0 references here and there
* Merge branch 'wip/mschraal/meson-log-domain'Carlos Garnacho2019-02-171-1/+2
|\
| * build: Set tracker as the log domainwip/mschraal/meson-log-domainMarinus Schraal2019-02-171-1/+2
| | | | | | | | An oversight of the meson port.
* | Use basename instead of filename for reproducibilityChris Lamb2018-12-052-2/+2
|/ | | | | | | | | | | | 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
* libtracker-sparql: Add TrackerSparqlStatementCarlos Garnacho2018-11-133-0/+135
| | | | | This object can hold a long lived query, in which parameters may be changed prior to execution.
* libtracker-sparql: Use INSERT DATA on insertionsCarlos Garnacho2018-11-131-1/+1
|
* build: Export store/ontology/domain ontology locations in .pc fileCarlos Garnacho2018-11-131-0/+5
| | | | | | | Export those in tracker-sparql.pc, so users may find out the install details. Related: https://gitlab.gnome.org/GNOME/tracker-miners/issues/19
* Revert "Revert "build: Do not link libtracker-data.so to libtracker-sparql.so""Carlos Garnacho2018-11-051-1/+1
| | | | | | | This reverts commit 20b9f3673d16d07070619cb0ff770d0dabbcc74c. Gnome infrastructures should already have meson >= 0.48.0, let's give it another try.
* build: Use install_data() to install libtracker-sparql .deps vapi fileCarlos Garnacho2018-10-131-6/+5
| | | | | | We generate that file ourselves, so configure_file() is unneeded as the file requires no substitutions. Fixes a warning on recent meson, as the configuration should not be empty.
* build: Fixes to docs generationCarlos Garnacho2018-10-131-0/+2
| | | | | | | | | The docs were not going through gtkdoc-scangobj, and the libtracker-sparql docs were just looking in source dir while it should also look for gtk-doc comments in generated files from vala. Now that we're there, use include_directories() to get rid of relative paths.
* Revert "build: Do not link libtracker-data.so to libtracker-sparql.so"Carlos Garnacho2018-10-111-1/+1
| | | | | | | | | Works with meson 0.48.0, but not with the versions in CI/build.gnome.org. Not cool, meson. We'll have to linger with broken internal library dependencies till I restructure the src/libtracker-* mess, or 0.48.0 gets old. This reverts commit 6799d903e9767288b10b02e1f362e040a02f69ed.
* build: Do not link libtracker-data.so to libtracker-sparql.soCarlos Garnacho2018-10-111-1/+1
| | | | | | | | | | | | | | | Even though libtracker-data uses types from libtracker-sparql, this is the wrong way around. However, doing the right thing here still breaks because meson is playing smart here and passes --no-undefined for every shared library by default, so build breaks with obviously undefined symbols. Correct the dependency tree to be exactly how it was with autotools, and override b_lundef when building libtracker-data to leave the borrowed symbols undefined. The gaps will be filled in because everyone must link with libtracker-sparql. Closes: https://gitlab.gnome.org/GNOME/tracker/issues/44
* libtracker-sparql: Check for null pointers in finalize()wip/ernestask/43Ernestas Kulik2018-10-061-4/+9
| | | | | | | tracker_notifier_finalize() may accidentally stumble upon a null pointer or two, throwing warnings and making Nautilus CI pipelines fail. Related: https://gitlab.gnome.org/GNOME/tracker/issues/43
* libtracker-sparql: Fix type-arguments issue in *intermediate-c.vapiwip/ricotz/type-argsRico Tzschichholz2018-09-201-1/+1
|
* Revert "Revert "Add tracker_sparql_connection_get/set_dbus_connection()""Carlos Garnacho2018-09-092-1/+32
| | | | | | This reverts commit df768eff07c817924f431ece0d09a24edab74de2. Now that we branched for tracker-2.2, reintroduce this new API.
* build: Drop autotoolswip/carlosg/drop-autotoolsCarlos Garnacho2018-09-091-123/+0
|
* libtracker-sparql: Plug leakCarlos Garnacho2018-09-091-3/+6
|
* libtracker-sparql: Mark some internal TrackerResource methods as staticCarlos Garnacho2018-09-051-6/+6
|
* Revert "Add tracker_sparql_connection_get/set_dbus_connection()"Carlos Garnacho2018-08-302-32/+1
| | | | | | | This reverts commit eb24ea93bc550934d15223d002b490143e604921. This is an interesting feature, but not a good timing. Punt for 2.2.x that will happen after 3.30.
* libtracker-sparql: Use ';' as separator for multiple update statementsCarlos Garnacho2018-08-301-2/+2
| | | | | The separator being optional is a tracker-specific "feature". Seems better to use proper SPARQL1.1 here.
* Merge branch 'sam/domain-rules-outside-usr'Sam Thursfield2018-08-161-1/+1
|\ | | | | | | See https://gitlab.gnome.org/GNOME/tracker/merge_requests/14
| * libtracker-sparql: Don't use 'namespace' as a parameter nameSam Thursfield2018-08-122-8/+8
| | | | | | | | | | | | | | | | This header was unusable from C++ code as 'namespace' is a reserved keyword there. Based on a patch by Santtu Lakkala from https://bugzilla.gnome.org/show_bug.cgi?id=791510
| * tracker_domain_ontology_get_domain() should return only the domain nameSam Thursfield2018-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should be consistent about what the name of a Tracker domain actually is. In the domain rule we specify Domain=org.freedesktop (for the default rule) or Domain=org.example.App (for a custom domain). But internally tracker_domain_ontology_get_domain() would return org.freedesktop.Tracker1 or org.example.App.Tracker1, i.e. the domain name now has '.Tracker1' appended. This does make sense in most cases, but it means there's no way to get the actual name of the domain from a TrackerDomainOntology object. This commit changes the existing function to not append '.Tracker1' in the value it returns, which means that function can now be used to get the base name of the domain. The assumption is that callers are normally appending stuff to this base name anyway so it's not much extra effect to also append the '.Tracker1' component if needed. libtracker-common is internal to Tracker so this doesn't constitute a public API break.
* | Merge branch 'sam/tracker-sparql-connection-set-dbus-connection'Sam Thursfield2018-08-162-1/+32
|\ \ | | | | | | | | | See https://gitlab.gnome.org/GNOME/tracker/merge_requests/14
| * | Add tracker_sparql_connection_get/set_dbus_connection()sam/tracker-sparql-connection-set-dbus-connectionSam Thursfield2018-08-112-1/+32
| |/ | | | | | | | | | | | | | | | | | | | | | | Currently it's only possible to open a TrackerSparqlConnection to an instance of Tracker that is running on the session-wide message bus. There are use cases for running the Tracker daemons on a private session bus though. In fact it's necessary to do this if you want to set up a custom domain without having to become root and create .service files in /usr/share/dbus-1/services. It would also be useful for the functional-tests to be able to use libtracker-sparql instead of having to talk directly to Tracker's D-Bus API.
* | libtracker-sparql: Don't use 'namespace' as a parameter nameSam Thursfield2018-08-152-8/+8
|/ | | | | | | | This header was unusable from C++ code as 'namespace' is a reserved keyword there. Based on a patch by Santtu Lakkala from https://bugzilla.gnome.org/show_bug.cgi?id=791510
* libtracker-sparql: delete TrackerResource elements one by onewip/carlosg/resource-deletesCarlos Garnacho2018-08-031-28/+17
| | | | | | | | | | | | | | | | | | Creating a single query for all values to delete can only work if all values have a match. As soon as a value is already missing, the query would just bail out as there's no real match. We want to delete every value individually regardless of other properties, so decompose the single delete into multiple individual deletes. Fixes "Unable to insert multiple values for subject..." warnings as the insertion queries would rely on single-valued properties being cleared beforehand. https://gitlab.gnome.org/GNOME/tracker/issues/28 Closes: #28
* Add support to TrackerResource for outputting metadata as JSON-LDsam/resource-jsonldSam Thursfield2018-07-155-1/+200
| | | | | This also adds `tracker extract -o json` to dump resources in JSON-LD, in anticipation of corresponding updates in tracker-miners.git.
* meson: Install generated headers without needing a scriptSam Thursfield2018-04-221-7/+3
| | | | | | | | | | This script dates from a long time ago when Meson lacked ways to install generated headers. This fixes an issue where `ninja install` in tracker.git triggers a rebuild of lots of stuff from tracker-miners.git, which happened because the mtime of the installed generated headers would become newer than the build files in tracker-miners.git and cause ninja to rebuild them all.
* libtracker-sparql: Fix wording of function documentationSam Thursfield2018-04-201-4/+3
|
* vala: Bump gir_version to 2.0Ting-Wei Lan2018-01-241-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=792691
* libtracker-sparql: Be more careful about integer sizesDebarshi Ray2018-01-231-3/+3
| | | | | | | | The GVariant type string "i" refers to a signed 32-bit integer. Therefore, gint32 is a much safer bet than gint, whose size is not guaranteed across all platforms. https://bugzilla.gnome.org/show_bug.cgi?id=792301
* libtracker-sparql: Introspection fix for tracker_notifier_new()Sam Thursfield2017-09-291-2/+2
| | | | The tracker_notifier_new() function allows NULL for 'classes'.
* libtracker-sparql: Fix introspection for Tracker.Notifier.new()Sam Thursfield2017-09-221-1/+2
| | | | The 'classes' parameter wasn't annotated correctly.