void recompile(Session paramSession, Table paramTable) {
   String str = this.check.getSQL();
   Scanner localScanner = new Scanner(str);
   ParserDQL localParserDQL = new ParserDQL(paramSession, localScanner);
   localParserDQL.compileContext.reset(0);
   localParserDQL.read();
   localParserDQL.isCheckOrTriggerCondition = true;
   Expression localExpression = localParserDQL.XreadBooleanValueExpression();
   this.check = localExpression;
   QuerySpecification localQuerySpecification =
       Expression.getCheckSelect(paramSession, paramTable, this.check);
   this.rangeVariable = localQuerySpecification.rangeVariables[0];
   this.rangeVariable.setForCheckConstraint();
 }
Exemple #2
0
  void recompile(Session session, Table newTable) {

    String ddl = check.getSQL();
    Scanner scanner = new Scanner(ddl);
    ParserDQL parser = new ParserDQL(session, scanner);

    parser.read();

    parser.isCheckOrTriggerCondition = true;

    Expression condition = parser.XreadBooleanValueExpression();

    check = condition;
    schemaObjectNames = parser.compileContext.getSchemaObjectNames();

    // this workaround is here to stop LIKE optimisation (for proper scripting)
    QuerySpecification s = Expression.getCheckSelect(session, newTable, check);

    rangeVariable = s.rangeVariables[0];

    rangeVariable.setForCheckConstraint();
  }