Skip to Content.
Sympa Menu

perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r5975 - trunk/nmwg-sql-converter/src/main/java/org/perfsonar/nmwg/converter

Subject: perfsonar development work

List archive

[pS-dev] [GEANT/SA2/ps-java-services] r5975 - trunk/nmwg-sql-converter/src/main/java/org/perfsonar/nmwg/converter


Chronological Thread 
  • From:
  • To:
  • Subject: [pS-dev] [GEANT/SA2/ps-java-services] r5975 - trunk/nmwg-sql-converter/src/main/java/org/perfsonar/nmwg/converter
  • Date: Tue, 28 Aug 2012 13:47:49 +0100 (BST)

Author: nordunet.behrmann
Date: 2012-08-28 13:47:49 +0100 (Tue, 28 Aug 2012)
New Revision: 5975

Modified:

trunk/nmwg-sql-converter/src/main/java/org/perfsonar/nmwg/converter/Converter.java
Log:
nmwg-sql-converter: Use explicit column names in SQL output

Otherwise the generated SQL is subject to the ordering of the columns in
the interfaces table. If the table is created by Hibernate, then the
ordering cannot be relied upon.

Modified:
trunk/nmwg-sql-converter/src/main/java/org/perfsonar/nmwg/converter/Converter.java
===================================================================
---
trunk/nmwg-sql-converter/src/main/java/org/perfsonar/nmwg/converter/Converter.java
2012-08-22 11:10:07 UTC (rev 5974)
+++
trunk/nmwg-sql-converter/src/main/java/org/perfsonar/nmwg/converter/Converter.java
2012-08-28 12:47:49 UTC (rev 5975)
@@ -69,7 +69,10 @@
private String createSQLInsertEntry(Interfaces intf){
StringBuilder sb = new StringBuilder();
String eol = System.getProperty("line.separator");
- sb.append(eol + "INSERT INTO interfaces VALUES (NULL, ");
+ sb.append(eol + "INSERT INTO interfaces (subjId, hostName,
ifAddress, ifAddressType, ifName, " +
+ "ifDescription, direction, capacity, keyword, eventType, file,
dataSource, valueUnits, " +
+ "dataSourceStep, dataSourceType, dataSourceHeartbeat,
dataSourceMinValue, " +
+ "dataSourceMaxValue) VALUES (");
sb.append("'subj1', ");
sb.append("'" + (intf.getHostName() == null ? "" :
intf.getHostName()) +"', ");
sb.append("'" + (intf.getIfAddress() == null ? "" :
intf.getIfAddress()) +"', ");



  • [pS-dev] [GEANT/SA2/ps-java-services] r5975 - trunk/nmwg-sql-converter/src/main/java/org/perfsonar/nmwg/converter, svn-noreply, 08/28/2012

Archive powered by MHonArc 2.6.16.

Top of Page