Package org.eclipse.imp.pdb.facts

Examples of org.eclipse.imp.pdb.facts.IListWriter.done()


        IListWriter w = vf.listWriter(tf.stringType());
        for(int i = 0; i < fd.length; i++){
          System.err.println("adding " + fd[i].getName());
          w.append(vf.string(fd[i].getName()));
        }
        res= w.done();
       
      }
     
    });
     return res;
View Full Code Here


        DatabaseMetaData dmd = conn.getMetaData();
        ResultSet rs = dmd.getTableTypes();
        IListWriter resultWriter = this.vf.listWriter(TF.stringType());
        while (rs.next()) resultWriter.append(this.vf.string(rs.getString(1)));
        rs.close();
        return resultWriter.done();
      } else {
        throw RuntimeExceptionFactory.illegalArgument(connection, null, null, "Connection does not exist.");
      }
    } catch (SQLException sqle) {
      throw RuntimeExceptionFactory.illegalArgument(connection, null, null, addMessage("Could not close the given connection", sqle));
View Full Code Here

            String cn = rs.getString("COLUMN_NAME");
            int dt = rs.getInt("DATA_TYPE");
            String nullable = rs.getString("IS_NULLABLE");
            listRes.append(vf.constructor(column, vf.string(cn), vf.constructor(JDBC.jdbc2rascalType(dt)), nullable.equalsIgnoreCase("YES") ? vf.bool(true) : vf.bool(false)));
          }
          setRes.insert(vf.constructor(table, vf.string(tableName), listRes.done()));
          rs.close();
        }
        return setRes.done();
      } else {
        throw RuntimeExceptionFactory.illegalArgument(connection, null, null, "Connection does not exist.");
View Full Code Here

          int dt = rs.getInt("DATA_TYPE");
          String nullable = rs.getString("IS_NULLABLE");
          listRes.append(vf.constructor(column, vf.string(cn), vf.constructor(JDBC.jdbc2rascalType(dt)), nullable.equalsIgnoreCase("YES") ? vf.bool(true) : vf.bool(false)));
        }
        rs.close();
        return vf.constructor(table, tableName, listRes.done());
      } else {
        throw RuntimeExceptionFactory.illegalArgument(connection, null, null, "Connection does not exist.");
      }
    } catch (SQLException sqle) {
      throw RuntimeExceptionFactory.illegalArgument(connection, null, null, addMessage("Could not close the given connection", sqle));
View Full Code Here

            while (isrRes != -1) {
              lw.append(vf.integer(isrRes));
              isrRes = isr.read();
            }
          }
          res = lw.done();
          break;
        case Types.BIT:
          res = vf.bool(rs.getBoolean(idx));
          break;
        case Types.BLOB:
View Full Code Here

                lw.append(vf.integer(isrRes));
                isrRes = isr.read();
              }
            }
          }
          res = lw.done();
          break;
        case Types.BOOLEAN:
          res = vf.bool(rs.getBoolean(idx));
          break;
        case Types.CHAR:
View Full Code Here

                lw.append(vf.integer(isrRes));
                isrRes = isr.read();
              }
            }
          }
          res = lw.done();
          break;
        case Types.DATALINK:
          throw new UnsupportedOperation("JDBC Datalink types are currently not supported", null);
        case Types.DATE:
          if (rs.getDate(idx) != null) {
View Full Code Here

            while (isrRes != -1) {
              lw.append(vf.integer(isrRes));
              isrRes = isr.read();
            }
          }
          res = lw.done();
          break;
        case Types.LONGVARCHAR:
          if (rs.getString(idx) != null)
            res = vf.string(rs.getString(idx));
          else
View Full Code Here

                lw.append(vf.integer(isrRes));
                isrRes = isr.read();
              }
            }
          }
          res = lw.done();
          break;
        case Types.NULL:
          throw new UnsupportedOperation("JDBC Null types are currently not supported", null);
        case Types.NUMERIC:
          if (rs.getBigDecimal(idx) != null) {
View Full Code Here

            while (isrRes != -1) {
              lw.append(vf.integer(isrRes));
              isrRes = isr.read();
            }
          }
          res = lw.done();
          break;
        case Types.VARCHAR:
          if (rs.getString(idx) != null)
            res = vf.string(rs.getString(idx));
          else
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.