On Jun 1, 2009, at 3:47 AM, Mike Naylor wrote:
> Assume I'm trying to avoid having multiple sub-SSQLS declarations on
> the one table, I'd like to be able to set certain SSQLS fields so
> that they don't update the MySQL records on insert or update. I can
> set the auto increment field to value zero and this will not cause
> the MySQL value to be over written. I'm looking for a way to set
> the timestamp field so that too will allow MySQL to do it's own thing.
There are at least two different questions here. Let's deal with the
one you actually asked first:
> row.event_date = mysqlpp::sql_timestamp::now();
row.event_date = mysqlpp::sql_timestamp();
Or, just leave it unassigned.
This only works with mysqlpp::DateTime, not with Date or Time.
I just tried it, so I know it works.
> i.e. I'd like to code something like this...
> row.event_date = 0;
> or even better...
> row.event_date = mysqlpp::IGNORE;
MySQL++ has no such feature, and I can't see a good reason to add it.
It smells like messy thinking, like you haven't thought through the DB
If you think I'm wrong, show an example where you have two DB tables
that logically should be served by a single SSQLS, but which can't
work in the current scheme.