Skip to content

Commit

Permalink
Extract ConnectionName into its own module to prevent circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
tkilias committed Feb 17, 2024
1 parent e00bff3 commit 09233a5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from exasol_data_science_utils_python.schema.dbobject_name import DBObjectName
from exasol_data_science_utils_python.schema.dbobject_name_impl import DBObjectNameImpl
from typeguard import typechecked


class ConnectionName(DBObjectName):
"""A DBObjectName class which represents the name of a connection object"""

@typechecked
def __init__(self, connection_name: str):
super().__init__(connection_name.upper())


class ConnectionNameImpl(DBObjectNameImpl, ConnectionName):

@typechecked
def __init__(self, connection_name: str):
super().__init__(connection_name)
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
from exasol_data_science_utils_python.schema.dbobject_name import DBObjectName
from exasol_data_science_utils_python.schema.dbobject_name_impl import DBObjectNameImpl
from typeguard import typechecked

from exasol_advanced_analytics_framework.query_handler.context.connection_name import ConnectionName
from exasol_advanced_analytics_framework.query_handler.context.proxy.db_object_name_proxy import DBObjectNameProxy
from exasol_advanced_analytics_framework.query_handler.query.drop_connection_query import DropConnectionQuery
from exasol_advanced_analytics_framework.query_handler.query.query import Query


class ConnectionName(DBObjectName):
"""A DBObjectName class which represents the name of a connection object"""

@typechecked
def __init__(self, connection_name: str):
super().__init__(connection_name.upper())


class ConnectionNameImpl(DBObjectNameImpl, ConnectionName):

@typechecked
def __init__(self, connection_name: str):
super().__init__(connection_name)


class ConnectionNameProxy(DBObjectNameProxy[ConnectionName], ConnectionName):

def get_cleanup_query(self) -> Query:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from exasol_data_science_utils_python.schema.udf_name import UDFName
from exasol_data_science_utils_python.schema.view_name import ViewName

from exasol_advanced_analytics_framework.query_handler.context.connection_name_proxy import ConnectionName
from exasol_advanced_analytics_framework.query_handler.context.connection_name import ConnectionName
from exasol_advanced_analytics_framework.query_handler.context.proxy.bucketfs_location_proxy import \
BucketFSLocationProxy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from exasol_data_science_utils_python.schema.view_name import ViewName
from exasol_data_science_utils_python.schema.view_name_builder import ViewNameBuilder

from exasol_advanced_analytics_framework.query_handler.context.connection_name_proxy import ConnectionName, \
ConnectionNameProxy, ConnectionNameImpl
from exasol_advanced_analytics_framework.query_handler.context.connection_name_proxy import ConnectionNameProxy
from exasol_advanced_analytics_framework.query_handler.context.connection_name import ConnectionName, ConnectionNameImpl
from exasol_advanced_analytics_framework.query_handler.context.proxy.bucketfs_location_proxy import \
BucketFSLocationProxy
from exasol_advanced_analytics_framework.query_handler.context.proxy.db_object_name_proxy import DBObjectNameProxy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
from exasol_data_science_utils_python.schema.table_name import TableName
from exasol_data_science_utils_python.schema.view_name import ViewName

from exasol_advanced_analytics_framework.query_handler.context.connection_name_proxy import ConnectionName
from exasol_advanced_analytics_framework.query_handler.context.connection_name import ConnectionName
from exasol_advanced_analytics_framework.query_handler.query.drop_query import DropQuery


Expand Down

0 comments on commit 09233a5

Please sign in to comment.