Query::insert declared as
template <class T>
Query& insert(const T& v)
// See above comment for cast rationale
"INSERT INTO " << v.table() << " (" <<
v.field_list() << ") VALUES (" <<
v.value_list() << ')';
So, I guess base class can have at least such methods
Explain please, why "It doesn't have to have _any_ methods to be useful"?
В сообщении от 25 октября 2006 16:14 Warren Young написал(a):
> Королев Илья wrote:
> >>>> 5. SSQLS structures should derive from a common base class. This
> >>>> you put some useful common code in the MySQL++ library itself, but
> >>>> more importantly, it would let you make methods like
> >>>> into regular methods instead of templates.
> >>> Give a more detailed description (example), please.
> >> What else needs to be explained? It would be useful if all SSQLSes
> >> derived from a common base class that lives in the MySQL++ library.
> >> There's nothing more complicated than that to it.
> > I mean "what do you think about interface of that common base class" :)
> It doesn't have to have _any_ methods to be useful. Just the ability to
> pass it to Query::insert() and similar methods will make it useful
> enough. If you want to get ideas for other methods it might have, try
> running some v2.1 SSQLSes through doc/ssqls-pretty