mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2024-11-25 02:03:46 +03:00
docs
This commit is contained in:
parent
6702cffe72
commit
56cf86a246
|
@ -57,9 +57,9 @@ qs.filter(Person.first_name.isIn(['Robert', 'Rob', 'Robbie']))
|
|||
|
||||
The `isIn` and `isNotIn` functions expect either a list/tuple of values, or another queryset (a subquery). For example if we want to select only people with Irish last names:
|
||||
```python
|
||||
# A list of values
|
||||
# Last name is in a list of values
|
||||
qs = Person.objects_in(database).filter(Person.last_name.isIn(["Murphy", "O'Sullivan"]))
|
||||
# A queryset
|
||||
# Last name is in a subquery
|
||||
subquery = IrishLastName.objects_in(database).only("name")
|
||||
qs = Person.objects_in(database).filter(Person.last_name.isIn(subquery))
|
||||
```
|
||||
|
@ -76,7 +76,7 @@ For better aggregation performance you can add them to `PREWHERE` section by add
|
|||
|
||||
### Old-style filter conditions
|
||||
|
||||
Prior to version 2 of the ORM, filtering conditions were limited to a predefined set of operators, and complex expressions were not supported. This old syntax is still supported, so you can use it alongside or even intermixed with new-style functions and expressions.
|
||||
Prior to version 2 of the ORM, filtering conditions were limited to a predefined set of operators, and complex expressions were not supported. This old syntax is still available, so you can use it alongside or even intermixed with new-style functions and expressions.
|
||||
|
||||
The old syntax uses keyword arguments to the `filter` and `exclude` methods, that are built as `<fieldname>__<operator>=<value>` (two underscores separate the field name from the operator). In case no operator is given, `eq` is used by default. For example:
|
||||
```python
|
||||
|
|
12
docs/toc.md
12
docs/toc.md
|
@ -68,14 +68,14 @@
|
|||
* [Tests](contributing.md#tests)
|
||||
|
||||
* [Class Reference](class_reference.md#class-reference)
|
||||
* [infi.clickhouse_orm.database](class_reference.md#infi.clickhouse_orm.database)
|
||||
* [infi.clickhouse_orm.database](class_reference.md#inficlickhouse_ormdatabase)
|
||||
* [Database](class_reference.md#database)
|
||||
* [DatabaseException](class_reference.md#databaseexception)
|
||||
* [infi.clickhouse_orm.models](class_reference.md#infi.clickhouse_orm.models)
|
||||
* [infi.clickhouse_orm.models](class_reference.md#inficlickhouse_ormmodels)
|
||||
* [Model](class_reference.md#model)
|
||||
* [BufferModel](class_reference.md#buffermodel)
|
||||
* [DistributedModel](class_reference.md#distributedmodel)
|
||||
* [infi.clickhouse_orm.fields](class_reference.md#infi.clickhouse_orm.fields)
|
||||
* [infi.clickhouse_orm.fields](class_reference.md#inficlickhouse_ormfields)
|
||||
* [ArrayField](class_reference.md#arrayfield)
|
||||
* [BaseEnumField](class_reference.md#baseenumfield)
|
||||
* [BaseFloatField](class_reference.md#basefloatfield)
|
||||
|
@ -106,7 +106,7 @@
|
|||
* [UInt64Field](class_reference.md#uint64field)
|
||||
* [UInt8Field](class_reference.md#uint8field)
|
||||
* [UUIDField](class_reference.md#uuidfield)
|
||||
* [infi.clickhouse_orm.engines](class_reference.md#infi.clickhouse_orm.engines)
|
||||
* [infi.clickhouse_orm.engines](class_reference.md#inficlickhouse_ormengines)
|
||||
* [Engine](class_reference.md#engine)
|
||||
* [TinyLog](class_reference.md#tinylog)
|
||||
* [Log](class_reference.md#log)
|
||||
|
@ -118,10 +118,10 @@
|
|||
* [CollapsingMergeTree](class_reference.md#collapsingmergetree)
|
||||
* [SummingMergeTree](class_reference.md#summingmergetree)
|
||||
* [ReplacingMergeTree](class_reference.md#replacingmergetree)
|
||||
* [infi.clickhouse_orm.query](class_reference.md#infi.clickhouse_orm.query)
|
||||
* [infi.clickhouse_orm.query](class_reference.md#inficlickhouse_ormquery)
|
||||
* [QuerySet](class_reference.md#queryset)
|
||||
* [AggregateQuerySet](class_reference.md#aggregatequeryset)
|
||||
* [Q](class_reference.md#q)
|
||||
* [infi.clickhouse_orm.funcs](class_reference.md#infi.clickhouse_orm.funcs)
|
||||
* [infi.clickhouse_orm.funcs](class_reference.md#inficlickhouse_ormfuncs)
|
||||
* [F](class_reference.md#f)
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class HeadersToMarkdownParser(HTMLParser):
|
|||
def handle_endtag(self, tag):
|
||||
if tag.lower() in HEADER_TAGS:
|
||||
indent = ' ' * int(self.inside[1])
|
||||
fragment = self.text.lower().replace(' ', '-')
|
||||
fragment = self.text.lower().replace(' ', '-').replace('.', '')
|
||||
print('%s* [%s](%s#%s)' % (indent, self.text, sys.argv[1], fragment))
|
||||
self.inside = None
|
||||
self.text = ''
|
||||
|
|
Loading…
Reference in New Issue
Block a user