Closed jschrotter closed 5 years ago
Currently recommended solution is using type SuperiorMySqlpp::Sql::StringData<size>
, you can see the usage in tests. In fact, SuperiorMySqlpp::Sql::String
is just a convenient alias for that with arbitrary limit.
In a future version, we're planning to introduce support for proper dynamically sized container, just like you mentioned.
SuperiorMySqlpp::Sql::String is by default initialized to the length of 1024B. When binding such value to a varchar(1000) I got "Data truncated while fetching statement!" error. Would be nice to have String initialized to the lenght which is always big enough (even for UTF-8 values), ideally derived from actual data column length.