Lines 51-57
Link Here
|
51 |
import java.util.logging.Level; |
51 |
import java.util.logging.Level; |
52 |
import java.util.logging.Logger; |
52 |
import java.util.logging.Logger; |
53 |
import org.netbeans.modules.db.metadata.model.MetadataUtilities; |
53 |
import org.netbeans.modules.db.metadata.model.MetadataUtilities; |
|
|
54 |
import org.netbeans.modules.db.metadata.model.api.Autoincrement; |
54 |
import org.netbeans.modules.db.metadata.model.api.Column; |
55 |
import org.netbeans.modules.db.metadata.model.api.Column; |
|
|
56 |
import org.netbeans.modules.db.metadata.model.api.Generated; |
55 |
import org.netbeans.modules.db.metadata.model.api.MetadataException; |
57 |
import org.netbeans.modules.db.metadata.model.api.MetadataException; |
56 |
import org.netbeans.modules.db.metadata.model.api.Schema; |
58 |
import org.netbeans.modules.db.metadata.model.api.Schema; |
57 |
import org.netbeans.modules.db.metadata.model.spi.ViewImplementation; |
59 |
import org.netbeans.modules.db.metadata.model.spi.ViewImplementation; |
Lines 99-106
Link Here
|
99 |
|
101 |
|
100 |
protected JDBCColumn createJDBCColumn(ResultSet rs) throws SQLException { |
102 |
protected JDBCColumn createJDBCColumn(ResultSet rs) throws SQLException { |
101 |
int ordinalPosition = rs.getInt("ORDINAL_POSITION"); |
103 |
int ordinalPosition = rs.getInt("ORDINAL_POSITION"); |
102 |
return new JDBCColumn(this.getView(), ordinalPosition, JDBCValue.createTableColumnValue(rs, this.getView())); |
104 |
Autoincrement autoincrement = Autoincrement.UNKNOWN; |
|
|
105 |
Generated generated = Generated.UNKNOWN; |
106 |
// Check existence of relevant columns |
107 |
if( rs.getMetaData().getColumnCount() >= 23 ) { |
108 |
String autoincrementString = rs.getString("IS_AUTOINCREMENT"); |
109 |
if("YES".equalsIgnoreCase(autoincrementString)) { |
110 |
autoincrement = Autoincrement.AUTOINCREMENT; |
111 |
} else if("NO".equalsIgnoreCase(autoincrementString)) { |
112 |
autoincrement = Autoincrement.NOT_AUTOINCREMENT; |
103 |
} |
113 |
} |
|
|
114 |
} |
115 |
if( rs.getMetaData().getColumnCount() >= 24 ) { |
116 |
String generatedcolumnString = rs.getString("IS_GENERATEDCOLUMN"); |
117 |
if("YES".equalsIgnoreCase(generatedcolumnString)) { |
118 |
generated = Generated.GENERATED; |
119 |
} else if("NO".equalsIgnoreCase(generatedcolumnString)) { |
120 |
generated = Generated.NOT_GENERATED; |
121 |
} |
122 |
} |
123 |
return new JDBCColumn(this.getView(), ordinalPosition, generated, autoincrement, JDBCValue.createTableColumnValue(rs, this.getView())); |
124 |
} |
104 |
|
125 |
|
105 |
protected void createColumns() { |
126 |
protected void createColumns() { |
106 |
Map<String, Column> newColumns = new LinkedHashMap<String, Column>(); |
127 |
Map<String, Column> newColumns = new LinkedHashMap<String, Column>(); |