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?
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) issilo_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 anXbQuery.Since the suggested replacement for
xb_string_escape(),xb_value_bindings_bind_str(), can only be used viaXbQueryContextwith anXbQuery, 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:
XbQuerybased query code inxb-silo-query.cis expanded to support unions; orxb_string_escape()is reverted until it can be.Unless I’m missing something?