Author: wyoung
Date: Mon Mar  6 22:10:03 2006
New Revision: 1233

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1233&view=rev
Log:
resetdb now creates sample table using the InnoDB storage engine (needed
to test transaction support) and UTF-8 char set (not strictly needed,
but good to show the syntax).

Modified:
    branches/v2.1-bakefile/examples/resetdb.cpp

Modified: branches/v2.1-bakefile/examples/resetdb.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/branches/v2.1-bakefile/examples/resetdb.cpp?rev=1233&r1=1232&r2=1233&view=diff
==============================================================================
--- branches/v2.1-bakefile/examples/resetdb.cpp (original)
+++ branches/v2.1-bakefile/examples/resetdb.cpp Mon Mar  6 22:10:03 2006
@@ -79,8 +79,15 @@
        try {
                // Send the query to create the table and execute it.
                mysqlpp::Query query = con.query();
-               query << "create table stock (item char(20) not null, "
-                               "num bigint, weight double, price double, sdate 
date)";
+               query << 
+                               "CREATE TABLE stock " <<
+                               "(item CHAR(20) NOT NULL, " <<
+                               " num BIGINT, " <<
+                               " weight DOUBLE, " <<
+                               " price DOUBLE, " <<
+                               " sdate DATE) " <<
+                               "ENGINE = InnoDB " <<
+                               "CHARACTER SET utf8 COLLATE utf8_general_ci";
                query.execute();
 
                // Set up the template query to insert the data.  The parse()


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

Reply via email to