Author: wyoung
Date: Fri Dec 21 09:02:31 2007
New Revision: 2008

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2008&view=rev
Log:
Completely refactored ResUse/Result hierarchy:

- Instead of deriving Result from ResUse, deriving both from a common
  base class, ResultBase.  (Result is-not-a ResUse!)  Objects of the
  base type can't be created: it exists only to hold common data and
  functionality.
- Renamed ResUse to UseQueryResult
- Renamed Result to StoreQueryResult
- Renamed ResNSel to SimpleResult
- If MYSQLPP_BACKWARDS_COMPATIBLE_RESULT_TYPES is defined, a new set of
  compatibility #defines is activated letting you use the old names for
  the classes.
- StoreQueryResult now derives from vector<Row> and populates itself on
  construction, then disposes of the underlying C API data structure.
  Many benefits: 1) operator[] uses reference semantics instead of value
  semantics, and operator-> finally (!) works correctly; 2) dropped
  dependency on subscript_iterator; 3) concentrates knowledge of C API
  in a much smaller area; 4) 100% compatible with STL idioms now.  New
  refcounting stuff makes this both possible _and_ efficient.
- Only UseQueryResult keeps a MYSQL_RES internal member now.  Nothing
  had to change in MySQL++, since we only take advantage of the
  conversion of UseQueryResult to MYSQL_RES in the implementation of
  stuff like Query::storein().
- A few classes that took ResUse parameters as generic result objects
  now take ResultBase parameters.  It provides all the outsiders need.
- Added DBDriver::free_result() to wrap mysql_free_result()
- IMPORTANT COMPATIBILITY BREAK: because we used fetch_row() stuff in
  Result previously, it was okay to index past the end of the result
  set: you'd just get a falsy Row when you did this, just as happens
  when doing the same thing in a "use" query.  The simple1 and simple2
  examples did this, so it's likely that code exists that takes
  advantage of this misfeature.  In documenting breakages, show the
  proper method.

Modified:
    trunk/Wishlist
    trunk/examples/cgi_jpeg.cpp
    trunk/examples/custom3.cpp
    trunk/examples/dbinfo.cpp
    trunk/examples/fieldinf.cpp
    trunk/examples/load_jpeg.cpp
    trunk/examples/multiquery.cpp
    trunk/examples/printdata.cpp
    trunk/examples/printdata.h
    trunk/examples/simple1.cpp
    trunk/examples/simple2.cpp
    trunk/examples/simple3.cpp
    trunk/examples/tquery1.cpp
    trunk/examples/tquery2.cpp
    trunk/lib/dbdriver.h
    trunk/lib/field_names.cpp
    trunk/lib/field_names.h
    trunk/lib/field_types.cpp
    trunk/lib/field_types.h
    trunk/lib/query.cpp
    trunk/lib/query.h
    trunk/lib/result.cpp
    trunk/lib/result.h
    trunk/lib/row.cpp
    trunk/lib/row.h

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: trunk/Wishlist
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/Wishlist?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/cgi_jpeg.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/cgi_jpeg.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/custom3.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/custom3.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/dbinfo.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/dbinfo.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/fieldinf.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/fieldinf.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/load_jpeg.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/load_jpeg.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/multiquery.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/multiquery.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/printdata.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/printdata.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/printdata.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/printdata.h?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/simple1.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/simple1.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/simple2.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/simple2.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/simple3.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/simple3.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/tquery1.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/tquery1.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/examples/tquery2.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/tquery2.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/dbdriver.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/dbdriver.h?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/field_names.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/field_names.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/field_names.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/field_names.h?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/field_types.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/field_types.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/field_types.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/field_types.h?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/query.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/query.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/query.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/query.h?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/result.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/result.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.h?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/row.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/row.cpp?rev=2008&r1=2007&r2=2008&view=diff

Modified: trunk/lib/row.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/row.h?rev=2008&r1=2007&r2=2008&view=diff


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

Reply via email to