File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -385,7 +385,6 @@ pub async fn reconcile_hive(
385385 . spec
386386 . cluster_config
387387 . metadata_database
388- . as_jdbc_database_connection ( )
389388 . jdbc_connection_details ( "METADATA" )
390389 . context ( InvalidMetadataDatabaseConnectionSnafu ) ?;
391390
Original file line number Diff line number Diff line change 1+ use std:: ops:: Deref ;
2+
13use serde:: { Deserialize , Serialize } ;
24use stackable_operator:: {
35 database_connections:: {
@@ -29,15 +31,19 @@ pub enum MetadataDatabaseConnection {
2931 // Generic(GenericJdbcDatabaseConnection),
3032}
3133
32- impl MetadataDatabaseConnection {
33- pub fn as_jdbc_database_connection ( & self ) -> & dyn JdbcDatabaseConnection {
34+ impl Deref for MetadataDatabaseConnection {
35+ type Target = dyn JdbcDatabaseConnection ;
36+
37+ fn deref ( & self ) -> & Self :: Target {
3438 match self {
3539 Self :: Postgresql ( p) => p,
3640 Self :: Mysql ( m) => m,
3741 Self :: Derby ( d) => d,
3842 }
3943 }
44+ }
4045
46+ impl MetadataDatabaseConnection {
4147 /// Name of the database as it should be passed using the `--db-type` CLI argument to Hive
4248 pub fn as_hive_db_type ( & self ) -> & str {
4349 match self {
You can’t perform that action at this time.
0 commit comments