This commit is contained in:
zyyang 2021-01-15 18:31:49 +08:00
parent 456f2a82f2
commit bbd9fdc654
2 changed files with 36 additions and 20 deletions

View File

@ -900,7 +900,7 @@ public class TSDBDatabaseMetaData implements java.sql.DatabaseMetaData {
} }
public int getDatabaseMajorVersion() throws SQLException { public int getDatabaseMajorVersion() throws SQLException {
return 0; return 2;
} }
public int getDatabaseMinorVersion() throws SQLException { public int getDatabaseMinorVersion() throws SQLException {
@ -908,7 +908,7 @@ public class TSDBDatabaseMetaData implements java.sql.DatabaseMetaData {
} }
public int getJDBCMajorVersion() throws SQLException { public int getJDBCMajorVersion() throws SQLException {
return 0; return 2;
} }
public int getJDBCMinorVersion() throws SQLException { public int getJDBCMinorVersion() throws SQLException {

View File

@ -827,71 +827,87 @@ public class TSDBDatabaseMetaDataTest {
} }
@Test @Test
public void getResultSetHoldability() { public void getResultSetHoldability() throws SQLException {
Assert.assertEquals(1, metaData.getResultSetHoldability());
} }
@Test @Test
public void getDatabaseMajorVersion() { public void getDatabaseMajorVersion() throws SQLException {
Assert.assertEquals(2, metaData.getDatabaseMajorVersion());
} }
@Test @Test
public void getDatabaseMinorVersion() { public void getDatabaseMinorVersion() throws SQLException {
Assert.assertEquals(0, metaData.getDatabaseMinorVersion());
} }
@Test @Test
public void getJDBCMajorVersion() { public void getJDBCMajorVersion() throws SQLException {
Assert.assertEquals(2, metaData.getJDBCMajorVersion());
} }
@Test @Test
public void getJDBCMinorVersion() { public void getJDBCMinorVersion() throws SQLException {
Assert.assertEquals(0, metaData.getJDBCMinorVersion());
} }
@Test @Test
public void getSQLStateType() { public void getSQLStateType() throws SQLException {
Assert.assertEquals(0, metaData.getSQLStateType());
} }
@Test @Test
public void locatorsUpdateCopy() { public void locatorsUpdateCopy() throws SQLException {
Assert.assertFalse(metaData.locatorsUpdateCopy());
} }
@Test @Test
public void supportsStatementPooling() { public void supportsStatementPooling() throws SQLException {
Assert.assertFalse(metaData.supportsStatementPooling());
} }
@Test @Test
public void getRowIdLifetime() { public void getRowIdLifetime() throws SQLException {
Assert.assertNull(metaData.getRowIdLifetime());
} }
@Test @Test
public void testGetSchemas() { public void testGetSchemas() throws SQLException {
Assert.assertNull(metaData.getSchemas());
} }
@Test @Test
public void supportsStoredFunctionsUsingCallSyntax() { public void supportsStoredFunctionsUsingCallSyntax() throws SQLException {
Assert.assertFalse(metaData.supportsStoredFunctionsUsingCallSyntax());
} }
@Test @Test
public void autoCommitFailureClosesAllResultSets() { public void autoCommitFailureClosesAllResultSets() throws SQLException {
Assert.assertFalse(metaData.autoCommitFailureClosesAllResultSets());
} }
@Test @Test
public void getClientInfoProperties() { public void getClientInfoProperties() throws SQLException {
Assert.assertNotNull(metaData.getClientInfoProperties());
} }
@Test @Test
public void getFunctions() { public void getFunctions() throws SQLException {
Assert.assertNotNull(metaData.getFunctions("", "", ""));
} }
@Test @Test
public void getFunctionColumns() { public void getFunctionColumns() throws SQLException {
Assert.assertNotNull(metaData.getFunctionColumns("", "", "", ""));
} }
@Test @Test
public void getPseudoColumns() { public void getPseudoColumns() throws SQLException {
Assert.assertNotNull(metaData.getPseudoColumns("", "", "", ""));
} }
@Test @Test
public void generatedKeyAlwaysReturned() { public void generatedKeyAlwaysReturned() throws SQLException {
Assert.assertFalse(metaData.generatedKeyAlwaysReturned());
} }
} }