[odb-users] Support for std::vector<unsigned char> and arrays
Chris Richards
chris.richards at yellowfeather.co.uk
Wed Nov 2 13:24:37 EDT 2011
Hi,
Although ODB supports mapping the std::vector<char> type to the MySQL
BLOB and BINARY types it doesn't seem to support std::vector<unsigned
char>, standard arrays or boost arrays. See the class declaration below:
#pragma db object
class test
{
public:
#pragma db id
int id;
#pragma db type("BINARY(16)")
std::vector<char> buffer1; // OK
#pragma db type("BINARY(16)")
std::vector<unsigned char> buffer2; // not OK
#pragma db type("BINARY(16)")
unsigned char buffer3[16]; // not OK
#pragma db type("BINARY(16)")
boost::array<unsigned char, 16> buffer4; // not OK
}
Is it possible to work around, or add support, for these data types?
Thanks,
Chris
More information about the odb-users
mailing list