We use New Relic mobile and its often useful to be able to run queries on data based on our current app version, which follows semantic versioning.
I recently discovered that version comparisons in NRQL seemed to work as expected, comparing the strings numerically, e.g.: given a
MobileSession with an NRQL query of
WHERE appVersion < '2.4.0' would correctly return sessions with app versions like
2.2.5 etc. but not
2.5.0 for example.
Unfortunately this stops working once the
minor version reaches double digits - we’re about to ship a
2.10.0 version and running the above query will include
2.10.0 in its results even though this version is higher than
Ideally the comparison operators would compare version strings according to semver rules - if this isn’t possible it would be really useful to have a semver version of these operators that did work this way.