Coverage Report - liquibase.database.core.FirebirdDatabase
 
Classes in this File Line Coverage Branch Coverage Complexity
FirebirdDatabase
25%
5/20
0%
0/10
1.538
 
 1  
 package liquibase.database.core;
 2  
 
 3  
 import liquibase.database.AbstractDatabase;
 4  
 import liquibase.database.DatabaseConnection;
 5  
 import liquibase.exception.DatabaseException;
 6  
 
 7  
 /**
 8  
  * Firebird database implementation. SQL Syntax ref: http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_60_sqlref
 9  
  */
 10  1
 public class FirebirdDatabase extends AbstractDatabase {
 11  
 
 12  
     public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException {
 13  0
         return conn.getDatabaseProductName().startsWith("Firebird");
 14  
     }
 15  
 
 16  
     public String getDefaultDriver(String url) {
 17  0
         if (url.startsWith("jdbc:firebirdsql")) {
 18  0
             return "org.firebirdsql.jdbc.FBDriver";
 19  
         }
 20  0
         return null;
 21  
     }
 22  
 
 23  
     public int getPriority() {
 24  0
         return PRIORITY_DEFAULT;
 25  
     }
 26  
 
 27  
     public String getTypeName() {
 28  55
         return "firebird";
 29  
     }
 30  
 
 31  
     @Override
 32  
     public boolean supportsSequences() {
 33  14
         return true;
 34  
     }
 35  
 
 36  
     public boolean supportsInitiallyDeferrableColumns() {
 37  0
         return false;
 38  
     }
 39  
 
 40  
     public String getCurrentDateTimeFunction() {
 41  0
         if (currentDateTimeFunction != null) {
 42  0
             return currentDateTimeFunction;
 43  
         }
 44  
 
 45  0
         return "CURRENT_TIMESTAMP";
 46  
     }
 47  
 
 48  
     public boolean supportsTablespaces() {
 49  0
         return false;
 50  
     }
 51  
 
 52  
     @Override
 53  
     public boolean supportsDDLInTransaction() {
 54  0
         return false;
 55  
     }
 56  
 
 57  
     @Override
 58  
     public boolean isSystemTable(String catalogName, String schemaName, String tableName) {
 59  0
         return tableName.startsWith("RDB$") || super.isSystemTable(catalogName, schemaName, tableName);
 60  
     }
 61  
 
 62  
     @Override
 63  
     public boolean supportsAutoIncrement() {
 64  6
         return false;
 65  
     }
 66  
 
 67  
     @Override
 68  
     public boolean supportsSchemas() {
 69  2
         return false;
 70  
     }
 71  
 
 72  
     @Override
 73  
     public String convertRequestedSchemaToSchema(String requestedSchema) throws DatabaseException {
 74  0
         if (requestedSchema == null) {
 75  0
             return getDefaultDatabaseSchemaName();
 76  
         } else {
 77  0
             return requestedSchema.toUpperCase();
 78  
         }
 79  
     }
 80  
 
 81  
 }