List:MySQL++« Previous MessageNext Message »
From:Earl Miles Date:April 5 2005 6:01pm
Subject:Re: RFC: Row::operator[] change
View as plain text  
Warren Young wrote:
> But recently, it came to me that the integer overloads were probably the 
> least useful of the bunch in real-world code.  Intelligent database 
> design doesn't make the client code dependent on the number or order of 
> database columns.  So, I wonder if it would have been better to keep 
> operator[](const char*) instead.

This depends a lot on how important lookup speed is. The integer lookup
is bound to be faster than the string lookup. Though there's already
enough of a speed hit in the mysqlpp::Row stuff that it may not matter.

However, I can say that my code currently does use the numeric index 
lookup, because it knows what order the fields are in (they match
another list it's keeping). So there's at least one instance of real
world code that uses it.
Thread
RFC: Row::operator[] changeWarren Young5 Apr
  • Re: RFC: Row::operator[] changeEarl Miles5 Apr
    • Re: RFC: Row::operator[] changeWarren Young5 Apr
  • Re: RFC: Row::operator[] changeChris Frey5 Apr
    • Re: RFC: Row::operator[] changeWarren Young22 Jun
  • Re: RFC: Row::operator[] changeWarren Young22 Jun
    • Re: RFC: Row::operator[] changeWarren Young25 Jun
Re: RFC: Row::operator[] changeBruce Keats11 Apr