mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-07 11:24:30 +02:00
fixes for macos/clang
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX) -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -lmysqlclient
|
||||
SYSLIBS += -L/usr/local/lib -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX) -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -lmysqlclient
|
||||
INCLUDE += -I/usr/local/include/mysql/ -I/usr/include/mysql/ -I/usr/mysql/include/mysql -I/usr/local/mysql/include
|
||||
SYSFLAGS += -DTHREADSAFE -DNO_TCL
|
||||
|
||||
|
@@ -36,7 +36,7 @@ public:
|
||||
|
||||
Binder();
|
||||
/// Creates the Binder.
|
||||
|
||||
|
||||
virtual ~Binder();
|
||||
/// Destroys the Binder.
|
||||
|
||||
@@ -64,16 +64,12 @@ public:
|
||||
virtual void bind(std::size_t pos, const Poco::UInt64& val, Direction dir);
|
||||
/// Binds an UInt64.
|
||||
|
||||
#ifndef POCO_LONG_IS_64_BIT
|
||||
|
||||
virtual void bind(std::size_t pos, const long& val, Direction dir = PD_IN);
|
||||
/// Binds a long.
|
||||
|
||||
virtual void bind(std::size_t pos, const unsigned long& val, Direction dir = PD_IN);
|
||||
/// Binds an unsigned long.
|
||||
|
||||
#endif // POCO_LONG_IS_64_BIT
|
||||
|
||||
virtual void bind(std::size_t pos, const bool& val, Direction dir);
|
||||
/// Binds a boolean.
|
||||
|
||||
@@ -108,7 +104,7 @@ public:
|
||||
/// Binds a null.
|
||||
|
||||
|
||||
virtual void bind(std::size_t pos, const std::vector<Poco::Int8>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::vector<Poco::Int8>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::deque<Poco::Int8>& val, Direction dir = PD_IN);
|
||||
|
||||
@@ -136,25 +132,25 @@ public:
|
||||
|
||||
virtual void bind(std::size_t pos, const std::deque<Poco::Int32>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::list<Poco::Int32>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::list<Poco::Int32>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::vector<Poco::UInt32>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::vector<Poco::UInt32>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::deque<Poco::UInt32>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::list<Poco::UInt32>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::list<Poco::UInt32>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::vector<Poco::Int64>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::vector<Poco::Int64>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::deque<Poco::Int64>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::list<Poco::Int64>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::list<Poco::Int64>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::vector<Poco::UInt64>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::vector<Poco::UInt64>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::deque<Poco::UInt64>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::list<Poco::UInt64>& val, Direction dir = PD_IN);
|
||||
virtual void bind(std::size_t pos, const std::list<Poco::UInt64>& val, Direction dir = PD_IN);
|
||||
|
||||
virtual void bind(std::size_t pos, const std::vector<bool>& val, Direction dir = PD_IN);
|
||||
|
||||
@@ -236,12 +232,12 @@ private:
|
||||
/// Don't copy the binder
|
||||
|
||||
virtual void bind(std::size_t, const char* const&, Direction)
|
||||
/// Binds a const char ptr.
|
||||
/// Binds a const char ptr.
|
||||
/// This is a private no-op in this implementation
|
||||
/// due to security risk.
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void realBind(std::size_t pos, enum_field_types type, const void* buffer, int length, bool isUnsigned = false);
|
||||
/// Common bind implementation
|
||||
|
||||
|
@@ -50,42 +50,40 @@ public:
|
||||
|
||||
virtual bool extract(std::size_t pos, Poco::Int8& val);
|
||||
/// Extracts an Int8.
|
||||
|
||||
|
||||
virtual bool extract(std::size_t pos, Poco::UInt8& val);
|
||||
/// Extracts an UInt8.
|
||||
|
||||
|
||||
virtual bool extract(std::size_t pos, Poco::Int16& val);
|
||||
/// Extracts an Int16.
|
||||
|
||||
|
||||
virtual bool extract(std::size_t pos, Poco::UInt16& val);
|
||||
/// Extracts an UInt16.
|
||||
|
||||
|
||||
virtual bool extract(std::size_t pos, Poco::Int32& val);
|
||||
/// Extracts an Int32.
|
||||
|
||||
|
||||
virtual bool extract(std::size_t pos, Poco::UInt32& val);
|
||||
/// Extracts an UInt32.
|
||||
|
||||
|
||||
virtual bool extract(std::size_t pos, Poco::Int64& val);
|
||||
/// Extracts an Int64.
|
||||
|
||||
|
||||
virtual bool extract(std::size_t pos, Poco::UInt64& val);
|
||||
/// Extracts an UInt64.
|
||||
|
||||
#ifndef POCO_LONG_IS_64_BIT
|
||||
|
||||
virtual bool extract(std::size_t pos, long& val);
|
||||
/// Extracts a long. Returns false if null was received.
|
||||
|
||||
virtual bool extract(std::size_t pos, unsigned long& val);
|
||||
/// Extracts an unsigned long. Returns false if null was received.
|
||||
#endif
|
||||
|
||||
virtual bool extract(std::size_t pos, bool& val);
|
||||
/// Extracts a boolean.
|
||||
|
||||
|
||||
virtual bool extract(std::size_t pos, float& val);
|
||||
/// Extracts a float.
|
||||
|
||||
|
||||
virtual bool extract(std::size_t pos, double& val);
|
||||
/// Extracts a double.
|
||||
|
||||
@@ -125,7 +123,7 @@ public:
|
||||
////////////
|
||||
// Not implemented extract functions
|
||||
////////////
|
||||
|
||||
|
||||
virtual bool extract(std::size_t pos, std::vector<Poco::Int8>& val);
|
||||
/// Extracts an Int8 vector.
|
||||
|
||||
@@ -198,7 +196,6 @@ public:
|
||||
virtual bool extract(std::size_t pos, std::list<Poco::UInt64>& val);
|
||||
/// Extracts an UInt64 list.
|
||||
|
||||
#ifndef POCO_LONG_IS_64_BIT
|
||||
virtual bool extract(std::size_t pos, std::vector<long>& val);
|
||||
/// Extracts a long vector.
|
||||
|
||||
@@ -207,7 +204,6 @@ public:
|
||||
|
||||
virtual bool extract(std::size_t pos, std::list<long>& val);
|
||||
/// Extracts a long list.
|
||||
#endif
|
||||
|
||||
virtual bool extract(std::size_t pos, std::vector<bool>& val);
|
||||
/// Extracts a boolean vector.
|
||||
@@ -316,7 +312,7 @@ public:
|
||||
|
||||
virtual bool extract(std::size_t pos, std::list<Dynamic::Var>& val);
|
||||
/// Extracts a Dynamic::Var list.
|
||||
|
||||
|
||||
private:
|
||||
|
||||
bool realExtractFixed(std::size_t pos, enum_field_types type, void* buffer, bool isUnsigned = false);
|
||||
|
@@ -91,8 +91,6 @@ 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)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
@@ -106,8 +104,6 @@ void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir)
|
||||
realBind(pos, MYSQL_TYPE_LONG, &val, 0, true);
|
||||
}
|
||||
|
||||
#endif // POCO_LONG_IS_64_BIT
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const bool& val, Direction dir)
|
||||
{
|
||||
@@ -115,7 +111,7 @@ void Binder::bind(std::size_t pos, const bool& val, Direction dir)
|
||||
realBind(pos, MYSQL_TYPE_TINY, &val, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const float& val, Direction dir)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
@@ -268,7 +264,7 @@ MYSQL_BIND* Binder::getBindArray() const
|
||||
|
||||
///////////////////
|
||||
//
|
||||
// Private
|
||||
// Private
|
||||
//
|
||||
////////////////////
|
||||
|
||||
@@ -293,7 +289,7 @@ void Binder::realBind(std::size_t pos, enum_field_types type, const void* buffer
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int8>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int8>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -305,13 +301,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::Int8>& val, Direction
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int8>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int8>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt8>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt8>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -323,13 +319,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::UInt8>& val, Direction
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt8>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt8>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int16>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int16>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -341,13 +337,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::Int16>& val, Direction
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int16>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int16>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt16>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt16>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -359,13 +355,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::UInt16>& val, Directio
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt16>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt16>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int32>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int32>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -377,13 +373,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::Int32>& val, Direction
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int32>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int32>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt32>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt32>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -395,13 +391,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::UInt32>& val, Directio
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt32>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt32>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int64>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int64>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -413,13 +409,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::Int64>& val, Direction
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int64>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int64>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt64>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt64>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -431,13 +427,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::UInt64>& val, Directio
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt64>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt64>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<bool>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<bool>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -449,13 +445,13 @@ void Binder::bind(std::size_t pos, const std::deque<bool>& val, Direction dir)
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<bool>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<bool>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<float>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<float>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -467,13 +463,13 @@ void Binder::bind(std::size_t pos, const std::deque<float>& val, Direction dir)
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<float>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<float>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<double>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<double>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -485,13 +481,13 @@ void Binder::bind(std::size_t pos, const std::deque<double>& val, Direction dir)
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<double>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<double>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<char>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<char>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -503,13 +499,13 @@ void Binder::bind(std::size_t pos, const std::deque<char>& val, Direction dir)
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<char>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<char>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Data::BLOB>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Data::BLOB>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -521,13 +517,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::Data::BLOB>& val, Dire
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Data::BLOB>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Data::BLOB>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Data::CLOB>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Data::CLOB>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -539,13 +535,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::Data::CLOB>& val, Dire
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Data::CLOB>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Data::CLOB>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::DateTime>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::DateTime>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -557,13 +553,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::DateTime>& val, Direct
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::DateTime>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::DateTime>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Data::Date>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Data::Date>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -575,13 +571,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::Data::Date>& val, Dire
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Data::Date>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Data::Date>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Data::Time>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Data::Time>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -593,13 +589,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::Data::Time>& val, Dire
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Data::Time>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Data::Time>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -611,13 +607,13 @@ void Binder::bind(std::size_t pos, const std::deque<Poco::Data::NullData>& val,
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<std::string>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::vector<std::string>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
@@ -629,7 +625,7 @@ void Binder::bind(std::size_t pos, const std::deque<std::string>& val, Direction
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<std::string>& val, Direction dir)
|
||||
void Binder::bind(std::size_t pos, const std::list<std::string>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
@@ -80,7 +80,6 @@ bool Extractor::extract(std::size_t pos, Poco::UInt64& val)
|
||||
}
|
||||
|
||||
|
||||
#ifndef POCO_LONG_IS_64_BIT
|
||||
bool Extractor::extract(std::size_t pos, long& val)
|
||||
{
|
||||
return realExtractFixed(pos, MYSQL_TYPE_LONG, &val);
|
||||
@@ -91,7 +90,6 @@ bool Extractor::extract(std::size_t pos, unsigned long& val)
|
||||
{
|
||||
return realExtractFixed(pos, MYSQL_TYPE_LONG, &val, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, bool& val)
|
||||
@@ -105,32 +103,32 @@ bool Extractor::extract(std::size_t pos, float& val)
|
||||
return realExtractFixed(pos, MYSQL_TYPE_FLOAT, &val);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, double& val)
|
||||
{
|
||||
return realExtractFixed(pos, MYSQL_TYPE_DOUBLE, &val);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, char& val)
|
||||
{
|
||||
return realExtractFixed(pos, MYSQL_TYPE_TINY, &val);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, std::string& val)
|
||||
{
|
||||
if (_metadata.columnsReturned() <= pos)
|
||||
throw MySQLException("Extractor: attempt to extract more parameters, than query result contain");
|
||||
|
||||
|
||||
if (_metadata.isNull(static_cast<Poco::UInt32>(pos)))
|
||||
return false;
|
||||
|
||||
|
||||
//mysql reports TEXT types as FDT_BLOB when being extracted
|
||||
MetaColumn::ColumnDataType columnType = _metadata.metaColumn(static_cast<Poco::UInt32>(pos)).type();
|
||||
if (columnType != Poco::Data::MetaColumn::FDT_STRING && columnType != Poco::Data::MetaColumn::FDT_BLOB)
|
||||
throw MySQLException("Extractor: not a string");
|
||||
|
||||
|
||||
val.assign(reinterpret_cast<const char*>(_metadata.rawData(pos)), _metadata.length(pos));
|
||||
return true;
|
||||
}
|
||||
@@ -140,13 +138,13 @@ bool Extractor::extract(std::size_t pos, Poco::Data::BLOB& val)
|
||||
{
|
||||
if (_metadata.columnsReturned() <= pos)
|
||||
throw MySQLException("Extractor: attempt to extract more parameters, than query result contain");
|
||||
|
||||
|
||||
if (_metadata.isNull(static_cast<Poco::UInt32>(pos)))
|
||||
return false;
|
||||
|
||||
|
||||
if (_metadata.metaColumn(static_cast<Poco::UInt32>(pos)).type() != Poco::Data::MetaColumn::FDT_BLOB)
|
||||
throw MySQLException("Extractor: not a blob");
|
||||
|
||||
|
||||
val.assignRaw(_metadata.rawData(pos), _metadata.length(pos));
|
||||
return true;
|
||||
}
|
||||
@@ -156,13 +154,13 @@ bool Extractor::extract(std::size_t pos, Poco::Data::CLOB& val)
|
||||
{
|
||||
if (_metadata.columnsReturned() <= pos)
|
||||
throw MySQLException("Extractor: attempt to extract more parameters, than query result contain");
|
||||
|
||||
|
||||
if (_metadata.isNull(static_cast<Poco::UInt32>(pos)))
|
||||
return false;
|
||||
|
||||
|
||||
if (_metadata.metaColumn(static_cast<Poco::UInt32>(pos)).type() != Poco::Data::MetaColumn::FDT_BLOB)
|
||||
throw MySQLException("Extractor: not a blob");
|
||||
|
||||
|
||||
val.assignRaw(reinterpret_cast<const char*>(_metadata.rawData(pos)), _metadata.length(pos));
|
||||
return true;
|
||||
}
|
||||
@@ -244,7 +242,7 @@ bool Extractor::realExtractFixed(std::size_t pos, enum_field_types type, void* b
|
||||
bind.buffer_type = type;
|
||||
bind.buffer = buffer;
|
||||
bind.is_unsigned = isUnsigned;
|
||||
|
||||
|
||||
if (!_stmt.fetchColumn(pos, &bind))
|
||||
return false;
|
||||
|
||||
@@ -273,8 +271,8 @@ bool Extractor::extract(std::size_t , std::list<Poco::Int8>& )
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Poco::UInt8>& )
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
@@ -401,7 +399,6 @@ bool Extractor::extract(std::size_t , std::list<Poco::UInt64>& )
|
||||
}
|
||||
|
||||
|
||||
#ifndef POCO_LONG_IS_64_BIT
|
||||
bool Extractor::extract(std::size_t , std::vector<long>& )
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
@@ -418,7 +415,6 @@ bool Extractor::extract(std::size_t , std::list<long>& )
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<bool>& )
|
||||
|
@@ -9,7 +9,7 @@ include $(POCO_BASE)/build/rules/global
|
||||
INCLUDE += -I./../include -I/usr/local/include/mysql -I/usr/include/mysql/ -I/usr/mysql/include/mysql -I/usr/local/mysql/include
|
||||
|
||||
# Note: linking order is important, do not change it.
|
||||
SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX) -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -lmysqlclient -lz -lpthread -ldl
|
||||
SYSLIBS += -L/usr/local/lib -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX) -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -lmysqlclient -lz -lpthread -ldl
|
||||
|
||||
objects = MySQLTestSuite Driver MySQLTest SQLExecutor
|
||||
|
||||
|
@@ -42,11 +42,11 @@ Poco::SharedPtr<SQLExecutor> MySQLTest::_pExecutor = 0;
|
||||
|
||||
//
|
||||
// Parameters for barebone-test
|
||||
#define MYSQL_USER "root"
|
||||
#define MYSQL_PWD "poco"
|
||||
#define MYSQL_USER "pocotest"
|
||||
#define MYSQL_PWD "pocotest"
|
||||
#define MYSQL_HOST "127.0.0.1"
|
||||
#define MYSQL_PORT 3306
|
||||
#define MYSQL_DB "pocotestdb"
|
||||
#define MYSQL_DB "pocotest"
|
||||
|
||||
//
|
||||
// Connection string
|
||||
|
Reference in New Issue
Block a user