dbTalk Databases Forums  

RE : Re: bound between SSQLS structure name and table name

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss RE : Re: bound between SSQLS structure name and table name in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default RE : Re: bound between SSQLS structure name and table name - 07-24-2006 , 05:22 AM






Hi Warren,

Quote:
Yes. My own code does this regularly. I don't
understand why you bring
_names into this at all.
My first try was to use the MYSQLPP_SSQLS_NO_STATICS
macro to avoid the _table definition. But this also
removes the _name definition part. That's why I
mentioned it.

Quote:
You simply assign the underlying SQL table
name to MyClassName::_table early in the program's
execution. It's no more difficult than that.
Ok, this works well. Nevertheless, from a theoretical
point of view, I would prefer not to change the value
of a static member from outside the class (even within
one of its children).

Another way (I actually use this now), is to use name
spaces. In the following example, whatever::Person is
the SSQLS structure and Person is the exported class
with all the nice method I want to have.
namespace whatever {
sql_create_1(Person,1,0,mysqlpp::sql_int,id);
};
class Person : private whatever::Person {
void NiceMethod();
void VeryCoolMethod();
};
Thanks for the response.







__________________________________________________ _________________________
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
http://fr.answers.yahoo.com


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.