Drew M. wrote:
> I had a strange issue that I eventually tracked down to a mismatch
> between the number of columns included in the results of a select
> query and the number of columns my SSQLS structure expected.
This problem is touched upon (obliquely) in the user manual:
http://tangentsoft.net/mysql++/doc/html/userman/ssqls.html#id2899055
> One idea I have to catch this at run-time would be to assert that the
> number of columns in a result set matched the size of the ssqls
> structure
No, this just replaces one form of rigidity with another.
What I had planned for SSQLSv2 is that it would populate fields based on
name, not position in the Row object. Row already knows how to look up
fields by name, so this is no big trick.
This has many benefits in addition to solving your particular problem.
See the repository version of the Wishlist for the current plan:
http://svn.gna.org/viewcvs/*checkout*/mysqlpp/trunk/Wishlist
(It's down in the "v3.1 Tentative Plan" section.)
This can be done in the context of the current implementation of SSQLS;
it doesn't have to wait for SSQLS v2. I only made it part of v2 because
this release cycle has dragged on long enough already. If a patch
happened to appear (*cough* *cough*) before I freeze MySQL++ v3.0, I'd
be rather likely to accept it, or at least riff on it.