void Binder::bind(std::size_t pos, const Date& val, Direction dir) { poco_assert(dir == PD_IN); MYSQL_TIME mt = {0}; mt.year = val.year(); mt.month = val.month(); mt.day = val.day(); _dates.push_back(mt); realBind(pos, MYSQL_TYPE_DATE, &_dates.back(), sizeof(mt)); }
void Binder::bind(std::size_t pos, const Time& val, Direction dir) { poco_assert(dir == PD_IN); MYSQL_TIME mt = {0}; mt.hour = val.hour(); mt.minute = val.minute(); mt.second = val.second(); mt.time_type = MYSQL_TIMESTAMP_TIME; _dates.push_back(mt); realBind(pos, MYSQL_TYPE_TIME, &_dates.back(), sizeof(mt)); }
void Binder::bind(std::size_t pos, const DateTime& val, Direction dir) { poco_assert(dir == PD_IN); MYSQL_TIME mt = {0}; mt.year = val.year(); mt.month = val.month(); mt.day = val.day(); mt.hour = val.hour(); mt.minute = val.minute(); mt.second = val.second(); mt.second_part = val.millisecond(); mt.time_type = MYSQL_TIMESTAMP_DATETIME; _dates.push_back(mt); realBind(pos, MYSQL_TYPE_DATETIME, &_dates.back(), sizeof(mt)); }
void Binder::bind(std::size_t pos, const Poco::Data::CLOB& val, Direction dir) { poco_assert(dir == PD_IN); realBind(pos, MYSQL_TYPE_BLOB, val.rawContent(), static_cast<int>(val.size())); }
void Binder::bind(std::size_t pos, const std::string& val, Direction dir) { poco_assert(dir == PD_IN); realBind(pos, MYSQL_TYPE_STRING, val.c_str(), static_cast<int>(val.length())); }
void Binder::bind(std::size_t pos, const char& val, Direction dir) { poco_assert(dir == PD_IN); realBind(pos, MYSQL_TYPE_TINY, &val, 0); }
void Binder::bind(std::size_t pos, const Poco::UInt8& val, Direction dir) { poco_assert(dir == PD_IN); realBind(pos, MYSQL_TYPE_TINY, &val, 0, true); }
void Binder::bind(std::size_t pos, const Poco::UInt16& val, Direction dir) { poco_assert(dir == PD_IN); realBind(pos, MYSQL_TYPE_SHORT, &val, 0); }
void Binder::bind(std::size_t pos, const Poco::Int64& val, Direction dir, const WhenNullCb& nullCb) { poco_assert(dir == PD_IN); realBind(pos, Poco::Data::MetaColumn::FDT_INT64, &val, sizeof(Poco::Int64)); }
void Binder::bind(std::size_t pos, const NullData&, Direction dir, const std::type_info&) { poco_assert(dir == PD_IN); realBind(pos, Poco::Data::MetaColumn::FDT_UNKNOWN, 0, 0); }
void Binder::bind(std::size_t pos, const Time& val, Direction dir, const WhenNullCb& nullCb) { poco_assert(dir == PD_IN); realBind(pos, Poco::Data::MetaColumn::FDT_TIME, &val, sizeof(Time)); }
void Binder::bind(std::size_t pos, const Poco::Data::CLOB& val, Direction dir, const WhenNullCb& nullCb) { poco_assert(dir == PD_IN); realBind(pos, Poco::Data::MetaColumn::FDT_CLOB, &val, static_cast<int>(val.size())); }
void Binder::bind(std::size_t pos, const char& val, Direction dir, const WhenNullCb& nullCb) { poco_assert(dir == PD_IN); realBind(pos, Poco::Data::MetaColumn::FDT_UINT8, &val, sizeof(char)); // USING UINT8 because Poco::Data::MetaColumn does not have a single character type, just std::string }
void Binder::bind(std::size_t pos, const float& val, Direction dir, const WhenNullCb& nullCb) { poco_assert(dir == PD_IN); realBind(pos, Poco::Data::MetaColumn::FDT_FLOAT, &val, sizeof(float)); }
void Binder::bind(std::size_t pos, const float& val, Direction dir) { poco_assert(dir == PD_IN); realBind(pos, MYSQL_TYPE_FLOAT, &val, 0); }
void Binder::bind(std::size_t pos, const NullData&, Direction dir) { poco_assert(dir == PD_IN); realBind(pos, MYSQL_TYPE_NULL, 0, 0); }
void Binder::bind(std::size_t pos, const double& val, Direction dir) { poco_assert(dir == PD_IN); realBind(pos, MYSQL_TYPE_DOUBLE, &val, 0); }
void Binder::bind(std::size_t pos, const Poco::Int64& val, Direction dir) { poco_assert(dir == PD_IN); realBind(pos, MYSQL_TYPE_LONGLONG, &val, 0); }
void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir) { poco_assert(dir == PD_IN); realBind(pos, MYSQL_TYPE_LONG, &val, 0, true); }