Changeset 736 for branches/4.x


Ignore:
Timestamp:
Jan 13, 2016, 5:07:36 PM (4 years ago)
Author:
cito
Message:

Back port minor changes in the docs from trunk to 4.x

Location:
branches/4.x
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/4.x/docs/contents/pg/connection.rst

    r708 r736  
    169169values may contain string, integer, long or double (real) values.
    170170
    171 .. note::
    172 
    173    **Be very careful**:
     171.. warning::
     172
    174173   This method doesn't type check the fields according to the table definition;
    175174   it just look whether or not it knows how to handle such types.
  • branches/4.x/docs/contents/pg/db_wrapper.rst

    r734 r736  
    219219    :returns: A dictionary - the keys are the attribute names,
    220220      the values are the row values.
     221    :raises ProgrammingError: no primary key or missing privilege
    221222
    222223This method is the basic mechanism to get a single row. It assumes
     
    233234--------------------------------------------
    234235
    235 .. method:: DB.insert(table, [d,] [key = val, ...])
     236.. method:: DB.insert(table, [d], [col=val, ...])
    236237
    237238    Insert a row into a database table
     
    239240    :param str table: name of table
    240241    :param dict d: optional dictionary of values
    241     :returns: the inserted values
     242    :returns: the inserted values in the database
    242243    :rtype: dict
     244    :raises ProgrammingError: missing privilege or conflict
    243245
    244246This method inserts a row into a table.  If the optional dictionary is
     
    256258------------------------------------------
    257259
    258 .. method:: DB.update(table, [d,] [key = val, ...])
     260.. method:: DB.update(table, [d], [col=val, ...])
    259261
    260262    Update a row in a database table
     
    262264    :param str table: name of table
    263265    :param dict d: optional dictionary of values
    264     :returns: the new row
     266    :returns: the new row in the database
    265267    :rtype: dict
     268    :raises ProgrammingError: no primary key or missing privilege
    266269
    267270Similar to insert but updates an existing row.  The update is based on the
  • branches/4.x/pg.py

    r734 r736  
    843843
    844844        """
    845         # Update always works on the oid which get returns if available,
     845        # Update always works on the oid which get() returns if available,
    846846        # otherwise use the primary key.  Fail if neither.
    847         # Note that we only accept oid key from named args for safety
     847        # Note that we only accept oid key from named args for safety.
    848848        qcl = self._add_schema(cl)
    849849        qoid = _oid_key(qcl)
Note: See TracChangeset for help on using the changeset viewer.