From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2006-10-05 23:45:54
On 10/5/06, Mateusz Loskot <mateusz_at_[hidden]> wrote:
> loufoque wrote:
> > Nicola Musatti wrote:
> >> std::cout << r.as<long>() << "\t ";
> > Maybe r could be a boost::any or something of the like ?
> Currently, SOCI uses similar concept of type holder (near line 284)
> IMHO, boost::any seems interesting subject for boostification task.
Or might not a
boost::variant<bool, char, int32_t, int64_t, double, boost::ptime,
std::string, std::vector<uint8_t> /* blob? */>
make more sense? Is the set of types which can be stored in databases
On the flip side fo that coin, one also might want the ability to take
result data stored in the DB as one type and treat it as some other
type via an appropriate conversion operation (ala lexical_cast or
serialization perhaps?). For example storing IP addresses in varchar
form but treating them as asio::ip::address'es in your application.
-- Caleb Epstein
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk