mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2024-11-22 00:56:37 +03:00
Added all MergeTree engines supported in infi.clickhouse_orm
This commit is contained in:
parent
084c218d2a
commit
9b02a49bc9
|
@ -34,6 +34,14 @@ class MergeTree(InsertOnlyEngineMixin, infi_engines.MergeTree):
|
|||
pass
|
||||
|
||||
|
||||
class ReplacingMergeTree(InsertOnlyEngineMixin, infi_engines.ReplacingMergeTree):
|
||||
pass
|
||||
|
||||
|
||||
class SummingMergeTree(InsertOnlyEngineMixin, infi_engines.SummingMergeTree):
|
||||
pass
|
||||
|
||||
|
||||
class CollapsingMergeTree(InsertOnlyEngineMixin, infi_engines.CollapsingMergeTree):
|
||||
def get_final_versions(self, model_cls, objects):
|
||||
"""
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from infi.clickhouse_orm import fields
|
||||
|
||||
from django_clickhouse.clickhouse_models import ClickHouseModel
|
||||
from django_clickhouse.engines import MergeTree, CollapsingMergeTree
|
||||
from django_clickhouse.engines import ReplacingMergeTree, CollapsingMergeTree
|
||||
from tests.models import TestModel
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ class ClickHouseTestModel(ClickHouseModel):
|
|||
created_date = fields.DateField()
|
||||
value = fields.Int32Field()
|
||||
|
||||
engine = MergeTree('created_date', ('id',))
|
||||
engine = ReplacingMergeTree('created_date', ('id',))
|
||||
|
||||
|
||||
class ClickHouseCollapseTestModel(ClickHouseModel):
|
||||
|
|
Loading…
Reference in New Issue
Block a user