Al G
Al G

Reputation: 1

Eclipse Hawkbit match empty string in filter query

In Eclipse Hawkbit UI. I am searching for a set of devices that are not currently assigned with a specific distribution.

When I write a filter with assignedds.name!="foo" it returns all devices that do not currently have distribution foo assigned for update EXCEPT if there are devices with no update scheduled it will not return these.

I expect the query to return the set of things that have a distribution assigned that doesn't match and also things that have no distribution assigned.

As a workaround I tried assignedds.name==NULL and assignedds.name=="" but these do not seem to work. Any suggestions for how to represent the empty string or empty set in the query?

assignedds.name=="" returns a list but assignedds.name!="" returns nothing (even though I can see that there are devices with no current assignment).

Upvotes: 0

Views: 128

Answers (1)

Avgustin Marinov
Avgustin Marinov

Reputation: 11

These filters are resolved to DB queries. So, the behaviour might depend on the database you are using. For me (MySQL + its config) works like following:

  • assignedds.name != "foo" -> returns assigned with different DS + with not assignments - what is what you want
  • assignedds.name != "foo" and assignedds.name != "" -> returns only with assigned different subscriptions - what you get
  • assignedds.name != "" -> works fine, but
  • assignedds.name == "" -> returns nothing

Upvotes: 0

Related Questions