Changeset 872 for trunk/docs


Ignore:
Timestamp:
Apr 9, 2016, 6:53:52 AM (3 years ago)
Author:
cito
Message:

Prefer OID over PK in update() and delete()

This restores backward compatibility with Python 4.x and allows to update
the primary key by identifying the row via the OID.

Location:
trunk/docs/contents
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/contents/changelog.rst

    r866 r872  
    11ChangeLog
    22=========
     3
     4Version 5.0.1
     5-------------
     6- The update() and delete() methods of the DB wrapper now use the OID instead
     7  of the primary key if both are provided. This restores backward compatibility
     8  with PyGreSQL 4.x and allows updating the primary key itself if an OID exists.
     9- Made C extension compatible with MSVC 9 again (needed for Python 2 on Windws).
    310
    411Version 5.0 (2016-03-20)
  • trunk/docs/contents/pg/db_wrapper.rst

    r857 r872  
    364364    :raises KeyError: missing key value for the row
    365365
    366 Similar to insert but updates an existing row.  The update is based on
     366Similar to insert, but updates an existing row.  The update is based on
    367367the primary key of the table or the OID value as munged by :meth:`DB.get`
    368 or passed as keyword.
     368or passed as keyword.  The OID will take precedence if provided, so that it
     369is possible to update the primary key itself.
    369370
    370371The dictionary is then modified to reflect any changes caused by the
     
    541542This method deletes the row from a table.  It deletes based on the
    542543primary key of the table or the OID value as munged by :meth:`DB.get`
    543 or passed as keyword.
     544or passed as keyword.  The OID will take precedence if provided.
    544545
    545546The return value is the number of deleted rows (i.e. 0 if the row did not
Note: See TracChangeset for help on using the changeset viewer.