File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
main/java/com/google/cloud/spanner/jdbc
test/java/com/google/cloud/spanner/jdbc Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ public boolean storesUpperCaseIdentifiers() {
187187
188188 @ Override
189189 public boolean storesLowerCaseIdentifiers () {
190- return false ;
190+ return connection . getDialect () == Dialect . POSTGRESQL ;
191191 }
192192
193193 @ Override
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ public static Object[] data() {
6161 @ Test
6262 public void testTrivialMethods () throws SQLException {
6363 JdbcConnection connection = mock (JdbcConnection .class );
64+ when (connection .getDialect ()).thenReturn (dialect );
6465 DatabaseMetaData meta = new JdbcDatabaseMetaData (connection );
6566 assertTrue (meta .allProceduresAreCallable ());
6667 assertTrue (meta .allTablesAreSelectable ());
@@ -132,7 +133,11 @@ public void testTrivialMethods() throws SQLException {
132133 assertTrue (meta .nullPlusNonNullIsNull ());
133134 assertFalse (meta .isCatalogAtStart ());
134135 assertEquals (connection .isReadOnly (), meta .isReadOnly ());
135- assertFalse (meta .storesLowerCaseIdentifiers ());
136+ if (dialect == Dialect .POSTGRESQL ) {
137+ assertTrue (meta .storesLowerCaseIdentifiers ());
138+ } else {
139+ assertFalse (meta .storesLowerCaseIdentifiers ());
140+ }
136141 assertFalse (meta .storesLowerCaseQuotedIdentifiers ());
137142 assertTrue (meta .storesMixedCaseIdentifiers ());
138143 assertTrue (meta .storesMixedCaseQuotedIdentifiers ());
You can’t perform that action at this time.
0 commit comments