3 messages in com.mysql.lists.plusplusfixed length char handling/declaratio...| From | Sent On | Attachments |
|---|---|---|
| Shigeya Suzuki | 16 Jul 2006 06:06 | |
| Warren Young | 18 Jul 2006 03:31 | |
| Shigeya Suzuki | 19 Jul 2006 09:55 |
| Subject: | fixed length char handling/declaration by SSQL![]() |
|---|---|
| From: | Shigeya Suzuki (shig...@wide.ad.jp) |
| Date: | 07/16/2006 06:06:16 AM |
| List: | com.mysql.lists.plusplus |
Hi,
I'm new to mysql++ and trying to figure out how to use this.
One of the code snipped I need to write is store some fixed length binary data (say, char(16)) and want to handle it efficiently or want to write it in C+ as easy as possible. In other words, I'd like to store IPv6 address as column and want to handle it via a class. (I plan to store it as varchar but actually, whether this is efficient in MySQL point of view is another question - I have not used MySQL very seriously till now..)
Say, I want to write, for example,
sql_create_3(AddressToAS, 3, 0, unsigned int, ata_id, SOME_CLASS_NAME ata_addr, unsigned int, ata_as);
and, want to use storein(some_vector)...
I understand that it is possible to fetch binary data using 'fetch_lengths' function (according to ML), but since I love power of SSQLS, I prefer using it if possible. Or, prefer to write or modify some template to achieve this. I tried to use string but string seems to be not working well.
I checked mailing list but there are no mention about fixed length binary as I check. I read reference but no mention about such. I will read code, but I want to know whether it is possible to write it easily or not...
Any information appreciated.
shigeya
PS. I didn't know about mysql++ - this library is really good. Actually, I've tried to write DB independent C++ SQL DB libraries for three times in last 12 years and always not satisfied with result.. Fortunately I currently only need to use MySQL for my personal research purpose, so it perfectly fit to my needs. thanks.




