mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-16 07:23:44 +02:00
merge Data changes (ODBC Sybase, PostgreSQL etc)
This commit is contained in:
@@ -42,71 +42,71 @@ public:
|
||||
virtual ~Binder();
|
||||
/// Destroys the Binder.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::Int8& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Poco::Int8& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds an Int8.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::UInt8& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Poco::UInt8& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds an UInt8.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::Int16& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Poco::Int16& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds an Int16.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::UInt16& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Poco::UInt16& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds an UInt16.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::Int32& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Poco::Int32& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds an Int32.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::UInt32& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Poco::UInt32& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds an UInt32.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::Int64& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Poco::Int64& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds an Int64.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::UInt64& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Poco::UInt64& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds an UInt64.
|
||||
|
||||
#ifndef POCO_LONG_IS_64_BIT
|
||||
|
||||
virtual void bind(std::size_t pos, const long& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const long& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a long.
|
||||
|
||||
virtual void bind(std::size_t pos, const unsigned long& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const unsigned long& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds an unsigned long.
|
||||
|
||||
#endif // POCO_LONG_IS_64_BIT
|
||||
|
||||
virtual void bind(std::size_t pos, const bool& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const bool& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a boolean.
|
||||
|
||||
virtual void bind(std::size_t pos, const float& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const float& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a float.
|
||||
|
||||
virtual void bind(std::size_t pos, const double& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const double& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a double.
|
||||
|
||||
virtual void bind(std::size_t pos, const char& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const char& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a single character.
|
||||
|
||||
virtual void bind(std::size_t pos, const std::string& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const std::string& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a string.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::Data::BLOB& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Poco::Data::BLOB& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a BLOB.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::Data::CLOB& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Poco::Data::CLOB& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a CLOB.
|
||||
|
||||
virtual void bind(std::size_t pos, const DateTime& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const DateTime& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a DateTime.
|
||||
|
||||
virtual void bind(std::size_t pos, const Date& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Date& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a Date.
|
||||
|
||||
virtual void bind(std::size_t pos, const Time& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const Time& val, Direction dir, const WhenNullCb& nullCb);
|
||||
/// Binds a Time.
|
||||
|
||||
virtual void bind(std::size_t pos, const NullData& val, Direction dir);
|
||||
virtual void bind(std::size_t pos, const NullData& val, Direction dir, const std::type_info& bindType);
|
||||
/// Binds a null.
|
||||
|
||||
|
||||
@@ -212,11 +212,11 @@ public:
|
||||
|
||||
virtual void bind(std::size_t pos, const std::list<Time>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::vector<NullData>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::vector<NullData>& val, Direction dir, const std::type_info& bindType);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::deque<NullData>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::deque<NullData>& val, Direction dir, const std::type_info& bindType);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::list<NullData>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::list<NullData>& val, Direction dir, const std::type_info& bindType);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::vector<std::string>& val, Direction dir = PD_IN);
|
||||
|
||||
@@ -237,7 +237,7 @@ private:
|
||||
Binder(const Binder&);
|
||||
/// Don't copy the binder
|
||||
|
||||
virtual void bind(std::size_t, const char* const&, Direction)
|
||||
virtual void bind(std::size_t, const char* const&, Direction, const WhenNullCb& )
|
||||
/// Binds a const char ptr.
|
||||
/// This is a private no-op in this implementation
|
||||
/// due to security risk.
|
||||
|
@@ -54,7 +54,7 @@ protected:
|
||||
/// Returns the number of affected rows.
|
||||
/// Used to find out the number of rows affected by insert, delete or update.
|
||||
|
||||
virtual const MetaColumn& metaColumn(std::size_t pos) const;
|
||||
virtual const MetaColumn& metaColumn(std::size_t pos, std::size_t dataSet) const;
|
||||
/// Returns column meta data.
|
||||
|
||||
virtual bool hasNext();
|
||||
|
@@ -37,56 +37,56 @@ Binder::~Binder()
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::Int8& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Poco::Int8& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
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)
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt8& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_TINY, &val, 0, true);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::Int16& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Poco::Int16& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_SHORT, &val, 0);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt16& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt16& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_SHORT, &val, 0, true);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::Int32& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Poco::Int32& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_LONG, &val, 0);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt32& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt32& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_LONG, &val, 0, true);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::Int64& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Poco::Int64& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_LONGLONG, &val, 0);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt64& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt64& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_LONGLONG, &val, 0, true);
|
||||
@@ -95,14 +95,14 @@ void Binder::bind(std::size_t pos, const Poco::UInt64& val, Direction dir)
|
||||
|
||||
#ifndef POCO_LONG_IS_64_BIT
|
||||
|
||||
void Binder::bind(std::size_t pos, const long& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const long& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_LONG, &val, 0);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_LONG, &val, 0, true);
|
||||
@@ -111,56 +111,56 @@ void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir)
|
||||
#endif // POCO_LONG_IS_64_BIT
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const bool& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const bool& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_TINY, &val, 0);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const float& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const float& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_FLOAT, &val, 0);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const double& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const double& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_DOUBLE, &val, 0);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const char& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const char& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_TINY, &val, 0);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::string& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::string& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
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 Poco::Data::BLOB& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Poco::Data::BLOB& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
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 Poco::Data::CLOB& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Poco::Data::CLOB& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
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 DateTime& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const DateTime& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
MYSQL_TIME mt = {0};
|
||||
@@ -181,7 +181,7 @@ void Binder::bind(std::size_t pos, const DateTime& val, Direction dir)
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Date& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Date& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
MYSQL_TIME mt = {0};
|
||||
@@ -198,7 +198,7 @@ void Binder::bind(std::size_t pos, const Date& val, Direction dir)
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Time& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const Time& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
MYSQL_TIME mt = {0};
|
||||
@@ -215,7 +215,7 @@ void Binder::bind(std::size_t pos, const Time& val, Direction dir)
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const NullData&, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const NullData&, Direction dir, const std::type_info& bindType)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, MYSQL_TYPE_NULL, 0, 0);
|
||||
@@ -601,19 +601,19 @@ void Binder::bind(std::size_t pos, const std::list<Poco::Data::Time>& val, Direc
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Data::NullData>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Data::NullData>& val, Direction dir, const std::type_info& bindType)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::Data::NullData>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::Data::NullData>& val, Direction dir, const std::type_info& bindType)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Data::NullData>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Data::NullData>& val, Direction dir, const std::type_info& bindType)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
@@ -48,8 +48,10 @@ int MySQLStatementImpl::affectedRowCount() const
|
||||
}
|
||||
|
||||
|
||||
const MetaColumn& MySQLStatementImpl::metaColumn(std::size_t pos) const
|
||||
const MetaColumn& MySQLStatementImpl::metaColumn(std::size_t pos, std::size_t dataSet) const
|
||||
{
|
||||
// mysql doesn't support multiple result sets
|
||||
poco_assert_dbg(dataSet == 0);
|
||||
return _metadata.metaColumn(pos);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user