[glom/glom-1-14] User Guide: Update the pygda example for pygda 4.



commit 622225215a78e64148f8fcb45fea1cda210c0a1d
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun May 2 23:49:59 2010 +0200

    User Guide: Update the pygda example for pygda 4.
    
    * C/glom.xml: using-the-full-pygda-api: Update the example for pygda 4 and
    its (currently ugly, until I fix it) API.

 docs/user-guide/C/glom.xml |    4 +---
 docs/user-guide/ChangeLog  |    7 +++++++
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/docs/user-guide/C/glom.xml b/docs/user-guide/C/glom.xml
index 3dc0dfe..fbb4f7a 100644
--- a/docs/user-guide/C/glom.xml
+++ b/docs/user-guide/C/glom.xml
@@ -827,7 +827,6 @@ For instance, a shop might need a report listing all products sold in one month,
   <title>Using the full pygda API</title>
   <para>pygda is a python API for the libgda API. The record's <literal>connection</literal> attribute provides a gda.connection that can be used to access the current database directly. This allows you to run any SQL query, for instance to read data from the database with a SELECT, or to change values in the database with an UPDATE. Note that the connection is already open so you can avoid the difficult work of specifying the connection details.</para>
   <para>The record's <literal>table_name</literal> attribute also provides the name of the current table.</para>
-  <para>(Note that the <literal>record.connection</literal> and <literal>record.table_name</literal> attributes are only available since &app; 1.1.6.)</para>
   <para>This example reads all data from the current table and prints the values to the terminal: </para>
   <para>
   <programlisting>
@@ -839,8 +838,7 @@ For instance, a shop might need a report listing all products sold in one month,
 # or even knowing the name of the database.
 
 query = "SELECT * FROM %s" % record.table_name
-command = gda.Command(query)
-data_model = record.connection.execute_single_command(command)
+data_model = gda.gda_execute_select_command(record.connection, query)
 
 rows = data_model.get_n_rows()
 columns = data_model.get_n_columns()
diff --git a/docs/user-guide/ChangeLog b/docs/user-guide/ChangeLog
index cf0bf77..f03c0d1 100644
--- a/docs/user-guide/ChangeLog
+++ b/docs/user-guide/ChangeLog
@@ -1,3 +1,10 @@
+2010-05-02  Murray Cumming  <murrayc murrayc com>
+
+	User Guide: Update the pygda example for pygda 4.
+	
+	* C/glom.xml: using-the-full-pygda-api: Update the example for pygda 4 and 
+	its (currently ugly, until I fix it) API.
+
 2009-01-01  Mario Blättermann  <mariobl svn gnome org>
 
 	* de/de.po: Updated German translation



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]