When the model query APIs don’t go far enough, you can fall back to writing raw SQL. Django gives you two ways of performing raw SQL queries: you can use Manager.raw() to perform raw queries and return model instances, or you can avoid the model layer entirely and execute custom SQL directly.
Django支持原始sql查询以满足您的需要,请参阅文档文章Performing raw SQL queries。在
django-mysql扩展支持索引提示。有关详细信息,请参见the docs。在
相关问题 更多 >
编程相关推荐