Package org.apache.derby.impl.sql.compile

Examples of org.apache.derby.impl.sql.compile.ParseException


        DataTypeDescriptor      typeDescriptor;
    if (commonDatatypeName(false)) {

    } else {
      jj_consume_token(-1);
      throw new ParseException();
    }
    typeDescriptor = dataTypeCommon();
                {if (true) return typeDescriptor;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here


        DataTypeDescriptor      typeDescriptor;
    if (commonDatatypeName(true)) {

    } else {
      jj_consume_token(-1);
      throw new ParseException();
    }
    typeDescriptor = dataTypeCommon();
                {if (true) return typeDescriptor;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

    if (jj_2_11(1)) {
      if (getToken(2).kind != LARGE) {

      } else {
        jj_consume_token(-1);
        throw new ParseException();
      }
      typeDescriptor = characterStringType();
    } else if (jj_2_12(1)) {
      if (getToken(3).kind != LARGE) {

      } else {
        jj_consume_token(-1);
        throw new ParseException();
      }
      typeDescriptor = nationalCharacterStringType();
    } else if (jj_2_13(1)) {
      typeDescriptor = numericType();
    } else {
      switch (jj_nt.kind) {
      case DATE:
      case TIME:
      case TIMESTAMP:
        typeDescriptor = datetimeType();
        break;
      case BOOLEAN:
        jj_consume_token(BOOLEAN);
        checkInternalFeature(TypeId.BOOLEAN_NAME);
        typeDescriptor = new DataTypeDescriptor(TypeId.BOOLEAN_ID, true);
        break;
      case LONG:
        typeDescriptor = longType();
        break;
      case BINARY:
      case CHAR:
      case CHARACTER:
      case NATIONAL:
      case BLOB:
      case CLOB:
      case NCLOB:
        typeDescriptor = LOBType();
        break;
      case XML:
        typeDescriptor = XMLType();
        break;
      default:
        jj_la1[45] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
                {if (true) return typeDescriptor;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

                type = (varyingToken == null ? Types.CHAR : Types.VARCHAR);
      break;
    default:
      jj_la1[48] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    switch (jj_nt.kind) {
    case FOR:
      type = forBitData(type);
      break;
View Full Code Here

      jj_consume_token(CHARACTER);
      break;
    default:
      jj_la1[50] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }
View Full Code Here

                type = TypeId.NATIONAL_VARCHAR_NAME;
      break;
    default:
      jj_la1[55] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
                // need to re-enable according to SQL standard
                {if (true) throw StandardException.newException(SQLState.NOT_IMPLEMENTED, type);}
                // return DataTypeDescriptor.getBuiltInDataTypeDescriptor(type, length);
View Full Code Here

                        {if (true) throw StandardException.newException(SQLState.NOT_IMPLEMENTED, type);}
      break;
    default:
      jj_la1[60] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
                DataTypeDescriptor dtd = DataTypeDescriptor.getBuiltInDataTypeDescriptor(type, length);

                {if (true) return dtd;}
    throw new Error("Missing return statement in function");
View Full Code Here

      if (jj_2_14(1)) {
        typeDescriptor = approximateNumericType();
                {if (true) return typeDescriptor;}
      } else {
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
    throw new Error("Missing return statement in function");
  }
View Full Code Here

        jj_consume_token(DEC);
        break;
      default:
        jj_la1[62] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      switch (jj_nt.kind) {
      case LEFT_PAREN:
        jj_consume_token(LEFT_PAREN);
        precision = precision();
        switch (jj_nt.kind) {
        case COMMA:
          jj_consume_token(COMMA);
          scale = scale();
          break;
        default:
          jj_la1[63] = jj_gen;
          ;
        }
        jj_consume_token(RIGHT_PAREN);
        break;
      default:
        jj_la1[64] = jj_gen;
        ;
      }
                if ((precision <= 0) ||
                        (precision > TypeCompiler.MAX_DECIMAL_PRECISION_SCALE))
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_INVALID_PRECISION,
                                typeStr, String.valueOf(precision));}
                }
                else if ((scale < 0) ||
                                 (scale > TypeCompiler.MAX_DECIMAL_PRECISION_SCALE))
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_INVALID_DECIMAL_SCALE,
                                typeStr, String.valueOf(scale));}
                }
                else if (scale > precision)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_INVALID_DECIMAL_PRECISION_SCALE,
                                String.valueOf(scale),
                                String.valueOf(precision));}
                }
                /*
    ** If we have a decimal point, need to count it
    ** towards maxwidth.  Max width needs to account
    ** for the possible leading '0' and '-' and the
    ** decimal point.  e.g., DEC(1,1) has a maxwidth
    ** of 4 (to handle "-0.1").
    */
                maxWidth = DataTypeUtilities.computeMaxWidth( precision, scale);
                {if (true) return getDataTypeServices(type, precision, scale, maxWidth);}
      break;
    case INT:
    case INTEGER:
    case SMALLINT:
    case LONGINT:
      dtd = exactIntegerType();
                        {if (true) return dtd;}
      break;
    default:
      jj_la1[65] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    throw new Error("Missing return statement in function");
  }
View Full Code Here

        jj_consume_token(INT);
        break;
      default:
        jj_la1[66] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                {if (true) return DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.INTEGER);}
      break;
    case SMALLINT:
      jj_consume_token(SMALLINT);
                {if (true) return DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.SMALLINT);}
      break;
    case LONGINT:
      jj_consume_token(LONGINT);
                {if (true) return DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.BIGINT);}
      break;
    default:
      jj_la1[67] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    throw new Error("Missing return statement in function");
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.impl.sql.compile.ParseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.