Ejemplo n.º 1
1
 public String tableColumns(String tableName, String columnPrefix) throws SQLException {
   ResultSet columns = executeQuery(driver.getQueries().getColumns(tableName));
   StringBuilder columnsBuilder = new StringBuilder();
   while (columns.next()) {
     if (columnsBuilder.length() > 0) columnsBuilder.append(',');
     columnsBuilder.append(columnPrefix).append(columns.getString("property.name"));
   }
   return columnsBuilder.toString();
 }
Ejemplo n.º 2
0
 public Iterable<Expression> returnProperties(String tableName, String columnPrefix)
     throws SQLException {
   ResultSet columns = executeQuery(driver.getQueries().getColumns(tableName));
   List<Expression> properties = new ArrayList<Expression>();
   while (columns.next()) {
     properties.add(
         CypherQuery.identifier(columnPrefix).property(columns.getString("property.name")));
   }
   return properties;
 }