javascript - How can I check a column for NULL values in node-orm -
i'm using orm package in node.js , i'm trying query database using find()
on 1 of models. however, can't figure out how check column null values using find()
. there way this?
if sent_at field not there when not set then:
db.emails.find({sent_at: {$exists: false}})
if there , null, or not there @ all:
db.emails.find({sent_at: null})
reference: query nul fields
note: since didn't mention database name nor orm used assuming database mongodb.
hope helps.
Comments
Post a Comment