Serialization of a simple type like int/char etc can be very short, use std::vector or something may overkill because of the memory allocation.
std::string is a good choice since it has SSO internal buffer.
But bind(int, const std::string &) always binds to TEXT, not blob.
can we get a way explictly bind std::string to a BLOB type? Thanks! very easy to implement.
Or put a default parameter as:
bind(int, const std::string &, bool bind_to_text = true); // false to BLOB
Serialization of a simple type like int/char etc can be very short, use std::vector or something may overkill because of the memory allocation.
std::string is a good choice since it has SSO internal buffer.
But bind(int, const std::string &) always binds to TEXT, not blob. can we get a way explictly bind std::string to a BLOB type? Thanks! very easy to implement.
Or put a default parameter as: bind(int, const std::string &, bool bind_to_text = true); // false to BLOB