List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:May 10 2005 5:10pm
Subject:Re: equal_list() using a bool vector
View as plain text  
Mark Merendino wrote:

> Anyway, here is the code I added to my custom.pl 

Non-trivial patches need to be in unified diff format, please, if only 
because that encodes exactly where in the file to apply your patch.

> I know it was suggested that this was ment to be
> an internal function, 

Either that, or a documented one.  Therefore, please also supply a patch 
to the user manual.  Even if you think you cannot write, having 
something I can go in and rewrite would be better than having to explain 
this from scratch, as I don't fully understand it right now.

Also, can you explain what you found in the library that prevented your 
example code from working in the first place?  I.e., precisely what 
problem this patch solves?

> An example of using it....
> 
> 	vector<bool> a(5, false);    
> 	a[stock_weight] = true; 
>       a[stock_price] = true;    
> 	query << "SELECT * FROM stock WHERE " << q.equal_list(" AND ",
> &a);  

I assume that the SSQLS being used here is the standard one used in the 
tutorial, and that 'q' is an instance of that SSQLS?

I don't like the named stock_* constants; they just obscure things.

This example, suitably clarified, should be part of your userman patch.
Thread
equal_list() using a bool vectorMark Merendino3 May
  • Re: equal_list() using a bool vectorChris Frey4 May
  • Re: equal_list() using a bool vectorWarren Young4 May
RE: equal_list() using a bool vectorMark Merendino5 May
  • Re: equal_list() using a bool vectorWarren Young10 May
    • [PATCH] Re: equal_list() using a bool vectorChris Frey10 May
      • Re: [PATCH] Re: equal_list() using a bool vectorWarren Young10 May
        • Re: [PATCH] Re: equal_list() using a bool vectorChris Frey10 May
          • Re: [PATCH] Re: equal_list() using a bool vectorWarren Young11 May
RE: [PATCH] Re: equal_list() using a bool vectorMark Merendino11 May
  • Re: [PATCH] Re: equal_list() using a bool vectorChris Frey11 May
    • Re: [PATCH] Re: equal_list() using a bool vectorWarren Young11 May