示例#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));
}
示例#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));
}
示例#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));
}
示例#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()));
}
示例#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()));
}
示例#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);
}
示例#7
0
文件: Binder.cpp 项目: Blonder/poco
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);
}
示例#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);
}
示例#9
0
文件: Binder.cpp 项目: Kampbell/poco
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));
}
示例#10
0
文件: Binder.cpp 项目: Kampbell/poco
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);
}
示例#11
0
文件: Binder.cpp 项目: Kampbell/poco
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));
}
示例#12
0
文件: Binder.cpp 项目: Kampbell/poco
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()));
}
示例#13
0
文件: Binder.cpp 项目: Kampbell/poco
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
}
示例#14
0
文件: Binder.cpp 项目: Kampbell/poco
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));
}
示例#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);
}
示例#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);
}
示例#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);
}
示例#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);
}
示例#19
0
文件: Binder.cpp 项目: Blonder/poco
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);
}