django 注释调用是懒惰的吗?
Is a django annotate call lazy?
Django QuerySets 是惰性的,直到需要时才会评估。 annotate 也是如此吗?
来自文档:
Unlike aggregate(), annotate() is not a terminal clause. The output of the annotate() clause is a QuerySet; this QuerySet can be modified using any other QuerySet operation, including filter(), order_by(), or even additional calls to annotate().
Django QuerySets 是惰性的,直到需要时才会评估。 annotate 也是如此吗?
来自文档:
Unlike aggregate(), annotate() is not a terminal clause. The output of the annotate() clause is a QuerySet; this QuerySet can be modified using any other QuerySet operation, including filter(), order_by(), or even additional calls to annotate().