- 2025年05月31日
- 星期六

任何人都可以告诉我以下结果应该符合标准(欢迎参考标准的正确部分) select * from t1;+——+| col1 |+——+| 9 || 8 || 10 |+——+ update t1 set col1 = col1 * 2 where col1 = (select avg(col1) from t1); 重点

我在我的Django应用程序上有一个函数,我执行一些Queryset操作并将其结果设置为Memcache.由于它是一种功能,因此必须具有一般用途.因此,为了使其可重用,我将dict作为过滤和排除操作的参数传递.这是功能: def cached_query(key, model, my_filter=None, exclude