dbTalk Databases Forums  

RELEASE: v1.7.40

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss RELEASE: v1.7.40 in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Warren Young
 
Posts: n/a

Default RELEASE: v1.7.40 - 05-27-2005 , 01:44 PM






This is a monster release! Most of it's documentation, but there's a
fair bit of functional change, too:

o Multiple item form of insert() now works if you're using the
SQLQuery class, or its derivative, Query. Thanks to Mark
Meredino for this patch.

o Fixed a bug in const_string::compare(), in which MySQL++
would walk off the end of the shorter of the two strings.
All was well if the two were the same length.

o ResUse:perator=() now fully updates the object, so it's more
like the behavior of the full ctor.

o All source files now contain a license and copyright statement
somewhere within them.

o Optimized mysql++.h a bit: it now #includes only the minimum set
of files required, and there is now an idempotency guard.
This improves compile times a smidge, but mainly it was
done to clean up the generated #include file graph in the
reference manual. Before, it was a frightful tangle because
we #included everything except custom*.h.

o Constness fix in MySQL++ date/time classes to avoid compiler
warnings with SSQLS. Thanks to Wolfram Arnold for this patch.

o Fixed some compiler warnings in custom*.h. Thanks to Chris Frey
for this patch.

o Added "Submitting Patches" and "Maintaining a Private CVS
Repository" sections to the HACKERS file. Thanks to Chris
Frey for the source material for these sections. The HACKERS
file was improved in several other ways at the same time.

o PDF version of user manual no longer has links to the reference
manual. They were ugly, and they were broken anyway due to the
way we move the PDFs after generating them. If you want
interlinked manuals, use the HTML version.

o PDF version of user manual now has hard page breaks between
chapters.

o Removed complic1 example. Wasn't pulling its own weight.
Everything it is supposed to demonstrate is shown in other
examples already.

o Refactored print_stock_table() in examples/util module to be
four functions, and made all the examples use various of
these functions where appropriate. Before, several of
the examples had one-off stock table printing code because
print_stock_table() wasn't exactly the right thing, for one
reason or another. One practical problem with this is that
some of the examples missed out on the recent Unicode updates;
now such a change affects all examples the same way.

o Since so many of the examples rely on the util module, the user
manual now covers it. The simple1 example in the user manual
didn't make much sense before, in particular, because it's
really just a driver for the util module.

o Added custom5 example. It shows how to use the equal_list()
functionality of SSQLS. Thanks to Chris Frey for the original
version of this program. (I simplified it quite a bit after
accepting it.)

o New user manual now covers the value_list(), equal_list() and
field_list() stuff that the old manual covered but which was
left out in previous versions of the new manaul. Most of the
examples are the same, but the prose is almost completely new.
This new section includes the custom5 example.

o Every declaration in MySQL++ is now documented in the reference
manual, or explicitly treated as "internal only".

o Improved docs for MySQL++'s mechanism to map between MySQL
server types and C++ types. Initial doc patch by Chris Frey,
which I greatly reworked.

o Improved a lot of existing reference manual documentation while
adding the new stuff.

o Expanded greatly on the exception handling discussion in the user
manual.

o Added all-new "Quoting and Escaping" section to the user
manual's Tutorial chapter. Moved some existing comments on
quoting and escaping around and added some new ones to other
sections as a result.

o Added all-new "Handling SQL Nulls" section to the user manual's
Tutorial chapter.

o Many improvements to the Overview section of the user manual.

o Row:perator[] reference now explains the right and wrong way to
use the values it returns. This is in response to a mailing list
post where someone was incorrectly using this feature and getting
a bunch of dangling pointers.

o Updated Doxyfile so 1.3.19.1 parses it without warnings. Still
works with versions back to 1.2.18, at least. (These are
the versions shipped with Fedora Core 3 and Red Hat Linux 9,
respectively.)

o Using a superior method to make Doxygen ignore certain sections
of the source code. Between this change and the fact that
everything not so ignored is documented, Doxygen no longer
generates any warnings.

o Lots of code style updates. Everything should now be consistently
formatted.

As always, it is available at http://tangentsoft.net/mysql++/


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Chris Frey
 
Posts: n/a

Default Re: RELEASE: v1.7.40 - 05-28-2005 , 03:44 PM






On Fri, May 27, 2005 at 12:02:36PM -0600, Warren Young wrote:
Quote:
This is a monster release! Most of it's documentation, but there's a
fair bit of functional change, too:
Some comments while reading through the patch:

In the wishlist:
+ o There are operator<<(SQLQuery&, ColData...) functions in addition
+ to the normal (ostream&, ColData) ones. (See manip.h) It looks
+ like a workaround for a compiler's type system weakness. If this
+ is no longer needed, the obvious change plays into the decision for
+ the previous item: if Query is no longer an ostream, those
+ separate operators still need to exist, but the casts in the
+ implementation will break things.

The difference is that any stream based on SQLQuery will *always* have
the quoting logic run on it. For any stream based only on std:stream,
an additional check is done where quoting is skipped if being sent
to std::cout or std::cerr.

This allows code like:

ColData something;
Query query;
std::cout << something; // no quoting
query << something; // quoting

And the right thing is supposed to happen.

Personally, I'd ponder changing that in the future, so that any ostream-based
overload gets no quoting logic at all. This would simplify the std:stream
based operator<<() (and would need to be tested of course :-)). I don't think
that an fstream should get any special quoting treatment if cout doesn't,
for example; but currently it would, since the code only checks for std::cout
and std::cerr streambufs.

On the other hand, perhaps quoting should always be available in
any stream, which would mean that the SQLQuery overload could go away
entirely, as well as the special check in the std:stream version.

The question then becomes, how do you turn quoting off if you want to write
pure data to a file? You'd have to mess with casting like:

fstream file(...);
file << (std::string) something;

- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Chris Frey
 
Posts: n/a

Default Re: RELEASE: v1.7.40 - 05-28-2005 , 06:52 PM



On Fri, May 27, 2005 at 12:02:36PM -0600, Warren Young wrote:
Quote:
o Lots of code style updates. Everything should now be consistently
formatted.
I sure hope so. :-) Man that was brutal... in the future you might want to
use something like GNU indent and make a release with only formatting changes.
Then it wouldn't be such a pain to track real changes with diff. The -b
option helps, but not enough.

And since I'm on the topic, I'll just state for the record that I'm
generally against changing code like this:

const char *str; // this is good

to:

const char* str; // this is bad

Because it makes the following valid code look correct, when it usually isn't:

const char* str1, str2;

(I've been of this opinion before Joel Spolsky wrote about it too)

That said, in general the old formatting style was rather compact and
hard to parse, so thanks for the work so far. :-)

- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #4  
Old   
Warren Young
 
Posts: n/a

Default Re: RELEASE: v1.7.40 - 06-01-2005 , 06:20 AM



Chris Frey wrote:

Quote:
Man that was brutal... in the future you might want to
use something like GNU indent and make a release with only formatting changes.
Noted, but hopefully there will be no "next time".

Also, the public Subversion repository is coming soon, so it'll be
possible to skip over big formatting changes, since I usually check them
in separately from other changes.

Quote:
Then it wouldn't be such a pain to track real changes with diff.
Understood. I'm not a big code style Nazi, but the previous style stunk
so bad I couldn't tolerate it. You'd have thunk that whitespace cost
money, the way it was used in the older code....

The new style is pretty common, so hopefully everyone will be able to
tolerate it.

Quote:
const char *str; // this is good

to:

const char* str; // this is bad
I've been on both sides of that fence, and have landed on the latter
because the star modifies the type here, not "str".

Quote:
Because it makes the following valid code look correct, when it usually isn't:

const char* str1, str2;
Not a sufficient reason to change it back. This is just a weakness in
C's design, which I compensate for by never declaring two pointers in
one statement. Then the issue never comes up.

Quote:
(I've been of this opinion before Joel Spolsky wrote about it too)
Some other luminary convinced me to change my style to the current one.
I could drop that name, if I remembered which one.

Point is, smart people disagree on points like this. At some point,
it's good enough that you follow a consistent style. The details don't
matter enough to make fighting worthwhile.

Quote:
That said, in general the old formatting style was rather compact and
hard to parse, so thanks for the work so far. :-)
If there are any more instances where attention is needed, let me know.
I didn't find any on a quick once-over before the release, but I could
easily have missed some.

The most likely class of problems needing attention are where I missed
fixing things resulting from indent's weak knowledge of C++. indent
doesn't really know C++, so things like the & in references and the
angle brackets in templates confuse it. It thinks they're C operators,
so it adds spaces around them.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #5  
Old   
Warren Young
 
Posts: n/a

Default Re: RELEASE: v1.7.40 - 06-01-2005 , 08:27 AM



Chris Frey wrote:

Quote:
The difference is that any stream based on SQLQuery will *always* have
the quoting logic run on it.
Ah, thanks for reminding me of this. I did see this while doing all the
new refman work, but didn't realize this was part of that feature.

Quote:
Personally, I'd ponder changing that in the future, so that any ostream-based
overload gets no quoting logic at all.
I like this idea. You can still use the manipulators with other streams
if you really want MySQL++ to do quoting and/or escaping. This wouldn't
break the ABI, but it's a big enough change that it should go in 2.x.

Quote:
On the other hand, perhaps quoting should always be available in
any stream, which would mean that the SQLQuery overload could go away
entirely, as well as the special check in the std:stream version.
Nah. Think what that would do to the simple* examples alone.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.