File tree Expand file tree Collapse file tree
crates/stackable-operator/src/database_connections/databases Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ use crate::{
1212 utils:: OptionExt as _,
1313} ;
1414
15+ /// Sadly the Derby driver class name is a bit complicated, e.g. for HMS up to 4.1.x we used
16+ /// `org.apache.derby.jdbc.EmbeddedDriver`, for HMS 4.2.x we used
17+ /// `org.apache.derby.iapi.jdbc.AutoloadedDriver`.
18+ pub const DERBY_JDBC_DRIVER_CLASS : & str = "org.apache.derby.jdbc.EmbeddedDriver" ;
19+
1520#[ derive( Debug , Snafu ) ]
1621pub enum Error {
1722 #[ snafu( display( "failed to parse connection URL" ) ) ]
@@ -54,10 +59,7 @@ impl JdbcDatabaseConnection for DerbyConnection {
5459 let connection_url = connection_url. parse ( ) . context ( ParseConnectionUrlSnafu ) ?;
5560
5661 Ok ( JdbcDatabaseConnectionDetails {
57- // Sadly the Derby driver class name is a bit complicated, e.g. for HMS up to 4.1.x we used
58- // "org.apache.derby.jdbc.EmbeddedDriver",
59- // for HMS 4.2.x we used "org.apache.derby.iapi.jdbc.AutoloadedDriver".
60- driver : "org.apache.derby.jdbc.EmbeddedDriver" . to_owned ( ) ,
62+ driver : DERBY_JDBC_DRIVER_CLASS . to_owned ( ) ,
6163 connection_url,
6264 username_env : None ,
6365 password_env : None ,
You can’t perform that action at this time.
0 commit comments