List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:May 19 2011 8:45pm
Subject:Re: SSQLS: Number of colomns in a table
View as plain text  
On 5/18/2011 10:57 PM, Adrian Cornish wrote:
> On Wed, May 18, 2011 at 9:45 PM, Warren Young<mysqlpp@stripped> wrote:
>>
>> Instead of defining the new one in terms of the old, why not just
>> make this the new constant, and replace all the other ones? ssqls_NULL
>> isn't nearly as C++ish as ssqls::field_count.
>
> I tried quickly to remove the enum - but ssqls_NULL is used internally
> in some places like:
> $create_list .= "    if (i$j == NAME##_NULL) return;\n" unless $i == 1;

You can use NAME##::field_count here.

> Also even though it isnt documented - maybe someone is using it. (Not
> sure if that is an issue)

Given that it isn't documented and I'll bet there aren't too many who 
have braved the rabid tiger filled jungle that is ssqls.pl, this doesn't 
worry me much.  If someone complains, we can add a #define alias for it.

>> I guess it makes sense that the second const can have no useful
>> effect. It would be different if it were returning a reference to the
>> internal C string pointer.
>
> Agree - but I get lots of warnings in my projects from this - its a
> bit like  "const int foo()" const by val makes no sense

I'm agreeing, too.

Let's make this a separate patch, though.  Actually, just leave it out, 
if you post a patch.  It's small enough I can hand apply it without risk 
of screwing it up. :)

By the way, I've added -Wextra to the "bootstrap pedantic" flag set. 
That way it will get tested, from time to time.
Thread
Crash in DBDriver::fetch_row on a heavily loaded system...dancook)12 Apr
  • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Adrian Cornish12 Apr
    • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)12 Apr
    • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)13 Apr
      • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young13 Apr
        • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Adrian Cornish13 Apr
          • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young13 Apr
        • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)15 Apr
          • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young15 Apr
            • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young15 Apr
            • RE: Crash in DBDriver::fetch_row on a heavily loaded system...dancook)16 Apr
              • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young16 Apr
          • SSQLS: Number of colomns in a tabledancook)19 May
            • Re: SSQLS: Number of colomns in a tableAdrian Cornish19 May
            • Re: SSQLS: Number of colomns in a tableAdrian Cornish19 May
              • Re: SSQLS: Number of colomns in a tableWarren Young19 May
                • Re: SSQLS: Number of colomns in a tableAdrian Cornish19 May
                  • RE: SSQLS: Number of colomns in a tabledancook)19 May
                  • Re: SSQLS: Number of colomns in a tableWarren Young19 May
                    • Re: SSQLS: Number of colomns in a tableWarren Young20 May
      • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Adrian Cornish13 Apr
        • Re: Crash in DBDriver::fetch_row on a heavily loaded system...Warren Young13 Apr