Skip to content

Commit 98e2b7b

Browse files
committed
- Fixed bug parsing field names returned by SQLite
git-svn-id: svn://192.168.0.80/JavaXT/javaxt-core@695 2c7b0aa6-e0b2-3c4e-bb4a-8b65b6c465ff
1 parent a7ec59e commit 98e2b7b

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/javaxt/io/Image.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ private String getExtension(String FileName){
15141514
//** hasColor
15151515
//**************************************************************************
15161516
/** Used to determine whether a given pixel has a color value. Returns false
1517-
* if the pixel is white or transparent.
1517+
* if the pixel matches the input color or is transparent.
15181518
*/
15191519
private boolean hasColor(int pixel, int red, int green, int blue){
15201520

src/javaxt/sql/Field.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ protected Field(int i, java.sql.ResultSetMetaData rsmd){
3030
try{ Schema = getValue(rsmd.getSchemaName(i)); } catch(Exception e){}
3131
try{ Type = getValue(rsmd.getColumnTypeName(i)); } catch(Exception e){}
3232
try{ Class = getValue(rsmd.getColumnClassName(i)); } catch(Exception e){}
33+
34+
35+
//Special case. Discovered that the column name was returning a
36+
//table prefix when performing a union quiries with SQLite
37+
if (Name!=null && Name.contains(".")){
38+
String[] arr = Name.split("\\.");
39+
if (arr.length==3){
40+
Name = arr[2];
41+
Table = arr[1];
42+
Schema = arr[0];
43+
}
44+
else if (arr.length==2){
45+
Name = arr[1];
46+
Table = arr[0];
47+
}
48+
else if (arr.length==1){
49+
Name = arr[0];
50+
}
51+
}
3352
}
3453

3554

0 commit comments

Comments
 (0)