2
Copyright (C) 2009, 2011 Volker Berlin (i-net software)
4
This software is provided 'as-is', without any express or implied
5
warranty. In no event will the authors be held liable for any damages
6
arising from the use of this software.
8
Permission is granted to anyone to use this software for any purpose,
9
including commercial applications, and to alter it and redistribute it
10
freely, subject to the following restrictions:
12
1. The origin of this software must not be misrepresented; you must not
13
claim that you wrote the original software. If you use this software
14
in a product, an acknowledgment in the product documentation would be
15
appreciated but is not required.
16
2. Altered source versions must be plainly marked as such, and must not be
17
misrepresented as being the original software.
18
3. This notice may not be removed or altered from any source distribution.
24
package sun.jdbc.odbc;
29
import java.util.HashSet;
31
import cli.System.Data.*;
32
import cli.System.Data.Common.*;
33
import cli.System.Data.Odbc.*;
36
* @author Volker Berlin
38
public class JdbcOdbcDatabaseMetaData implements DatabaseMetaData{
40
private JdbcOdbcConnection jdbcConn;
42
private final OdbcConnection netConn;
44
private DataRow dataSourceInfo;
46
public JdbcOdbcDatabaseMetaData(JdbcOdbcConnection jdbcConn, OdbcConnection netConn){
47
this.jdbcConn = jdbcConn;
48
this.netConn = netConn;
52
public boolean allProceduresAreCallable() throws SQLException{
53
// TODO Auto-generated method stub
58
public boolean allTablesAreSelectable() throws SQLException{
59
// TODO Auto-generated method stub
64
public boolean autoCommitFailureClosesAllResultSets(){
65
throw new UnsupportedOperationException();
69
public boolean dataDefinitionCausesTransactionCommit() throws SQLException{
70
// TODO Auto-generated method stub
75
public boolean dataDefinitionIgnoredInTransactions() throws SQLException{
76
// TODO Auto-generated method stub
81
public boolean deletesAreDetected(int type) throws SQLException{
82
// TODO Auto-generated method stub
87
public boolean doesMaxRowSizeIncludeBlobs() throws SQLException{
88
// TODO Auto-generated method stub
93
public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern,
94
String attributeNamePattern){
95
throw new UnsupportedOperationException();
99
public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)
101
// TODO Auto-generated method stub
106
public String getCatalogSeparator() throws SQLException{
107
// TODO Auto-generated method stub
112
public String getCatalogTerm() throws SQLException{
113
// TODO Auto-generated method stub
118
public ResultSet getCatalogs() throws SQLException{
119
// TODO Auto-generated method stub
124
public ResultSet getClientInfoProperties(){
125
throw new UnsupportedOperationException();
129
public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern)
131
// TODO Auto-generated method stub
136
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
139
// the description of the restrictions can you request with GetSchema("Restrictions")
140
String[] restrictions = new String[]{catalog, schemaPattern, tableNamePattern, columnNamePattern};
141
DataTable data = netConn.GetSchema(OdbcMetaDataCollectionNames.Columns, restrictions);
142
return new JdbcOdbcDTResultSet(data);
143
}catch(Throwable th){
144
throw JdbcOdbcUtils.createSQLException(th);
149
public Connection getConnection(){
154
public ResultSet getCrossReference(String parentCatalog, String parentSchema, String parentTable,
155
String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException{
156
// TODO Auto-generated method stub
161
public int getDatabaseMajorVersion(){
162
String version = netConn.get_ServerVersion().trim();
163
for(int i = 0; i < version.length(); i++){
164
char ch = version.charAt(i);
165
if(ch < '0' || ch > '9'){
166
return Integer.parseInt(version.substring(0, i));
169
return Integer.parseInt(version);
173
public int getDatabaseMinorVersion(){
174
String version = netConn.get_ServerVersion().trim();
175
int idx = version.indexOf('.');
179
version = version.substring(idx + 1);
180
for(int i = 0; i < version.length(); i++){
181
char ch = version.charAt(i);
182
if(ch < '0' || ch > '9'){
183
return Integer.parseInt(version.substring(0, i));
186
return Integer.parseInt(version);
190
public String getDatabaseProductName() throws SQLException{
191
return String.valueOf(getInfo(DbMetaDataColumnNames.DataSourceProductName));
195
public String getDatabaseProductVersion(){
196
return netConn.get_ServerVersion();
200
public int getDefaultTransactionIsolation(){
201
return Connection.TRANSACTION_READ_COMMITTED;
205
public int getDriverMajorVersion(){
210
public int getDriverMinorVersion(){
215
public String getDriverName(){
216
return "JDBC-ODBC Bridge (" + netConn.get_Driver() + ")";
220
public String getDriverVersion(){
225
public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException{
226
// TODO Auto-generated method stub
231
public String getExtraNameCharacters(){
236
public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern,
237
String columnNamePattern){
238
throw new UnsupportedOperationException();
242
public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern){
243
throw new UnsupportedOperationException();
247
public String getIdentifierQuoteString() throws SQLException{
248
String quote = (String)getInfo(DbMetaDataColumnNames.QuotedIdentifierPattern);
249
if(quote.length()>=2){
250
char ch1 = quote.charAt(0);
251
char ch2 = quote.charAt(quote.length()-1);
253
return quote.substring(0,1);
256
return "\""; // ANSI SQL and should work with the most DBMS
260
public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException{
261
// TODO Auto-generated method stub
266
public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate)
269
// the description of the restrictions can you request with GetSchema("Restrictions")
270
String[] restrictions = new String[]{catalog, schema, table};
271
DataTable data = netConn.GetSchema(OdbcMetaDataCollectionNames.Indexes, restrictions);
272
return new JdbcOdbcDTResultSet(data);
273
}catch(Throwable th){
274
throw JdbcOdbcUtils.createSQLException(th);
279
public int getJDBCMajorVersion(){
284
public int getJDBCMinorVersion(){
289
public int getMaxBinaryLiteralLength() throws SQLException{
290
// TODO Auto-generated method stub
295
public int getMaxCatalogNameLength() throws SQLException{
296
// TODO Auto-generated method stub
301
public int getMaxCharLiteralLength() throws SQLException{
302
// TODO Auto-generated method stub
307
public int getMaxColumnNameLength() throws SQLException{
308
// TODO Auto-generated method stub
313
public int getMaxColumnsInGroupBy() throws SQLException{
314
// TODO Auto-generated method stub
319
public int getMaxColumnsInIndex() throws SQLException{
320
// TODO Auto-generated method stub
325
public int getMaxColumnsInOrderBy() throws SQLException{
326
// TODO Auto-generated method stub
331
public int getMaxColumnsInSelect() throws SQLException{
332
// TODO Auto-generated method stub
337
public int getMaxColumnsInTable() throws SQLException{
338
// TODO Auto-generated method stub
343
public int getMaxConnections() throws SQLException{
344
// TODO Auto-generated method stub
349
public int getMaxCursorNameLength() throws SQLException{
350
// TODO Auto-generated method stub
355
public int getMaxIndexLength() throws SQLException{
356
// TODO Auto-generated method stub
361
public int getMaxProcedureNameLength() throws SQLException{
362
// TODO Auto-generated method stub
367
public int getMaxRowSize() throws SQLException{
368
// TODO Auto-generated method stub
373
public int getMaxSchemaNameLength() throws SQLException{
374
// TODO Auto-generated method stub
379
public int getMaxStatementLength() throws SQLException{
380
// TODO Auto-generated method stub
385
public int getMaxStatements() throws SQLException{
386
// TODO Auto-generated method stub
391
public int getMaxTableNameLength() throws SQLException{
392
// TODO Auto-generated method stub
397
public int getMaxTablesInSelect() throws SQLException{
398
// TODO Auto-generated method stub
403
public int getMaxUserNameLength() throws SQLException{
404
// TODO Auto-generated method stub
409
public String getNumericFunctions() throws SQLException{
410
// TODO Auto-generated method stub
415
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException{
416
// TODO Auto-generated method stub
421
public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern,
422
String columnNamePattern) throws SQLException{
424
// the description of the restrictions can you request with GetSchema("Restrictions")
425
String[] restrictions = new String[]{catalog, schemaPattern, procedureNamePattern, columnNamePattern};
426
DataTable dt1 = netConn.GetSchema(OdbcMetaDataCollectionNames.ProcedureColumns, restrictions);
427
DataTable dt2 = netConn.GetSchema(OdbcMetaDataCollectionNames.ProcedureParameters, restrictions);
428
// concatenate the both DataTable
429
DataRowCollection rows1 = dt1.get_Rows();
430
DataRowCollection rows2 = dt2.get_Rows();
431
for(int i = 0; i < rows2.get_Count(); i++){
432
DataRow row = rows2.get_Item(i);
433
rows1.Add(row.get_ItemArray());
435
return new JdbcOdbcDTResultSet(dt1);
436
}catch(Throwable th){
437
throw JdbcOdbcUtils.createSQLException(th);
442
public String getProcedureTerm() throws SQLException{
443
// TODO Auto-generated method stub
448
public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern)
451
// the description of the restrictions can you request with GetSchema("Restrictions")
452
String[] restrictions = new String[]{catalog, schemaPattern, procedureNamePattern};
453
DataTable data = netConn.GetSchema(OdbcMetaDataCollectionNames.Procedures, restrictions);
454
return new JdbcOdbcDTResultSet(data);
455
}catch(Throwable th){
456
throw JdbcOdbcUtils.createSQLException(th);
461
public int getResultSetHoldability(){
462
throw new UnsupportedOperationException();
466
public RowIdLifetime getRowIdLifetime(){
467
throw new UnsupportedOperationException();
471
public String getSQLKeywords() throws SQLException{
473
DataTable dt = netConn.GetSchema(DbMetaDataCollectionNames.ReservedWords);
474
final DataRowCollection rows = dt.get_Rows();
475
final int count = rows.get_Count();
476
final StringBuilder builder = new StringBuilder();
477
for(int i=0; i<count; i++){
478
String word = (String)rows.get_Item(i).get_Item(0);
479
if(builder.length() > 0){
482
builder.append(word);
484
return builder.toString();
485
}catch(Throwable th){
486
throw JdbcOdbcUtils.createSQLException(th);
491
public int getSQLStateType() throws SQLException{
492
// TODO Auto-generated method stub
497
public String getSchemaTerm() throws SQLException{
498
// TODO Auto-generated method stub
503
public ResultSet getSchemas() throws SQLException{
504
// TODO Auto-generated method stub
509
public ResultSet getSchemas(String catalog, String schemaPattern){
510
throw new UnsupportedOperationException();
514
public String getSearchStringEscape() throws SQLException{
515
// TODO Auto-generated method stub
520
public String getStringFunctions() throws SQLException{
521
// TODO Auto-generated method stub
526
public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern){
527
throw new UnsupportedOperationException();
531
public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern){
532
throw new UnsupportedOperationException();
536
public String getSystemFunctions() throws SQLException{
537
// TODO Auto-generated method stub
542
public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)
544
// TODO Auto-generated method stub
549
public ResultSet getTableTypes() throws SQLException{
550
// TODO Auto-generated method stub
555
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
558
// the description of the restrictions can you request with GetSchema("Restrictions")
559
String[] restrictions = new String[]{catalog, schemaPattern, tableNamePattern};
560
DataTable dt1 = netConn.GetSchema(OdbcMetaDataCollectionNames.Tables, restrictions);
561
DataTable dt2 = netConn.GetSchema(OdbcMetaDataCollectionNames.Views, restrictions);
562
// concatenate the both DataTable
563
DataRowCollection rows1 = dt1.get_Rows();
564
DataRowCollection rows2 = dt2.get_Rows();
565
for(int i = 0; i < rows2.get_Count(); i++){
566
DataRow row = rows2.get_Item(i);
567
rows1.Add(row.get_ItemArray());
572
for(int i = rows1.get_Count() - 1; i >= 0; i--){
573
DataRow row = rows1.get_Item(i);
574
Object tableType = row.get_Item("TABLE_TYPE");
575
for(String type : types){
576
if(type.equals(tableType)){
583
return new JdbcOdbcDTResultSet(dt1);
584
}catch(Throwable th){
585
throw JdbcOdbcUtils.createSQLException(th);
590
public String getTimeDateFunctions() throws SQLException{
591
// TODO Auto-generated method stub
596
public ResultSet getTypeInfo() throws SQLException{
598
//TODO Column Names and order are wrong
599
DataTable data = netConn.GetSchema(DbMetaDataCollectionNames.DataTypes);
600
return new JdbcOdbcDTResultSet(data);
601
}catch(Throwable th){
602
throw JdbcOdbcUtils.createSQLException(th);
607
public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types){
608
throw new UnsupportedOperationException();
612
public String getURL() throws SQLException{
613
// TODO Auto-generated method stub
618
public String getUserName() throws SQLException{
619
// TODO Auto-generated method stub
624
public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException{
625
// TODO Auto-generated method stub
630
public boolean insertsAreDetected(int type) throws SQLException{
631
// TODO Auto-generated method stub
636
public boolean isCatalogAtStart() throws SQLException{
637
// TODO Auto-generated method stub
642
public boolean isReadOnly() throws SQLException{
643
// TODO Auto-generated method stub
648
public boolean locatorsUpdateCopy(){
649
throw new UnsupportedOperationException();
653
public boolean nullPlusNonNullIsNull() throws SQLException{
654
// TODO Auto-generated method stub
659
public boolean nullsAreSortedAtEnd() throws SQLException{
660
// TODO Auto-generated method stub
665
public boolean nullsAreSortedAtStart() throws SQLException{
666
// TODO Auto-generated method stub
671
public boolean nullsAreSortedHigh() throws SQLException{
672
// TODO Auto-generated method stub
677
public boolean nullsAreSortedLow() throws SQLException{
678
// TODO Auto-generated method stub
683
public boolean othersDeletesAreVisible(int type) throws SQLException{
684
// TODO Auto-generated method stub
689
public boolean othersInsertsAreVisible(int type) throws SQLException{
690
// TODO Auto-generated method stub
695
public boolean othersUpdatesAreVisible(int type) throws SQLException{
696
// TODO Auto-generated method stub
701
public boolean ownDeletesAreVisible(int type) throws SQLException{
702
// TODO Auto-generated method stub
707
public boolean ownInsertsAreVisible(int type) throws SQLException{
708
// TODO Auto-generated method stub
713
public boolean ownUpdatesAreVisible(int type) throws SQLException{
714
// TODO Auto-generated method stub
719
public boolean storesLowerCaseIdentifiers() throws SQLException{
720
// TODO Auto-generated method stub
725
public boolean storesLowerCaseQuotedIdentifiers() throws SQLException{
726
// TODO Auto-generated method stub
731
public boolean storesMixedCaseIdentifiers() throws SQLException{
732
// TODO Auto-generated method stub
737
public boolean storesMixedCaseQuotedIdentifiers() throws SQLException{
738
// TODO Auto-generated method stub
743
public boolean storesUpperCaseIdentifiers() throws SQLException{
744
// TODO Auto-generated method stub
749
public boolean storesUpperCaseQuotedIdentifiers() throws SQLException{
750
// TODO Auto-generated method stub
755
public boolean supportsANSI92EntryLevelSQL() throws SQLException{
756
// TODO Auto-generated method stub
761
public boolean supportsANSI92FullSQL() throws SQLException{
762
// TODO Auto-generated method stub
767
public boolean supportsANSI92IntermediateSQL() throws SQLException{
768
// TODO Auto-generated method stub
773
public boolean supportsAlterTableWithAddColumn() throws SQLException{
774
// TODO Auto-generated method stub
779
public boolean supportsAlterTableWithDropColumn() throws SQLException{
780
// TODO Auto-generated method stub
785
public boolean supportsBatchUpdates() throws SQLException{
786
// TODO Auto-generated method stub
791
public boolean supportsCatalogsInDataManipulation() throws SQLException{
792
// TODO Auto-generated method stub
797
public boolean supportsCatalogsInIndexDefinitions() throws SQLException{
798
// TODO Auto-generated method stub
803
public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException{
804
// TODO Auto-generated method stub
809
public boolean supportsCatalogsInProcedureCalls() throws SQLException{
810
// TODO Auto-generated method stub
815
public boolean supportsCatalogsInTableDefinitions() throws SQLException{
816
// TODO Auto-generated method stub
821
public boolean supportsColumnAliasing() throws SQLException{
822
// TODO Auto-generated method stub
827
public boolean supportsConvert() throws SQLException{
828
// TODO Auto-generated method stub
833
public boolean supportsConvert(int fromType, int toType) throws SQLException{
834
// TODO Auto-generated method stub
839
public boolean supportsCoreSQLGrammar() throws SQLException{
840
// TODO Auto-generated method stub
845
public boolean supportsCorrelatedSubqueries() throws SQLException{
846
// TODO Auto-generated method stub
851
public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException{
852
// TODO Auto-generated method stub
857
public boolean supportsDataManipulationTransactionsOnly() throws SQLException{
858
// TODO Auto-generated method stub
863
public boolean supportsDifferentTableCorrelationNames() throws SQLException{
864
// TODO Auto-generated method stub
869
public boolean supportsExpressionsInOrderBy() throws SQLException{
870
// TODO Auto-generated method stub
875
public boolean supportsExtendedSQLGrammar() throws SQLException{
876
// TODO Auto-generated method stub
881
public boolean supportsFullOuterJoins() throws SQLException{
882
int join = CIL.unbox_int(getInfo(DbMetaDataColumnNames.SupportedJoinOperators));
883
return (join & SupportedJoinOperators.FullOuter) > 0;
887
public boolean supportsGetGeneratedKeys() throws SQLException{
888
// TODO Auto-generated method stub
893
public boolean supportsGroupBy() throws SQLException{
894
int behavior = CIL.unbox_int(getInfo(DbMetaDataColumnNames.GroupByBehavior));
895
return behavior != GroupByBehavior.NotSupported;
899
public boolean supportsGroupByBeyondSelect() throws SQLException{
900
int behavior = CIL.unbox_int(getInfo(DbMetaDataColumnNames.GroupByBehavior));
901
return behavior == GroupByBehavior.MustContainAll;
905
public boolean supportsGroupByUnrelated() throws SQLException{
906
int behavior = CIL.unbox_int(getInfo(DbMetaDataColumnNames.GroupByBehavior));
907
return behavior == GroupByBehavior.Unrelated;
911
public boolean supportsIntegrityEnhancementFacility() throws SQLException{
912
// TODO Auto-generated method stub
917
public boolean supportsLikeEscapeClause() throws SQLException{
918
return getSQLKeywords().toUpperCase().indexOf(",LIKE,") > 0;
922
public boolean supportsLimitedOuterJoins() throws SQLException{
923
int join = CIL.unbox_int(getInfo(DbMetaDataColumnNames.SupportedJoinOperators));
928
public boolean supportsMinimumSQLGrammar() throws SQLException{
929
// TODO Auto-generated method stub
934
public boolean supportsMixedCaseIdentifiers() throws SQLException{
935
int identifierCase = CIL.unbox_int(getInfo(DbMetaDataColumnNames.IdentifierCase));
936
return identifierCase == IdentifierCase.Sensitive;
940
public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException{
941
int identifierCase = CIL.unbox_int(getInfo(DbMetaDataColumnNames.QuotedIdentifierCase));
942
return identifierCase == IdentifierCase.Sensitive;
946
public boolean supportsMultipleOpenResults() throws SQLException{
947
// TODO Auto-generated method stub
952
public boolean supportsMultipleResultSets() throws SQLException{
953
// TODO Auto-generated method stub
958
public boolean supportsMultipleTransactions() throws SQLException{
959
// TODO Auto-generated method stub
964
public boolean supportsNamedParameters() throws SQLException{
965
// TODO Auto-generated method stub
970
public boolean supportsNonNullableColumns() throws SQLException{
971
// TODO Auto-generated method stub
976
public boolean supportsOpenCursorsAcrossCommit() throws SQLException{
977
// TODO Auto-generated method stub
982
public boolean supportsOpenCursorsAcrossRollback() throws SQLException{
983
// TODO Auto-generated method stub
988
public boolean supportsOpenStatementsAcrossCommit() throws SQLException{
989
// TODO Auto-generated method stub
994
public boolean supportsOpenStatementsAcrossRollback() throws SQLException{
995
// TODO Auto-generated method stub
1000
public boolean supportsOrderByUnrelated() throws SQLException{
1001
return CIL.unbox_boolean( getInfo(DbMetaDataColumnNames.OrderByColumnsInSelect));
1005
public boolean supportsOuterJoins() throws SQLException{
1006
int join = CIL.unbox_int(getInfo(DbMetaDataColumnNames.SupportedJoinOperators));
1007
return (join & SupportedJoinOperators.LeftOuter) > 0 || (join & SupportedJoinOperators.RightOuter) > 0;
1011
public boolean supportsPositionedDelete() throws SQLException{
1012
// TODO Auto-generated method stub
1017
public boolean supportsPositionedUpdate() throws SQLException{
1018
// TODO Auto-generated method stub
1023
public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException{
1024
// TODO Auto-generated method stub
1029
public boolean supportsResultSetHoldability(int holdability){
1030
throw new UnsupportedOperationException();
1034
public boolean supportsResultSetType(int type) throws SQLException{
1035
// TODO Auto-generated method stub
1040
public boolean supportsSavepoints() throws SQLException{
1041
// TODO Auto-generated method stub
1046
public boolean supportsSchemasInDataManipulation() throws SQLException{
1047
// TODO Auto-generated method stub
1052
public boolean supportsSchemasInIndexDefinitions() throws SQLException{
1053
// TODO Auto-generated method stub
1058
public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException{
1059
// TODO Auto-generated method stub
1064
public boolean supportsSchemasInProcedureCalls() throws SQLException{
1065
// TODO Auto-generated method stub
1070
public boolean supportsSchemasInTableDefinitions() throws SQLException{
1071
// TODO Auto-generated method stub
1076
public boolean supportsSelectForUpdate() throws SQLException{
1077
// TODO Auto-generated method stub
1082
public boolean supportsStatementPooling(){
1083
throw new UnsupportedOperationException();
1087
public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException{
1088
throw new UnsupportedOperationException();
1092
public boolean supportsStoredProcedures() throws SQLException{
1093
// TODO Auto-generated method stub
1098
public boolean supportsSubqueriesInComparisons() throws SQLException{
1099
// TODO Auto-generated method stub
1104
public boolean supportsSubqueriesInExists() throws SQLException{
1105
// TODO Auto-generated method stub
1110
public boolean supportsSubqueriesInIns() throws SQLException{
1111
// TODO Auto-generated method stub
1116
public boolean supportsSubqueriesInQuantifieds() throws SQLException{
1117
// TODO Auto-generated method stub
1122
public boolean supportsTableCorrelationNames() throws SQLException{
1123
// TODO Auto-generated method stub
1128
public boolean supportsTransactionIsolationLevel(int level) throws SQLException{
1129
// TODO Auto-generated method stub
1134
public boolean supportsTransactions() throws SQLException{
1135
// TODO Auto-generated method stub
1140
public boolean supportsUnion() throws SQLException{
1141
// TODO Auto-generated method stub
1146
public boolean supportsUnionAll() throws SQLException{
1147
// TODO Auto-generated method stub
1152
public boolean updatesAreDetected(int type) throws SQLException{
1153
// TODO Auto-generated method stub
1158
public boolean usesLocalFilePerTable() throws SQLException{
1159
// TODO Auto-generated method stub
1164
public boolean usesLocalFiles() throws SQLException{
1165
// TODO Auto-generated method stub
1170
public boolean isWrapperFor(Class<?> iface){
1171
return iface.isAssignableFrom(this.getClass());
1175
public <T>T unwrap(Class<T> iface) throws SQLException{
1176
if(isWrapperFor(iface)){
1179
throw new SQLException(this.getClass().getName() + " does not implements " + iface.getName() + ".", "01000");
1182
private Object getInfo(String key) throws SQLException{
1184
if(dataSourceInfo == null){
1185
DataTable td = netConn.GetSchema(DbMetaDataCollectionNames.DataSourceInformation);
1186
dataSourceInfo = td.get_Rows().get_Item(0);
1188
return dataSourceInfo.get_Item(key);
1189
}catch(Throwable th){
1190
throw JdbcOdbcUtils.createSQLException(th);
1198
public ResultSet getPseudoColumns(String catalog, String schemaPattern,
1199
String tableNamePattern, String columnNamePattern)
1200
throws SQLException {
1201
throw new SQLFeatureNotSupportedException();
1208
public boolean generatedKeyAlwaysReturned() throws SQLException {