mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2024-11-22 09:06:43 +03:00
Refactoring
This commit is contained in:
parent
7e502ee8a8
commit
71e839167a
|
@ -56,6 +56,9 @@ class ClickHouseModel(with_metaclass(ClickHouseModelMeta, InfiModel)):
|
|||
sync_database_alias = None
|
||||
sync_lock_timeout = None
|
||||
|
||||
# This attribute is initialized in metaclass, as it must get model class as a parameter
|
||||
objects = None # type: QuerySet
|
||||
|
||||
@classmethod
|
||||
def objects_in(cls, database): # type: (Database) -> QuerySet
|
||||
return QuerySet(cls, database)
|
||||
|
|
|
@ -13,7 +13,7 @@ class QuerySet(InfiQuerySet):
|
|||
Basic QuerySet to use
|
||||
"""
|
||||
|
||||
def __init__(self, model_cls, database=None): # type: (InfiModel, Optional[Database]) -> None
|
||||
def __init__(self, model_cls, database=None): # type: (Type[InfiModel], Optional[Database]) -> None
|
||||
super(QuerySet, self).__init__(model_cls, database)
|
||||
self._db_alias = None
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user