diff options
| author | Robin Munn <robin.munn@gmail.com> | 2006-09-20 08:40:46 +0000 |
|---|---|---|
| committer | Robin Munn <robin.munn@gmail.com> | 2006-09-20 08:40:46 +0000 |
| commit | 8afc419b123f315d724cbefdbc4c07f0982627a9 (patch) | |
| tree | 1bb5852d588606bbd98f9e4432b55a0bd8fbb42f /django/db/backends/postgresql_psycopg2/base.py | |
| parent | 70e05817910d5fe757a3a235252ef7c12e058676 (diff) | |
sqlalchemy: Merged revisions 3724 to 3769 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/sqlalchemy@3770 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/postgresql_psycopg2/base.py')
| -rw-r--r-- | django/db/backends/postgresql_psycopg2/base.py | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py index 9cfef25cb3..4c835d89fc 100644 --- a/django/db/backends/postgresql_psycopg2/base.py +++ b/django/db/backends/postgresql_psycopg2/base.py @@ -68,23 +68,9 @@ def quote_name(name): return name # Quoting once is enough. return '"%s"' % name -def dictfetchone(cursor): - "Returns a row from the cursor as a dict" - # TODO: cursor.dictfetchone() doesn't exist in psycopg2, - # but no Django code uses this. Safe to remove? - return cursor.dictfetchone() - -def dictfetchmany(cursor, number): - "Returns a certain number of rows from a cursor as a dict" - # TODO: cursor.dictfetchmany() doesn't exist in psycopg2, - # but no Django code uses this. Safe to remove? - return cursor.dictfetchmany(number) - -def dictfetchall(cursor): - "Returns all rows from a cursor as a dict" - # TODO: cursor.dictfetchall() doesn't exist in psycopg2, - # but no Django code uses this. Safe to remove? - return cursor.dictfetchall() +dictfetchone = util.dictfetchone +dictfetchmany = util.dictfetchmany +dictfetchall = util.dictfetchall def get_last_insert_id(cursor, table_name, pk_name): cursor.execute("SELECT CURRVAL('\"%s_%s_seq\"')" % (table_name, pk_name)) |
