Exemple #1
0
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));
}
Exemple #2
0
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));
}
Exemple #3
0
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));
}
Exemple #4
0
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()));
}
Exemple #5
0
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()));
}
Exemple #6
0
void Binder::bind(std::size_t pos, const char& val, Direction dir)
{
    poco_assert(dir == PD_IN);
    realBind(pos, MYSQL_TYPE_TINY, &val, 0);
}
Exemple #7
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);
}
Exemple #8
0
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);
}
Exemple #9
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));
}
Exemple #10
0
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);
}
Exemple #11
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));
}
Exemple #12
0
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()));
}
Exemple #13
0
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
}
Exemple #14
0
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));
}
Exemple #15
0
void Binder::bind(std::size_t pos, const float& val, Direction dir)
{
    poco_assert(dir == PD_IN);
    realBind(pos, MYSQL_TYPE_FLOAT, &val, 0);
}
Exemple #16
0
void Binder::bind(std::size_t pos, const NullData&, Direction dir)
{
    poco_assert(dir == PD_IN);
    realBind(pos, MYSQL_TYPE_NULL, 0, 0);
}
Exemple #17
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);
}
Exemple #18
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);
}
Exemple #19
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);
}