TSqlOperator

Unit: EgStrParser

type
  TSqlOperator = (sopEqual, sopNotEqual, sopGreaterEqual, sopLessEqual, sopLess, sopGreater,
    sopLikeRight, sopLikeLeft, sopLikeBoth, sopContainsAny, sopContainsAll);

The comparison operator written into SQLExpression. It is the SqlOperator parameter of ParseInput and TEgStrParser.Parse, and the type of TEgStrParser.DefaultOperator. The default is sopEqual. It does not change parsing or validation.

Value Single value List Range
sopEqual = value IN (...) BETWEEN x AND y
sopNotEqual <> value NOT IN (...) NOT BETWEEN x AND y
sopGreaterEqual >= value IN (...) BETWEEN x AND y
sopLessEqual <= value IN (...) BETWEEN x AND y
sopLess < value IN (...) BETWEEN x AND y
sopGreater > value IN (...) BETWEEN x AND y
sopLikeRight LIKE 'value%' IN (...) BETWEEN x AND y
sopLikeLeft LIKE '%value' IN (...) BETWEEN x AND y
sopLikeBoth LIKE '%value%' IN (...) BETWEEN x AND y
sopContainsAny ElevateDB CONTAINS ANY 'value'; others LIKE '%value%' collapsed into one argument BETWEEN x AND y
sopContainsAll ElevateDB CONTAINS ALL 'value'; others LIKE '%value%' collapsed into one argument BETWEEN x AND y

The LIKE and CONTAINS operators apply to itString only; for the other types they behave as sopEqual. A NULL single value gives IS NULL (IS NOT NULL with sopNotEqual) whatever the operator. The details, including the escaping of LIKE patterns, are in Operators.

See Also

(C) 2026 Easygate, Lda