Update of /usr/cvs/Public/pygresql/docs
In directory druid.net:/tmp/cvs-serv20601/docs

Modified Files:
        changelog.txt pg.txt 
Log Message:
Add "return_changes" flag to insert method.


To see the diffs for this commit:
   
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/docs/changelog.txt.diff?r1=1.33&r2=1.34

Index: changelog.txt
===================================================================
RCS file: /usr/cvs/Public/pygresql/docs/changelog.txt,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -p -u -r1.33 -r1.34
--- changelog.txt       25 Nov 2008 18:15:23 -0000      1.33
+++ changelog.txt       2 Dec 2008 16:50:54 -0000       1.34
@@ -33,6 +33,7 @@ Version 4.0 (2009-01-01)
 - Improved getnotify() by calling PQconsumeInput() instead of
   submitting an empty command.
 - Removed compatibility code for old OID munging style
+- Added "return_changes" flag to insert method.
 
 Version 3.8.1 (2006-06-05)
 --------------------------

   
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/docs/pg.txt.diff?r1=1.18&r2=1.19

Index: pg.txt
===================================================================
RCS file: /usr/cvs/Public/pygresql/docs/pg.txt,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -u -r1.18 -r1.19
--- pg.txt      2 Dec 2008 15:52:47 -0000       1.18
+++ pg.txt      2 Dec 2008 16:50:54 -0000       1.19
@@ -870,25 +870,26 @@ insert - insert a row into a database ta
 -------------------------------------------
 Syntax::
 
-  insert(table, [d,] [key = val, ...])
+  insert(table, [d,] [return_changes,] [key = val, ...])
 
 Parameters:
-  :table: name of table
-  :d:     optional dictionary of values
+  :table:          name of table
+  :d:              optional dictionary of values
+  :return_changes: Return values in new row - default True
 
 Return type:
-  :integer: the OID of the newly inserted row
+  :dictionary:     The dictionary of values inserted
 
 Description:
-  This method inserts values into the table specified filling in the
-  values from the dictionary. It then reloads the dictionary with the
-  values from the database. This causes the dictionary to be updated
-  with values that are modified by rules, triggers, etc.
-
-  If the optional dictionary is not supplied then the required values
-  must be included as keyword/value pairs.  If a dictionary is supplied
-  then any keywords provided will be added to or replace the entry in
-  the dictionary.
+  This method inserts a row into a table.  If the optional dictionary is
+  not supplied then the required values must be included as keyword/value
+  pairs.  If a dictionary is supplied then any keywords provided will be
+  added to or replace the entry in the dictionary.
+
+  The dictionary is then reloaded with the values actually inserted
+  in order to pick up values modified by rules, triggers, etc.  If
+  the optional flag return_changes is set to False this reload will
+  be skipped. 
 
   Due to the way that this function works you will find inserts taking
   longer and longer as your table gets bigger. To overcome this problem
@@ -896,6 +897,9 @@ Description:
   large over time. You may also consider using the inserttable() method
   described in section 3.
 
+  Note: The method currently doesn't support insert into views
+  although PostgreSQL does.
+
 update - update a row in a database table
 -----------------------------------------
 Syntax::

_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql

Reply via email to