Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2064 closed enhancement (fixed)

Need documentation for low-level API for writing your own SQL

Reported by: Simon Willison Owned by: Jacob
Component: Documentation Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The Django database documentation doesn't currently describe the low-level API for writing your own SQL, using django.db.connection, cursors and so on. (It does explain the extra() clause on QuerySets which covers 80% of cases). Documentation for this should demonstrate writing custom model methods that run their own SQL queries, thus encouraging best practises.

Change History (2)

comment:1 by Adrian Holovaty, 18 years ago

The model docs have it here:

http://www.djangoproject.com/documentation/model_api/#executing-custom-sql

This is a bit confusing, because the database API docs should point this out as well. I'll make the addition.

comment:2 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

(In [3054]) Fixed #2064 -- Added 'Falling back to raw SQL' section to docs/db-api.txt

Note: See TracTickets for help on using tickets.
Back to Top