List:MySQL++« Previous MessageNext Message »
From:Steve Povilaitis Date:November 7 2005 2:52pm
Subject:RE: Mysql++ and stl bitset class.
View as plain text  
 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:jonatan.taminau@stripped] 
> Sent: Monday, November 07, 2005 8:28 AM
> To: plusplus@stripped
> 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=1
> 


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.
Thread
Mysql++ and stl bitset class.Jonatan Taminau7 Nov
  • RE: Mysql++ and stl bitset class.Steve Povilaitis7 Nov
  • Re: Mysql++ and stl bitset class.Warren Young7 Nov