FUNCTION is_sql_mappable

(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP214
-- DIFF IN AP203e2
-- DIFF IN AP238 STEP-NC
-- IN AP203e2/AP214/AP238 STEP-NC/AP242
FUNCTION is_sql_mappable
      (arg : expression ) : BOOLEAN;
      IF 'STEP_MERGED_AP_SCHEMA.SIMPLE_NUMERIC_EXPRESSION' IN TYPEOF(arg) THEN
         RETURN (TRUE);
      END_IF;
      IF 'STEP_MERGED_AP_SCHEMA.SQL_MAPPABLE_DEFINED_FUNCTION' IN TYPEOF(arg) THEN
         RETURN (TRUE);
      END_IF;
      IF 'STEP_MERGED_AP_SCHEMA.MINUS_FUNCTION' IN TYPEOF(arg) THEN
         RETURN (is_sql_mappable(arg\unary_numeric_expression.operand));
      END_IF;
      IF ((((((((((((('STEP_MERGED_AP_SCHEMA.ABS_FUNCTION' IN TYPEOF(arg)) OR ('STEP_MERGED_AP_SCHEMA.SIN_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.COS_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.TAN_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.ASIN_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.ACOS_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.ATAN_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.EXP_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.LOG_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.LOG2_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.LOG10_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.SQUARE_ROOT_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.VALUE_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.LENGTH_FUNCTION' IN TYPEOF(arg)) THEN
         RETURN (FALSE);
      END_IF;
      IF ((('STEP_MERGED_AP_SCHEMA.PLUS_EXPRESSION' IN TYPEOF(arg)) OR ('STEP_MERGED_AP_SCHEMA.MULT_EXPRESSION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.MAXIMUM_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.MINIMUM_FUNCTION' IN TYPEOF(arg)) THEN
         REPEAT i := 1 TO SIZEOF(arg\multiple_arity_numeric_expression.operands) BY 1;
            IF NOT is_sql_mappable(arg\multiple_arity_numeric_expression.operands[i]) THEN
               RETURN (FALSE);
            END_IF;
         END_REPEAT;
         RETURN (TRUE);
      END_IF;
      IF ('STEP_MERGED_AP_SCHEMA.MINUS_EXPRESSION' IN TYPEOF(arg)) OR ('STEP_MERGED_AP_SCHEMA.SLASH_EXPRESSION' IN TYPEOF(arg)) THEN
         RETURN (is_sql_mappable(arg\binary_numeric_expression.operands[1]) AND is_sql_mappable(arg\binary_numeric_expression.operands[2]));
      END_IF;
      IF (('STEP_MERGED_AP_SCHEMA.DIV_EXPRESSION' IN TYPEOF(arg)) OR ('STEP_MERGED_AP_SCHEMA.MOD_EXPRESSION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.POWER_EXPRESSION' IN TYPEOF(arg)) THEN
         RETURN (FALSE);
      END_IF;
      IF 'STEP_MERGED_AP_SCHEMA.SIMPLE_BOOLEAN_EXPRESSION' IN TYPEOF(arg) THEN
         RETURN (TRUE);
      END_IF;
      IF 'STEP_MERGED_AP_SCHEMA.NOT_EXPRESSION' IN TYPEOF(arg) THEN
         RETURN (is_sql_mappable(arg\unary_generic_expression.operand));
      END_IF;
      IF ('STEP_MERGED_AP_SCHEMA.ODD_FUNCTION' IN TYPEOF(arg)) OR ('STEP_MERGED_AP_SCHEMA.XOR_EXPRESSION' IN TYPEOF(arg)) THEN
         RETURN (FALSE);
      END_IF;
      IF ('STEP_MERGED_AP_SCHEMA.AND_EXPRESSION' IN TYPEOF(arg)) OR ('STEP_MERGED_AP_SCHEMA.OR_EXPRESSION' IN TYPEOF(arg)) THEN
         REPEAT i := 1 TO SIZEOF(arg\multiple_arity_boolean_expression.operands) BY 1;
            IF NOT is_sql_mappable(arg\multiple_arity_boolean_expression.operands[i]) THEN
               RETURN (FALSE);
            END_IF;
         END_REPEAT;
         RETURN (TRUE);
      END_IF;
      IF 'STEP_MERGED_AP_SCHEMA.EQUALS_EXPRESSION' IN TYPEOF(arg) THEN
         RETURN (is_sql_mappable(arg\binary_generic_expression.operands[1]) AND is_sql_mappable(arg\binary_generic_expression.operands[2]));
      END_IF;
      IF (((((('STEP_MERGED_AP_SCHEMA.COMPARISON_EQUAL' IN TYPEOF(arg)) OR ('STEP_MERGED_AP_SCHEMA.COMPARISON_GREATER' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.COMPARISON_GREATER_EQUAL' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.COMPARISON_LESS' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.COMPARISON_LESS_EQUAL' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.COMPARISON_NOT_EQUAL' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.LIKE_EXPRESSION' IN TYPEOF(arg)) THEN
         RETURN (is_sql_mappable(arg\comparison_expression.operands[1]) AND is_sql_mappable(arg\comparison_expression.operands[2]));
      END_IF;
      IF 'STEP_MERGED_AP_SCHEMA.INTERVAL_EXPRESSION' IN TYPEOF(arg) THEN
         RETURN ((is_sql_mappable(arg\interval_expression.interval_low) AND is_sql_mappable(arg\interval_expression.interval_high)) AND is_sql_mappable(arg\interval_expression.interval_item));
      END_IF;
      IF (('STEP_MERGED_AP_SCHEMA.NUMERIC_DEFINED_FUNCTION' IN TYPEOF(arg)) OR ('STEP_MERGED_AP_SCHEMA.BOOLEAN_DEFINED_FUNCTION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.STRING_DEFINED_FUNCTION' IN TYPEOF(arg)) THEN
         RETURN (FALSE);
      END_IF;
      IF 'STEP_MERGED_AP_SCHEMA.SIMPLE_STRING_EXPRESSION' IN TYPEOF(arg) THEN
         RETURN (TRUE);
      END_IF;
      IF ((('STEP_MERGED_AP_SCHEMA.INDEX_EXPRESSION' IN TYPEOF(arg)) OR ('STEP_MERGED_AP_SCHEMA.SUBSTRING_EXPRESSION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.CONCAT_EXPRESSION' IN TYPEOF(arg))) OR ('STEP_MERGED_AP_SCHEMA.FORMAT_FUNCTION' IN TYPEOF(arg)) THEN
         RETURN (FALSE);
      END_IF;
      RETURN (FALSE);
END_FUNCTION;

Referenced By

Defintion is_sql_mappable is references by the following definitions:
DefinitionType
 numeric_expression ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2017-01-19T11:17:24-05:00