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]
  _Definitions = '\ndef u(s):\n # turn string "\'fo\'\'o\'" -...
  _ParseSpec = '\nparser WhereClause:\n ignore: "[ \\r\\t\...
  where = _Parser(_ParseSpec)
Variables Details [hide private]

_Definitions

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