dbTalk Databases Forums  

insert ssqls

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


Discuss insert ssqls in the mailing.database.mysql-plusplus forum.



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

Default insert ssqls - 03-03-2008 , 02:14 AM






I have the following:

sql_create_19(lf_invoice,
1, 0,
mysqlpp::sql_bigint, id,
mysqlpp::Null<mysqlpp::sql_bigint>, contact_id,
mysqlpp::sql_date, invoice_date,
mysqlpp::Null<mysqlpp::sql_varchar>, vatId,
mysqlpp::Null<mysqlpp::sql_varchar>, title,
mysqlpp::Null<mysqlpp::sql_varchar>, first_name,
mysqlpp::Null<mysqlpp::sql_varchar>, last_name,
mysqlpp::Null<mysqlpp::sql_varchar>, companyname,
mysqlpp::Null<mysqlpp::sql_varchar>, street,
mysqlpp::Null<mysqlpp::sql_varchar>, housenumber,
mysqlpp::Null<mysqlpp::sql_varchar>, mailbox,
mysqlpp::Null<mysqlpp::sql_varchar>, zip,
mysqlpp::Null<mysqlpp::sql_varchar>, town,
mysqlpp::Null<mysqlpp::sql_varchar>, state,
mysqlpp::Null<mysqlpp::sql_varchar>, country,
mysqlpp::sql_float, vat_tarrif,
mysqlpp::sql_decimal, vat,
mysqlpp::sql_decimal, total_excl_vat,
mysqlpp::sql_decimal, total_incl_vat)

How do I insert a new row as 'id' is a auto_increment?

Using mysql++ 3.0

Grts Bart

--
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
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: insert ssqls - 03-03-2008 , 09:52 PM






Bart Verstraete wrote:
Quote:
I have the following:

sql_create_19(lf_invoice,
1, 0,
mysqlpp::sql_bigint, id,
[snip]

Quote:
How do I insert a new row as 'id' is a auto_increment?
The only easy way is to remove the 'id' member from the structure. This
means you will need two versions of this structure if you also use it
for data retrieval. Or, you can do as I do, and hand-roll your INSERT
and UPDATE queries, using the SSQLS only for data retrieval.

This weakness will be easy to fix in SSQLSv2, so I'm not motivated to
fix it before then.

--
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
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: insert ssqls - 03-03-2008 , 10:35 PM



Andrej van der Zee wrote:
Quote:
When does SSQLSv2 stand in the roadmap?
Multiple-choice answer:

a) Roadmap? What roadmap?
b) When I get to it
c) When you get to it
d) Before Christmas. We aren't saying which year.


--
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
  #4  
Old   
Warren Young
 
Posts: n/a

Default Re: insert ssqls - 03-03-2008 , 11:15 PM



Andrej van der Zee wrote:
Quote:
No roadmap?
I suppose the Wishlist is a sort of road map, just lacking a scale.

Quote:
Sounds like a fun job
There's plenty of detail about what I want to see in the Wishlist and in
the mail message linked from it:

http://svn.gna.org/viewcvs/*checkout...trunk/Wishlist
http://lists.mysql.com/plusplus/6929

Be warned: the last guy who tried to do SSQLSv2 gave up in frustration.

I'm going to be pretty demanding about what I'm willing to accept on
this, because I don't want to do this again. It needs to be a clear
upgrade, while avoiding the dreaded second system syndrome. It needs to
be flexible enough to express everything you can currently plus those
things we've seen that we also want to be able to express. Because it's
a DSL that will be rarely used, and read far more often than written,
the syntax must be clear, concise, and unambiguous. It must avoid the
AppleScript trap: code that's quite readable, but in a syntax so rich
and flexible that learning to write it is as difficult as mastering the
average application framework. Its power and extensibility has to come
from standard C++ mechanisms, not special features in the DSL itself or
in-DSL extensibility.

--
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 - 2013, Jelsoft Enterprises Ltd.