Author: wyoung
Date: Fri Feb 15 08:20:03 2008
New Revision: 2201

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2201&view=rev
Log:
- Made SSQLS::_table private and renamed it to table_
- Made SSQLS::table(void) return an unmodifiable pointer instead of a
  modifiable reference to _table
- Added SSQLS::table(const char*) for changing SSQLS::table_.

Modified:
    trunk/doc/userman/breakages.dbx
    trunk/doc/userman/ssqls.dbx
    trunk/lib/ssqls.pl

Modified: trunk/doc/userman/breakages.dbx
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/doc/userman/breakages.dbx?rev=2201&r1=2200&r2=2201&view=diff
==============================================================================
--- trunk/doc/userman/breakages.dbx (original)
+++ trunk/doc/userman/breakages.dbx Fri Feb 15 08:20:03 2008
@@ -877,6 +877,26 @@
         in this table, so if you stick to those types, you’ll
         be fine. It’s also okay to use types your C++ compiler
         can convert directly to these predefined types.</para>
+
+        <para>The <varname>_table</varname> static member variable
+        for each SSQLS is now private. The recommended way to access
+        this remains unchanged: the <function>table()</function>
+        static member function.</para>
+
+        <para><function>table()</function> used to return a modifiable
+        reference to the table name. Now there are two overloads,
+        one which returns an unmodifiable pointer to the table name,
+        and the other which takes <type>const char*</type> so you
+        can override the default table name. So, the code we used to
+        recommend for changing the SSQLS&rsquo;s table name:</para>
+
+        <programlisting>
+my_ssqls_type::table() = "MyTableName";</programlisting>
+
+        <para>now needs to be:</para>
+
+        <programlisting>
+my_ssqls_type::table("MyTableName");</programlisting>
       </sect4>
 
 

Modified: trunk/doc/userman/ssqls.dbx
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/doc/userman/ssqls.dbx?rev=2201&r1=2200&r2=2201&view=diff
==============================================================================
--- trunk/doc/userman/ssqls.dbx (original)
+++ trunk/doc/userman/ssqls.dbx Fri Feb 15 08:20:03 2008
@@ -214,7 +214,7 @@
     table name used in queries like this:</para>
 
     <programlisting>
-stock::table() = "MyStockData";</programlisting>
+stock::table("MyStockData");</programlisting>
   </sect2>
 
 

Modified: trunk/lib/ssqls.pl
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/ssqls.pl?rev=2201&r1=2200&r2=2201&view=diff
==============================================================================
--- trunk/lib/ssqls.pl (original)
+++ trunk/lib/ssqls.pl Fri Feb 15 08:20:03 2008
@@ -481,7 +481,8 @@
     sql_compare_define_##CMP(NAME, $parmC)
     sql_construct_define_##CONTR(NAME, $parmC)
     static const char* names[];
-    static const char*& table() { return table_; }
+    static const char* const table() { return table_; }
+    static void table(const char* t) { table_ = t; }
 
     NAME##_value_list<mysqlpp::quote_type0> value_list() const {
       return value_list(",", mysqlpp::quote);}


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to