private int [ ] fetchDatabaseNameRangeIndexFromURLForH2FileMode ( String url ) { int fileLabelIndex = url . indexOf ( FILE_MODE_FLAG ) ; int parameterLabelIndex = url . indexOf ( ";" , fileLabelIndex ) ; if ( parameterLabelIndex == - 1 ) { parameterLabelIndex = url . length ( ) ; } if ( fileLabelIndex != - 1 ) { return new int [ ] { fileLabelIndex + FILE_MODE_FLAG . length ( ) + 1 , parameterLabelIndex } ; } else { return null ; } }
Fetch range index that the database name from connection url if H2 database running with file mode .