After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747618 - Want IS NULL and IS NOT NULL filters
Want IS NULL and IS NOT NULL filters
Status: RESOLVED FIXED
Product: gom
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Gom Maintainers
Gom Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-10 12:45 UTC by Alexander Larsson
Modified: 2015-04-10 13:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add IS NULL and IS NOT NULL filters (9.63 KB, patch)
2015-04-10 12:46 UTC, Alexander Larsson
accepted-commit_now Details | Review
Add test for IS [NOT] NULL filters (4.63 KB, patch)
2015-04-10 12:46 UTC, Alexander Larsson
accepted-commit_now Details | Review

Description Alexander Larsson 2015-04-10 12:45:32 UTC
These are useful
Comment 1 Alexander Larsson 2015-04-10 12:46:03 UTC
Created attachment 301280 [details] [review]
Add IS NULL and IS NOT NULL filters
Comment 2 Alexander Larsson 2015-04-10 12:46:08 UTC
Created attachment 301281 [details] [review]
Add test for IS [NOT] NULL filters
Comment 3 Bastien Nocera 2015-04-10 12:51:14 UTC
Review of attachment 301280 [details] [review]:

Please prefix the commit subject with "filter: "

Looks fine to commit after that.

::: gom/gom-filter.c
@@ +556,3 @@
+   case GOM_FILTER_IS_NOT_NULL:
+      va = g_array_new(FALSE, FALSE, sizeof(GValue));
+      g_array_set_clear_func(va, (GDestroyNotify) g_value_unset);

That's not necessary though, is it?
Comment 4 Bastien Nocera 2015-04-10 12:52:10 UTC
Review of attachment 301281 [details] [review]:

Looks good.
Comment 5 Alexander Larsson 2015-04-10 13:10:47 UTC
Review of attachment 301280 [details] [review]:

::: gom/gom-filter.c
@@ +556,3 @@
+   case GOM_FILTER_IS_NOT_NULL:
+      va = g_array_new(FALSE, FALSE, sizeof(GValue));
+      g_array_set_clear_func(va, (GDestroyNotify) g_value_unset);

Its what GOM_FILTER_SQL does if there are no values.