Checking for NULL columns (equivalent to IS NULL or IS NOT NULL)

829 views
Skip to first unread message

Mathew de Detrich

unread,
Aug 6, 2011, 6:19:59 PM8/6/11
to Squeryl
Is there a way to check if a column is NULL in squeryl, obviously
using === gives the paraphrased "not an int" type error

Or are you forced to use pure SQL?

Maxime Lévesque

unread,
Aug 6, 2011, 7:13:56 PM8/6/11
to squ...@googlegroups.com

where(x.aField isNull)

The list of operators and functions is here :

 http://squeryl.org/functions.html

ML

2011/8/6 Mathew de Detrich <det...@gmail.com>

Peter Leong

unread,
Apr 1, 2014, 12:08:21 AM4/1/14
to squ...@googlegroups.com
In case anyone else is pulling their hair out...

where(x.aField.isNull)

Seems to play nicer with my IDE.  It works for Option[] fields too.

Pete

Reply all
Reply to author
Forward
0 new messages