![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| ||||
| ||||
|
|
in <mysql++/sql_types.h> there are such lines ... typedef Time sql_timestamp; ... I guess it _really_ incorrect, it should be at least ... typedef DateTime sql_timestamp; ... |
|
And what about timestamp which would work as time_t? |
ateTime, and use that to|
Again about SSQLS and static members. I've made a version of custom.pl - which lives without static members, it creates custom_no_static.h and custom_no_static-macros.h files. I guess it may be useful. |
|
PPS How I can include patch? |
#2
| |||
| |||
|
|
hm... Can you give me a example of using sql_timestamp? |
|
Again about SSQLS and static members. I've made a version of custom.pl - which lives without static members, it creates custom_no_static.h and custom_no_static-macros.h files. I guess it may be useful. You shouldn't need that any more with the most recent two versions of MySQL++. Do they not solve the problem for you? Is it in SVN? I'll try it |
#3
| |||
| |||
|
|
Search custom.pl for MYSQLPP_NO_STATIC, or see the way this feature is tested in examples/util.cpp. I guess, in such case I can't use field_list() function? Beside, field_list() use names[], but in my patch there are no names[] at all. |
#4
| |||
| |||
|
|
Why we can't just drop away static names[] ( and table)? |
|
The only advantage IMHO is that we can change names[](table) on the fly. |
#5
| |||
| |||
|
|
В сообщении от 17 октября 2006 16:04 Warren Young написал(a): Королев Илья wrote: Why we can't just drop away static names[] ( and table)? How would SSQLS build queries without a table of the field names? like this: template <class Manip> std: stream& operator << (std: stream& s, constDB_AdvBase_field_list<Manip>& obj) { s << obj.manip << "user_id" << obj.delem; s << obj.manip << "position" << obj.delem; s << obj.manip << "ts" << obj.delem; s << obj.manip << "pads"; return s; } IMHO in such way we don't need names[] at all. |
|
The only advantage IMHO is that we can change names[](table) on the fly. Every single table in my own use of MySQL++ has a different name than the corresponding SSQLS. I am unwilling to give up that feature. Explain please. |
|
In such case IMHO it's possible to declare "TableName" in other way. #define TABLE_NAME "TableName" Q << "SELECT " << obj.field_list() << " FROM " << TABLE_NAME; |
#6
| |||
| |||
|
|
I proposed defining the structures in XML or some other such language and create a preprocessor that translates that into header files defining the structures. Unfortunately in closest period I'm enough busy, but in next months I'll try take it. |
|
are there any concrete ideas? Just to move in correct way. |
#7
| |||
| |||
|
|
That's fine, I couldn't accept it before v3.0 anyway. Possibly, we can try to make an unstable branch. And for example 2.2, 2.4, etc will be stable, and 2.3, 2.5, etc will be unstable. In that case, it would be possible to include new features not in 3.0, but earlier. |
|
3. Cope with different type systems. Notice above that I'm using SQL type names. It should be smart enough to translate those into the proper MySQL++ type names. Likewise, if I put in, say, time_t, it should be able to figure out the right thing to do there, too. Give a more detailed description, please. |
|
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. |
#8
| |||
| |||
|
|
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" ![]() |
#9
| |||
| |||
|
|
Explain please, why "It doesn't have to have _any_ methods to be useful"? |
![]() |
| Thread Tools | |
| Display Modes | |
| |