@@ -219,7 +219,7 @@ public boolean nullsAreSortedAtEnd() throws SQLException {
219
219
*/
220
220
@ Override
221
221
public String getDatabaseProductVersion () throws SQLException {
222
- return null ;
222
+ return ExcelDriver . MAJOR_VERSION + "." + ExcelDriver . MINOR_VERSION ;
223
223
}
224
224
225
225
/**
@@ -347,53 +347,47 @@ public String getIdentifierQuoteString() throws SQLException {
347
347
*/
348
348
@ Override
349
349
public String getSQLKeywords () throws SQLException {
350
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
351
- return null ;
350
+ return "" ;
352
351
}
353
352
354
353
/**
355
354
* {@inheritDoc}
356
355
*/
357
356
@ Override
358
357
public String getNumericFunctions () throws SQLException {
359
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
360
- return null ;
358
+ return "" ;
361
359
}
362
360
363
361
/**
364
362
* {@inheritDoc}
365
363
*/
366
364
@ Override
367
365
public String getStringFunctions () throws SQLException {
368
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
369
- return null ;
366
+ return "" ;
370
367
}
371
368
372
369
/**
373
370
* {@inheritDoc}
374
371
*/
375
372
@ Override
376
373
public String getSystemFunctions () throws SQLException {
377
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
378
- return null ;
374
+ return "" ;
379
375
}
380
376
381
377
/**
382
378
* {@inheritDoc}
383
379
*/
384
380
@ Override
385
381
public String getTimeDateFunctions () throws SQLException {
386
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
387
- return null ;
382
+ return "" ;
388
383
}
389
384
390
385
/**
391
386
* {@inheritDoc}
392
387
*/
393
388
@ Override
394
389
public String getSearchStringEscape () throws SQLException {
395
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
396
- return null ;
390
+ return "" ;
397
391
}
398
392
399
393
/**
@@ -634,17 +628,15 @@ public String getSchemaTerm() throws SQLException {
634
628
*/
635
629
@ Override
636
630
public String getProcedureTerm () throws SQLException {
637
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
638
- return null ;
631
+ return "sheet" ;
639
632
}
640
633
641
634
/**
642
635
* {@inheritDoc}
643
636
*/
644
637
@ Override
645
638
public String getCatalogTerm () throws SQLException {
646
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
647
- return null ;
639
+ return "file" ;
648
640
}
649
641
650
642
/**
@@ -1181,26 +1173,26 @@ public ResultSet getProcedureColumns( String catalog, String schemaPattern, Stri
1181
1173
*/
1182
1174
@ Override
1183
1175
public ResultSet getSchemas () throws SQLException {
1184
- ExcelDriver . throwExceptionAboutUnsupportedOperation ( );
1185
- return null ;
1176
+ List < String > columnNames = Arrays . asList ( "TABLE_SCHEM" , "TABLE_CATALOG" );
1177
+ return new ExcelDatabaseResultSet ( columnNames , new ArrayList <>() ) ;
1186
1178
}
1187
1179
1188
1180
/**
1189
1181
* {@inheritDoc}
1190
1182
*/
1191
1183
@ Override
1192
1184
public ResultSet getCatalogs () throws SQLException {
1193
- ExcelDriver . throwExceptionAboutUnsupportedOperation ( );
1194
- return null ;
1185
+ List < String > columnNames = Arrays . asList ( "TABLE_CAT" );
1186
+ return new ExcelDatabaseResultSet ( columnNames , new ArrayList <>() ) ;
1195
1187
}
1196
1188
1197
1189
/**
1198
1190
* {@inheritDoc}
1199
1191
*/
1200
1192
@ Override
1201
1193
public ResultSet getTableTypes () throws SQLException {
1202
- ExcelDriver . throwExceptionAboutUnsupportedOperation ( );
1203
- return null ;
1194
+ List < String > columnNames = Arrays . asList ( "TABLE_TYPE" );
1195
+ return new ExcelDatabaseResultSet ( columnNames , new ArrayList <>() ) ;
1204
1196
}
1205
1197
1206
1198
/**
@@ -1280,8 +1272,10 @@ public ResultSet getCrossReference( String parentCatalog, String parentSchema, S
1280
1272
*/
1281
1273
@ Override
1282
1274
public ResultSet getTypeInfo () throws SQLException {
1283
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
1284
- return null ;
1275
+ List <String > columnNames = Arrays .asList ( "TYPE_NAME" , "DATA_TYPE" , "PRECISION" , "LITERAL_PREFIX" , "LITERAL_SUFFIX" , "CREATE_PARAMS" , "NULLABLE" , "CASE_SENSITIVE" , "SEARCHABLE" , //
1276
+ "UNSIGNED_ATTRIBUTE" , "FIXED_PREC_SCALE" , "AUTO_INCREMENT" , "LOCAL_TYPE_NAME" , "MINIMUM_SCALE" , "MAXIMUM_SCALE" , //
1277
+ "SQL_DATA_TYPE" , "SQL_DATETIME_SUB" , "NUM_PREC_RADIX" );
1278
+ return new ExcelDatabaseResultSet ( columnNames , new ArrayList <>() );
1285
1279
}
1286
1280
1287
1281
/**
@@ -1394,8 +1388,8 @@ public boolean supportsBatchUpdates() throws SQLException {
1394
1388
*/
1395
1389
@ Override
1396
1390
public ResultSet getUDTs ( String catalog , String schemaPattern , String typeNamePattern , int [] types ) throws SQLException {
1397
- ExcelDriver . throwExceptionAboutUnsupportedOperation ( );
1398
- return null ;
1391
+ List < String > columnNames = Arrays . asList ( "TYPE_CAT" , "TYPE_SCHEM" , "TYPE_NAME" , "CLASS_NAME" , "DATA_TYPE" , "REMARKS" , "BASE_TYPE" );
1392
+ return new ExcelDatabaseResultSet ( columnNames , new ArrayList <>() ) ;
1399
1393
}
1400
1394
1401
1395
/**
@@ -1489,17 +1483,15 @@ public int getResultSetHoldability() throws SQLException {
1489
1483
*/
1490
1484
@ Override
1491
1485
public int getDatabaseMajorVersion () throws SQLException {
1492
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
1493
- return 0 ;
1486
+ return ExcelDriver .MAJOR_VERSION ;
1494
1487
}
1495
1488
1496
1489
/**
1497
1490
* {@inheritDoc}
1498
1491
*/
1499
1492
@ Override
1500
1493
public int getDatabaseMinorVersion () throws SQLException {
1501
- ExcelDriver .throwExceptionAboutUnsupportedOperation ();
1502
- return 0 ;
1494
+ return ExcelDriver .MINOR_VERSION ;
1503
1495
}
1504
1496
1505
1497
/**
@@ -1593,8 +1585,8 @@ public ResultSet getClientInfoProperties() throws SQLException {
1593
1585
*/
1594
1586
@ Override
1595
1587
public ResultSet getFunctions ( String catalog , String schemaPattern , String functionNamePattern ) throws SQLException {
1596
- ExcelDriver . throwExceptionAboutUnsupportedOperation ( );
1597
- return null ;
1588
+ List < String > columnNames = Arrays . asList ( "FUNCTION_CAT" , "FUNCTION_SCHEM" , "FUNCTION_NAME" , "REMARKS" , "FUNCTION_TYPE" , "SPECIFIC_NAME" );
1589
+ return new ExcelDatabaseResultSet ( columnNames , new ArrayList <>() ) ;
1598
1590
}
1599
1591
1600
1592
/**
0 commit comments