Skip to content

Add support for union queries with bindings #326

Description

@pwithnall

Commit 8c75f49 deprecated xb_string_escape(), which seems like a reasonable thing to do. I started updating gnome-software to handle libxmlb’s latest deprecations, but found that listing featured apps no longer works after applying my changes. Specifically commit 5d3fbc0a of my branch breaks things.

I think this is because the only place that handles union queries (some/selector|some/other/selector) is silo_query_with_root(), which is the implementation of queries provided as an XPath string. There doesn’t appear to be an implementation of union queries for queries provided by the caller as an XbQuery.

Since the suggested replacement for xb_string_escape(), xb_value_bindings_bind_str(), can only be used via XbQueryContext with an XbQuery, not with an XPath string, I think this means there’s no non-deprecated way to perform a union query with bound arguments at the moment.

So I suggest that either:

  • The XbQuery based query code in xb-silo-query.c is expanded to support unions; or
  • the deprecation of xb_string_escape() is reverted until it can be.

Unless I’m missing something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions