[Qt-interest] Variants and Binds
Jason H
scorp1us at yahoo.com
Wed Sep 23 23:49:57 CEST 2009
I wish to add a new kind of class to QVariant, so that I can use it in a SQL bind.
Specifically, I need to provide access to database expressions. For instance a QDate object is serialized to to_char('2001-01-01', 'YYYY-MM-DD') when used in Oracle. I need to provide a very similar thing in that I need SEQUENCE.nextval (an expression, not a string) so that my call is bindValue(":rowid", Expression("TABLE_ID_SEQUENCE.nextval")); If I use a QByteArray, I get "TABLE_ID_SEQUENCE.nextval", the string, and that isn't a valid numeric record ID.
So I need to know how I can create a datatype that won't be quoted.
Thanks!
More information about the Qt-interest-old
mailing list