Changeset 382 for trunk/docs


Ignore:
Timestamp:
Dec 2, 2008, 11:50:54 AM (11 years ago)
Author:
darcy
Message:

Add "return_changes" flag to insert method.

Location:
trunk/docs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/changelog.txt

    r379 r382  
    3434  submitting an empty command.
    3535- Removed compatibility code for old OID munging style
     36- Added "return_changes" flag to insert method.
    3637
    3738Version 3.8.1 (2006-06-05)
  • trunk/docs/pg.txt

    r381 r382  
    871871Syntax::
    872872
    873   insert(table, [d,] [key = val, ...])
    874 
    875 Parameters:
    876   :table: name of table
    877   :d:     optional dictionary of values
    878 
    879 Return type:
    880   :integer: the OID of the newly inserted row
    881 
    882 Description:
    883   This method inserts values into the table specified filling in the
    884   values from the dictionary. It then reloads the dictionary with the
    885   values from the database. This causes the dictionary to be updated
    886   with values that are modified by rules, triggers, etc.
    887 
    888   If the optional dictionary is not supplied then the required values
    889   must be included as keyword/value pairs.  If a dictionary is supplied
    890   then any keywords provided will be added to or replace the entry in
    891   the dictionary.
     873  insert(table, [d,] [return_changes,] [key = val, ...])
     874
     875Parameters:
     876  :table:          name of table
     877  :d:              optional dictionary of values
     878  :return_changes: Return values in new row - default True
     879
     880Return type:
     881  :dictionary:     The dictionary of values inserted
     882
     883Description:
     884  This method inserts a row into a table.  If the optional dictionary is
     885  not supplied then the required values must be included as keyword/value
     886  pairs.  If a dictionary is supplied then any keywords provided will be
     887  added to or replace the entry in the dictionary.
     888
     889  The dictionary is then reloaded with the values actually inserted
     890  in order to pick up values modified by rules, triggers, etc.  If
     891  the optional flag return_changes is set to False this reload will
     892  be skipped.
    892893
    893894  Due to the way that this function works you will find inserts taking
     
    896897  large over time. You may also consider using the inserttable() method
    897898  described in section 3.
     899
     900  Note: The method currently doesn't support insert into views
     901  although PostgreSQL does.
    898902
    899903update - update a row in a database table
Note: See TracChangeset for help on using the changeset viewer.