Coverage for plugins/module_utils/query.py : 100%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
# -*- coding: utf-8 -*- # Copyright: (c) 2021, XLAB Steampunk <steampunk@xlab.si> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# https://docs.servicenow.com/bundle/quebec-platform-user-interface/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html ( "STARTSWITH", "%", "ENDSWITH", "*", "LIKE", "!*", "NOT LIKE", # Space added based on example query in the upstream docs "=", "!=", "ISEMPTY", "ISNOTEMPTY", "ANYTHING", "EMPTYSTRING", "<=", ">=", "BETWEEN", "SAMEAS", "NSAMEAS", ) ) ( "=", "!=", "ISEMPTY", "ISNOTEMPTY", "STARTSWITH", "%", "ENDSWITH", "*", "LIKE", "!*", "NOT LIKE", # Space added based on example query in the upstream docs "ANYTHING", "SAMEAS", "NSAMEAS", "EMPTYSTRING", "DYNAMIC", ) ) ( "=", "!=", "IN", "NOT IN", "LIKE", "STARTSWITH", "%", "ENDSWITH", "NOT LIKE", "ANYTHING", "SAMEAS", "NSAMEAS", ) ) ( "=", "!=", "IN", "NOT IN", "EMPTY", "NOTEMPTY", "<", ">", "<=", ">=", "BETWEEN", "ANYTHING", "SAMEAS", "NSAMEAS", ) ) ( "ONToday", "NOTONToday", "<", "<=", ">", ">=", "BETWEEN", "DATEPART", "RELATIVEGE", "RELATIVELE", "RELATIVEGT", "RELATIVELT", "RELATIVEEE", "ISEMPTY", "ISNOTEMPTY", "ANYTHING", "SAMEAS", "NSAMEAS", "MORETHAN", "LESSTHAN", ) ) ( "=", "!=", "ISEMPTY", # EMPTY changed to ISEMPTY based on example query in the upstream docs "ISNOTEMPTY", # NOTEMPTY changed to ISNOTEMPTY based on example query in the upstream docs "<", ">", "<=", ">=", "BETWEEN", "ANYTHING", "SAMEAS", "NSAMEAS", "GT_FIELD", "LT_FIELD", "GT_OR_EQUALS_FIELD", "LT_OR_EQUALS_FIELD", ) ) ( "=", "!=", "ISEMPTY", "ISNOTEMPTY", "ANYTHING", "SAMEAS", "NSAMEAS", ) )
( "ISEMPTY", "ISNOTEMPTY", "ANYTHING", "EMPTYSTRING", "ONToday", "NOTONToday", "VALCHANGES", ) )
OPERATORS_STRING | OPERATORS_REFERENCE | OPERATORS_CHOICE_STRINGS | OPERATORS_CHOICE_INTEGERS | OPERATORS_DATE_TIME | OPERATORS_NUMERIC | OPERATORS_BOOLEAN | OPERATORS_EMAIL )
# Return operator and value
# input: list({"caller": "= abel.tuter", "state": "= new"}, {"short_description": "LIKE SAP"}) # output: list({"caller": ("=", "able.tuter"), "state": ("=", "new")}, {"short_description": ("LIKE", "SAP")}})
"Invalid condition '{0}' for column '{1}'.".format( condition, column ) )
# input: list({"caller_id": ("=", "712083754987"), "state": ("=", "3")}, {}) # output: "caller_id=712083754987^state=3"
# isert AND between items
# insert OR between items
|