bug fixed for the submitQuery and sampling operation and related to column value truncated to 255 characters. If the final quote has been truncated the parsecvsstring method in the servlet does not work fine. Bug fixed adding the final quote. convertToJavaType method in DatabaseManagement class modified.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101170 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
17dfef9f1e
commit
8a06b5373b
|
@ -12,7 +12,8 @@
|
|||
uppercase names with a postgres database.
|
||||
</Change>
|
||||
<Change>for the getTableDetails operation column names recovered as
|
||||
defined in their database's schema. PostgresTableStructure class modified.
|
||||
defined in their database's schema. PostgresTableStructure class
|
||||
modified.
|
||||
</Change>
|
||||
<Change>bug fixed in class ConnectionManager for the submitquery
|
||||
operation modified in order to manage the data geometry recovering
|
||||
|
@ -23,7 +24,17 @@
|
|||
operation in order to truncate column values of the result to 255
|
||||
character.
|
||||
</Change>
|
||||
|
||||
<Change>bug fixed in Sampler class in computeSmartSampleWithThreshold
|
||||
method. table name formatted as schema."table" in order to recover
|
||||
the rows.
|
||||
</Change>
|
||||
<Change>
|
||||
bug fixed for the submitQuery and sampling operation and related to
|
||||
column value truncated to 255 characters. If the final quote has been
|
||||
truncated the parsecvsstring method in the servlet does not work
|
||||
fine. Bug fixed adding the final quote. convertToJavaType method in
|
||||
DatabaseManagement class modified.
|
||||
</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.dataaccess.database-resource-manager.1-1-0"
|
||||
date="2014-09-10">
|
||||
|
|
|
@ -201,10 +201,17 @@ public class DatabaseManagement {
|
|||
|
||||
}
|
||||
|
||||
//truncate value to 255 characters if it exceeds 255 characters
|
||||
//to truncate value to 255 characters if it exceeds 255 characters
|
||||
if(valConverted.length()>255){
|
||||
valConverted = valConverted.substring(0, 255);
|
||||
// System.out.println("val truncated: " + valConverted);
|
||||
// System.out.println("elem geometry truncated");
|
||||
|
||||
//add quote if it has been removed with truncation
|
||||
if((valConverted.startsWith("\""))&&(!valConverted.endsWith("\""))){
|
||||
valConverted = valConverted+"\"";
|
||||
// System.out.println("adding quote: " + valConverted);
|
||||
}
|
||||
}
|
||||
return valConverted;
|
||||
|
||||
|
|
Loading…
Reference in New Issue