DataFaucet ORM

Null Filter

The statement object includes a nullFilter() method for convenience, just so you don't have to type out the whole filter method. The nullFilter() method includes two arguments - column name and nullability (default is true).


  // get the datasource
  ds = request.DataFaucet.getDatasource(); 
  // get a select statement for the product table
  stmt = ds.getSelect("*","tblProduct"); 
  // find products with no category id 
  stmt.filter(column="productCategoryID",comparison="IS NULL"); 
  // or you can use the nullFilter method 
  // or get products that have recall dates (not null) 
  // get the query 
  query = stmt.execute();