File tree Expand file tree Collapse file tree 2 files changed +3
-8
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 +3
-8
lines changed Original file line number Diff line number Diff line change @@ -523,14 +523,7 @@ public String getSchema() throws SQLException {
523523
524524  @ Nonnull 
525525  String  getDefaultSchema () {
526-     // TODO: Update to use getDialect()#getDefaultSchema() when available. 
527-     switch  (getDialect ()) {
528-       case  POSTGRESQL :
529-         return  "public" ;
530-       case  GOOGLE_STANDARD_SQL :
531-       default :
532-         return  "" ;
533-     }
526+     return  getDialect ().getDefaultSchema ();
534527  }
535528
536529  @ Override 
Original file line number Diff line number Diff line change @@ -738,6 +738,8 @@ public void testSchema() throws SQLException {
738738      // The default schema is the empty string for GoogleSQL databases. 
739739      // The default schema is 'public' for PostgreSQL databases. 
740740      assertEquals (connection .getDefaultSchema (), connection .getSchema ());
741+       String  expectedDefaultSchema  = dialect  == Dialect .POSTGRESQL  ? "public"  : "" ;
742+       assertEquals (expectedDefaultSchema , connection .getSchema ());
741743      // This should be allowed. 
742744      connection .setSchema (connection .getDefaultSchema ());
743745      JdbcSqlExceptionImpl  exception  =
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments