h***@code-styling.de
2013-06-25 15:58:54 UTC
Beside the implementation of MSSQL unicode support over std::string I stumbled
over the unsupported BLOB capabilities of SOCI in terms of ODBC.
We would use SOCI as replacement ina 3.2M codelines middleware project but we
have to check carefully all capabilities upfront.
SOCI is still within the scope (beside other libraries) but after solving partly
MS unicode things we have to deal with blobs too.
It's not possible to fetch them over ODBC by vectors, any other way is not
suiteable because of performance.
So I did some tests to provide BLOB reading/writing using vectors and it seems,
that it can be handled same straight forward than currently done with
std::wstring (but with special handling to buffer lazy allocation after knowing
the real size per BLOB).
In the MSSQL world I can handle the BLOB field with SQL_C_BINARY but I'm afraid,
this is only half the story.
I would prefere some more input in terms of BLOB utilization at other systems
using ODBC prior to define it fix for a 2nd additional base type: x_binary
(beside the existing x_blob) with a more straight forward class wrapping an
unsigned char vector as content holder.
I haven't looked yet though the other backends (beside ODBC) but I think, it
could be handled there more or less similar at the end.
I appreciate any input for BLOB handling to avoid getting a small tunnel view
:-)
regards
Heiko
over the unsupported BLOB capabilities of SOCI in terms of ODBC.
We would use SOCI as replacement ina 3.2M codelines middleware project but we
have to check carefully all capabilities upfront.
SOCI is still within the scope (beside other libraries) but after solving partly
MS unicode things we have to deal with blobs too.
It's not possible to fetch them over ODBC by vectors, any other way is not
suiteable because of performance.
So I did some tests to provide BLOB reading/writing using vectors and it seems,
that it can be handled same straight forward than currently done with
std::wstring (but with special handling to buffer lazy allocation after knowing
the real size per BLOB).
In the MSSQL world I can handle the BLOB field with SQL_C_BINARY but I'm afraid,
this is only half the story.
I would prefere some more input in terms of BLOB utilization at other systems
using ODBC prior to define it fix for a 2nd additional base type: x_binary
(beside the existing x_blob) with a more straight forward class wrapping an
unsigned char vector as content holder.
I haven't looked yet though the other backends (beside ODBC) but I think, it
could be handled there more or less similar at the end.
I appreciate any input for BLOB handling to avoid getting a small tunnel view
:-)
regards
Heiko