Package Products :: Package ZenEvents :: Module WhereClause |
[hide private]
[frames] | no frames]

# Module WhereClause

source code

Classes | [hide private]
| Error
| WhereJavaScript Base class for converting to/from javascript
| Text Convert to/from javascript for text entries
| Select Convert to/from javascript and where clause element for select entries
| Compare Convert to/from javascript and where clause elements for numeric comparisons
| DeviceGroup
| EventClass
| Enumerated Convert to/from javascript and where clause elements for enumerated types
| _Parser

Functions | [hide private]
q(s) | source code
toJavaScript(meta, clause) | source code
fromFormVariables(meta, form) | source code

Variables | [hide private]
| negativeModes = `'!', '!~', '!^',`
| _Definitions = `r`...``
| _ParseSpec = `r`...``
| where = `_Parser(_ParseSpec)`

Function Details | [hide private]

### toJavaScript(meta, clause) | source code
Decorators: `@json`

Variables Details | [hide private]

  ### _Definitions Value:
      r'''
      def u(s):
          # turn string "'fo''o'" -> "fo'o"
          c = s[0]
          s = c.join(s.split(c+c))
          return s[1:-1]

      '''

  ### _ParseSpec Value:
      r'''
      parser WhereClause:
          ignore:    "[ \r\t\n]+"
          token END: "$"
          token NUM: "[0-9]+"
          token VAR: "[a-zA-Z0-9_]+"
          token BIN: ">=|<=|==|=|<|>|!=|<>"
          token STR: r'"([^\\"]+|\\.)*"'
      ...