Package org.gdbms.engine.instruction

Examples of org.gdbms.engine.instruction.SemanticException


      for (int i = 0; i < tables.length; i++) {
          tables[i].start();
 
          if (tables[i].getFieldIndexByName(fieldName) != -1) {
              if (tableIndex != -1) {
                  throw new SemanticException("ambiguous column reference: " +
                      fieldName);
              } else {
                  tableIndex = i;
              }
          }
 
          tables[i].stop();
      }
 
      if (tableIndex == -1) {
          throw new SemanticException("Field not found: " + fieldName);
      }
 
      return tables[tableIndex].getName();
  }
View Full Code Here


                    return r2;
                }

            default:
                throw new SemanticException("Unexpected literal type: " + text +
                    "->" + type);
        }
    }
View Full Code Here

        if (className.equals("com.hardcode.gdbms.engine.values.DateValue")) {
            try {
                return createValue(DateFormat.getInstance().parse(text));
            } catch (ParseException e) {
                throw new SemanticException(e);
            }
        }

        if (className.equals("com.hardcode.gdbms.engine.values.DoubleValue")) {
            return createValue(Double.parseDouble(text));
        }

        if (className.equals("com.hardcode.gdbms.engine.values.FloatValue")) {
            return createValue(Float.parseFloat(text));
        }

        if (className.equals("com.hardcode.gdbms.engine.values.IntValue")) {
            return createValue(Integer.parseInt(text));
        }

        if (className.equals("com.hardcode.gdbms.engine.values.LongValue")) {
            return createValue(Long.parseLong(text));
        }

        if (className.equals("com.hardcode.gdbms.engine.values.StringValue")) {
            return createValue(text);
        }

        // default:
        throw new SemanticException(
            "Unexpected className in createValue (GDBMS) text: " + text +
            "-> className: " + className);
    }
View Full Code Here

TOP

Related Classes of org.gdbms.engine.instruction.SemanticException

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.