|
Re: Problems with timestamp: msg#00041db.mysql.c++
Query::insert declared as template <class T> Query& insert(const T& v) { reset(); // See above comment for cast rationale dynamic_cast<std::ostream&>(*this) << std::setprecision(16) << "INSERT INTO " << v.table() << " (" << v.field_list() << ") VALUES (" << v.value_list() << ')'; return *this; } So, I guess base class can have at least such methods - table() - field_list() - value_list() - equal_list() 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 let > >>>> you put some useful common code in the MySQL++ library itself, but > >>>> more importantly, it would let you make methods like Query::insert() > >>>> 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 -- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Segmentation fault while creating a new Database: 00041, Joel Fielder |
|---|---|
| Next by Date: | Re: Segmentation fault while creating a new Database: 00041, Warren Young |
| Previous by Thread: | Segmentation fault while creating a new Databasei: 00041, neelu dhiman |
| Next by Thread: | Re: Problems with timestamp: 00041, Warren Young |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |