3 messages in com.mysql.lists.plusplusRE: Mysql++ and stl bitset class.| From | Sent On | Attachments |
|---|---|---|
| Jonatan Taminau | 07 Nov 2005 05:27 | |
| Steve Povilaitis | 07 Nov 2005 06:52 | |
| Warren Young | 07 Nov 2005 12:02 |
| Subject: | RE: Mysql++ and stl bitset class.![]() |
|---|---|
| From: | Steve Povilaitis (spov...@aegistg.com) |
| Date: | 11/07/2005 06:52:31 AM |
| List: | com.mysql.lists.plusplus |
Jonatan,
Sorry I can't help you, but I may be doing some bit oriented message storing in my database as well. If you don't mind, please post what you learn to this forum, or if inappropriate for this forum, please feel free to email me directly.
Thanks,
Steve
-----Original Message----- From: Jonatan Taminau [mailto:jona...@silicos.com] Sent: Monday, November 07, 2005 8:28 AM To: plus...@lists.mysql.com Subject: Mysql++ and stl bitset class.
I want to store some bitstrings in a mysql database so for testing i made a simple program:
MySql:
CREATE TABLE table ( bitString VARCHAR(1024) )
Program:
bitset<1024> bitString; query << "INSERT INTO table VALUES (\'" << bitString.to_string() << "\');"; query.execute();
...
query << "SELECT * FROM table;"; ResUse result(query.use()); if (result) { Row row; while (row = result.fetch_row()) { bitset<1024> bitString(row[0]); //do something with bitString } }
However, I should be able to do this in a more performant way without the 'string-conversion'. Is this possible? I have seen Mysql supports some datatypes like BINARY and VARBINARY, so has someone experience in using them for this kind of purposes?
Thanks in advance, Jonatan Taminau.
-- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=spov...@aegistg.com
This e-mail and any attachments are provided through AEgis Technologies' e-mail services and may contain company sensitive and/or privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal.




