:rtype: ModelQuerySet
(self, obj, model)
| 88 | """ |
| 89 | |
| 90 | def __get__(self, obj, model): |
| 91 | """ :rtype: ModelQuerySet """ |
| 92 | if model.__abstract__: |
| 93 | raise CQLEngineException('cannot execute queries against abstract models') |
| 94 | queryset = model.__queryset__(model) |
| 95 | |
| 96 | # if this is a concrete polymorphic model, and the discriminator |
| 97 | # key is an indexed column, add a filter clause to only return |
| 98 | # logical rows of the proper type |
| 99 | if model._is_polymorphic and not model._is_polymorphic_base: |
| 100 | name, column = model._discriminator_column_name, model._discriminator_column |
| 101 | if column.partition_key or column.index: |
| 102 | # look for existing poly types |
| 103 | return queryset.filter(**{name: model.__discriminator_value__}) |
| 104 | |
| 105 | return queryset |
| 106 | |
| 107 | def __call__(self, *args, **kwargs): |
| 108 | """ |
nothing calls this directly
no test coverage detected