boolean-compound
  • 27 Jul 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

boolean-compound

  • Dark
    Light
  • PDF

Article summary

The boolean-compound parser will evaluate or load data via two parsers and combine their boolean output. Depending on the value of the operator attribute, the combination will evaluate to true, false, or null.

It inherits attributes and behaviors from its parent: abstract parser - boolean.

Note - the columns attribute supersedes the column attribute, which is not used in this parser type.

Attribute - operator

The operator attribute is required.

{
  "parser_type": "boolean-compound", 
  "columns": [
    {...}, // parser one
    {...}  // parser two 
  ],
  
  // The operator attribute defines a comparison function.
  // Options include: 
  // "AND"
  // "OR"
  //
  "operator": "AND"
}

Attribute - columns

The columns attribute is required, and it requires that the values within the array are boolean type parsers.

{
  "parser_type": "boolean-compound", 
  "operator": "AND",
  
  // The columns attribute specifies two inner parsers to produce
  // values for comparison
  //
  "columns": [
    {...}, // parser one
    {...} // parser two
  ]
}

Was this article helpful?