mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2025-08-09 06:04:49 +03:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
45a9200ff6 | ||
|
623f3e7dac | ||
|
070b2c3ff4 | ||
|
d7a26a81bb | ||
|
09aeddf677 | ||
|
2777d3084c | ||
|
7b15567a62 | ||
|
359809e819 | ||
|
272729153c |
|
@ -1,6 +1,14 @@
|
||||||
Change Log
|
Change Log
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
v2.1.3
|
||||||
|
------
|
||||||
|
- Fix pagination for models with alias columns
|
||||||
|
|
||||||
|
v2.1.2
|
||||||
|
------
|
||||||
|
- Add `QuerySet.model` to support django-rest-framework 3
|
||||||
|
|
||||||
v2.1.1
|
v2.1.1
|
||||||
------
|
------
|
||||||
- Improve support of ClickHouse v21.9 (mangototango)
|
- Improve support of ClickHouse v21.9 (mangototango)
|
||||||
|
|
|
@ -30,7 +30,7 @@ homepage = https://github.com/Infinidat/infi.clickhouse_orm
|
||||||
|
|
||||||
[isolated-python]
|
[isolated-python]
|
||||||
recipe = infi.recipe.python
|
recipe = infi.recipe.python
|
||||||
version = v3.8.0.2
|
version = v3.8.12
|
||||||
|
|
||||||
[setup.py]
|
[setup.py]
|
||||||
recipe = infi.recipe.template.version
|
recipe = infi.recipe.template.version
|
||||||
|
|
|
@ -319,7 +319,8 @@ class Database(object):
|
||||||
elif page_num < 1:
|
elif page_num < 1:
|
||||||
raise ValueError('Invalid page number: %d' % page_num)
|
raise ValueError('Invalid page number: %d' % page_num)
|
||||||
offset = (page_num - 1) * page_size
|
offset = (page_num - 1) * page_size
|
||||||
query = 'SELECT * FROM $table'
|
query = 'SELECT {} FROM $table'.format(", ".join(model_class.fields().keys()))
|
||||||
|
|
||||||
if conditions:
|
if conditions:
|
||||||
if isinstance(conditions, Q):
|
if isinstance(conditions, Q):
|
||||||
conditions = conditions.to_sql(model_class)
|
conditions = conditions.to_sql(model_class)
|
||||||
|
|
|
@ -292,6 +292,7 @@ class QuerySet(object):
|
||||||
Initializer. It is possible to create a queryset like this, but the standard
|
Initializer. It is possible to create a queryset like this, but the standard
|
||||||
way is to use `MyModel.objects_in(database)`.
|
way is to use `MyModel.objects_in(database)`.
|
||||||
"""
|
"""
|
||||||
|
self.model = model_cls
|
||||||
self._model_cls = model_cls
|
self._model_cls = model_cls
|
||||||
self._database = database
|
self._database = database
|
||||||
self._order_by = []
|
self._order_by = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user