Package psycopg2 :: Module extras :: Class DictCursor
[show private | hide private]
[frames | no frames]

Type DictCursor

object --+    
         |    
    cursor --+
             |
            DictCursor


A cursor that keeps a list of column name -> index mappings.


Method Summary
  callproc(self, procname, vars)
  execute(self, query, vars, async)
  fetchall(self)
  fetchmany(self, size)
  fetchone(self)
  _build_index(self)
    Inherited from cursor
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __iter__(x)
Return iter(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __repr__(x)
Return repr(x)...
  __str__(x)
Return str(x)...
  close()
Close the cursor.
  copy_from(file, table, sep, null)
Copy table from file.
  copy_to(file, table, sep, null)
Copy table to file.
  executemany(query, vars_list, async)
Execute many queries with bound vars.
int fileno()
Return file descriptor associated to database connection.
bool isready()
Return True if data is ready after an async query.
str mogrify(query, vars)
Return query after vars binding.
  next(x)
Return the next value, or raise StopIteration...
  nextset()
Skip to next set of data.
  scroll(value, mode)
Scroll to new position according to mode.
  setinputsizes(sizes)
Set memory areas before execute.
  setoutputsize(size, column)
Set column buffer size.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Property Summary
    Inherited from cursor
  arraysize: Number of records fetchmany() must fetch if not explicitely specified.
  binary_types
  connection: The connection where the cursor comes from.
  description: Cursor description as defined in DBAPI-2.0.
  lastrowid: The oid of the last row inserted by the cursor.
  name
  query: The last query text sent to the backend.
  row_factory
  rowcount: Number of rows read from the backend in the last command.
  rownumber: The current row position.
  statusmessage: The return message of the last command.
  string_types
  typecaster
  tzinfo_factory

Class Variable Summary
int _DictCursor__query_executed = 0                                                                     

Method Details

callproc(self, procname, vars=None)

Overrides:
psycopg2._psycopg.cursor.callproc

execute(self, query, vars=None, async=0)

Overrides:
psycopg2._psycopg.cursor.execute

fetchall(self)

Overrides:
psycopg2._psycopg.cursor.fetchall

fetchmany(self, size=None)

Overrides:
psycopg2._psycopg.cursor.fetchmany

fetchone(self)

Overrides:
psycopg2._psycopg.cursor.fetchone

_build_index(self)


Class Variable Details

_DictCursor__query_executed

Type:
int
Value:
0