mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2025-02-22 11:12:46 +03:00
Update docs
This commit is contained in:
parent
31ee58967f
commit
cd8d82c226
|
@ -1,6 +1,11 @@
|
||||||
Change Log
|
Change Log
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
Unreleased
|
||||||
|
----------
|
||||||
|
- Add support for compound filters with Q objects (desile)
|
||||||
|
- Add support for BETWEEN operator (desile)
|
||||||
|
|
||||||
v0.9.8
|
v0.9.8
|
||||||
------
|
------
|
||||||
- Bug fix: add field names list explicitly to Database.insert method (anci)
|
- Bug fix: add field names list explicitly to Database.insert method (anci)
|
||||||
|
|
|
@ -605,16 +605,17 @@ Adds a DISTINCT clause to the query, meaning that any duplicate rows
|
||||||
in the results will be omitted.
|
in the results will be omitted.
|
||||||
|
|
||||||
|
|
||||||
#### exclude(**kwargs)
|
#### exclude(**filter_fields)
|
||||||
|
|
||||||
|
|
||||||
Returns a copy of this queryset that excludes all rows matching the conditions.
|
Returns a copy of this queryset that excludes all rows matching the conditions.
|
||||||
|
|
||||||
|
|
||||||
#### filter(**kwargs)
|
#### filter(*q, **filter_fields)
|
||||||
|
|
||||||
|
|
||||||
Returns a copy of this queryset that includes only rows matching the conditions.
|
Returns a copy of this queryset that includes only rows matching the conditions.
|
||||||
|
Add q object to query if it specified.
|
||||||
|
|
||||||
|
|
||||||
#### only(*field_names)
|
#### only(*field_names)
|
||||||
|
@ -705,16 +706,17 @@ Adds a DISTINCT clause to the query, meaning that any duplicate rows
|
||||||
in the results will be omitted.
|
in the results will be omitted.
|
||||||
|
|
||||||
|
|
||||||
#### exclude(**kwargs)
|
#### exclude(**filter_fields)
|
||||||
|
|
||||||
|
|
||||||
Returns a copy of this queryset that excludes all rows matching the conditions.
|
Returns a copy of this queryset that excludes all rows matching the conditions.
|
||||||
|
|
||||||
|
|
||||||
#### filter(**kwargs)
|
#### filter(*q, **filter_fields)
|
||||||
|
|
||||||
|
|
||||||
Returns a copy of this queryset that includes only rows matching the conditions.
|
Returns a copy of this queryset that includes only rows matching the conditions.
|
||||||
|
Add q object to query if it specified.
|
||||||
|
|
||||||
|
|
||||||
#### group_by(*args)
|
#### group_by(*args)
|
||||||
|
|
|
@ -7,7 +7,6 @@ from .utils import comma_join
|
||||||
|
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
# - and/or between Q objects
|
|
||||||
# - check that field names are valid
|
# - check that field names are valid
|
||||||
# - operators for arrays: length, has, empty
|
# - operators for arrays: length, has, empty
|
||||||
|
|
||||||
|
@ -120,7 +119,7 @@ class BetweenOperator(Operator):
|
||||||
value1 = field.to_db_string(
|
value1 = field.to_db_string(
|
||||||
field.to_python(value[1], pytz.utc)) if value[1] is not None or len(str(value[1])) > 0 else None
|
field.to_python(value[1], pytz.utc)) if value[1] is not None or len(str(value[1])) > 0 else None
|
||||||
if value0 and value1:
|
if value0 and value1:
|
||||||
return '%s BETWEEN %s and %s' % (field_name, value0, value1)
|
return '%s BETWEEN %s AND %s' % (field_name, value0, value1)
|
||||||
if value0 and not value1:
|
if value0 and not value1:
|
||||||
return ' '.join([field_name, '>=', value0])
|
return ' '.join([field_name, '>=', value0])
|
||||||
if value1 and not value0:
|
if value1 and not value0:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user