Changeset 739 for trunk/docs


Ignore:
Timestamp:
Jan 13, 2016, 7:30:50 PM (4 years ago)
Author:
cito
Message:

Return ordered dict for attributes is possible

Sometimes it's important to know the order of the columns in a table.
By returning an OrderedDict? instead of a dict in get_attnames, we can
deliver that information en passant, while staying backward compatible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/contents/pg/db_wrapper.rst

    r738 r739  
    125125
    126126Given the name of a table, digs out the set of attribute names.
     127
     128Returns a dictionary of attribute names (the names are the keys,
     129the values are the names of the attributes' types).
     130
     131If your Python version supports this, the dictionary will be an
     132OrderedDictionary with the column names in the right order.
     133
     134By default, only a limited number of simple types will be returned.
     135You can get the regular types after enabling this by calling the
     136:meth:`DB.use_regtypes` method.
     137
    127138
    128139has_table_privilege -- check table privilege
Note: See TracChangeset for help on using the changeset viewer.