This commit is contained in:
Aleksandar Fabijanic 2007-10-31 22:14:32 +00:00
parent dacc28ff55
commit 9a5a611cc1
7 changed files with 98 additions and 34 deletions

View File

@ -120,7 +120,7 @@ public:
/// Extracts a DateTime. Returns false if null was received.
virtual bool extract(std::size_t pos, Any& val) = 0;
/// Extracts a Any. Returns false if null was received.
/// Extracts an Any. Returns false if null was received.
virtual bool extract(std::size_t pos, DynamicAny& val) = 0;
/// Extracts a DynamicAny. Returns false if null was received.

View File

@ -90,6 +90,13 @@ 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)
{
}
#endif
void Binder::bind(std::size_t pos, const bool &val, Direction dir)
{
}

View File

@ -54,55 +54,60 @@ public:
~Binder();
/// Destroys the Binder.
void bind(std::size_t pos, const Poco::Int8 &val, Direction dir = PD_IN);
void bind(std::size_t pos, const Poco::Int8 &val, Direction dir);
/// Binds an Int8.
void bind(std::size_t pos, const Poco::UInt8 &val, Direction dir = PD_IN);
void bind(std::size_t pos, const Poco::UInt8 &val, Direction dir);
/// Binds an UInt8.
void bind(std::size_t pos, const Poco::Int16 &val, Direction dir = PD_IN);
void bind(std::size_t pos, const Poco::Int16 &val, Direction dir);
/// Binds an Int16.
void bind(std::size_t pos, const Poco::UInt16 &val, Direction dir = PD_IN);
void bind(std::size_t pos, const Poco::UInt16 &val, Direction dir);
/// Binds an UInt16.
void bind(std::size_t pos, const Poco::Int32 &val, Direction dir = PD_IN);
void bind(std::size_t pos, const Poco::Int32 &val, Direction dir);
/// Binds an Int32.
void bind(std::size_t pos, const Poco::UInt32 &val, Direction dir = PD_IN);
void bind(std::size_t pos, const Poco::UInt32 &val, Direction dir);
/// Binds an UInt32.
void bind(std::size_t pos, const Poco::Int64 &val, Direction dir = PD_IN);
void bind(std::size_t pos, const Poco::Int64 &val, Direction dir);
/// Binds an Int64.
void bind(std::size_t pos, const Poco::UInt64 &val, Direction dir = PD_IN);
void bind(std::size_t pos, const Poco::UInt64 &val, Direction dir);
/// Binds an UInt64.
void bind(std::size_t pos, const bool &val, Direction dir = PD_IN);
#ifndef POCO_LONG_IS_64_BIT
void bind(std::size_t pos, const long& val, Direction dir);
/// Binds a long.
#endif
void bind(std::size_t pos, const bool &val, Direction dir);
/// Binds a boolean.
void bind(std::size_t pos, const float &val, Direction dir = PD_IN);
void bind(std::size_t pos, const float &val, Direction dir);
/// Binds a float.
void bind(std::size_t pos, const double &val, Direction dir = PD_IN);
void bind(std::size_t pos, const double &val, Direction dir);
/// Binds a double.
void bind(std::size_t pos, const char &val, Direction dir = PD_IN);
void bind(std::size_t pos, const char &val, Direction dir);
/// Binds a single character.
void bind(std::size_t pos, const char* const &pVal, Direction dir = PD_IN);
void bind(std::size_t pos, const char* const &pVal, Direction dir);
/// Binds a const char ptr.
void bind(std::size_t pos, const std::string& val, Direction dir = PD_IN);
void bind(std::size_t pos, const std::string& val, Direction dir);
/// Binds a string.
void bind(std::size_t pos, const BLOB& val, Direction dir = PD_IN);
void bind(std::size_t pos, const BLOB& val, Direction dir);
/// Binds a BLOB.
void bind(std::size_t pos, const DateTime& val, Direction dir = PD_IN);
void bind(std::size_t pos, const DateTime& val, Direction dir);
/// Binds a DateTime.
void bind(std::size_t pos, const NullData& val, Direction dir = PD_IN);
void bind(std::size_t pos, const NullData& val, Direction dir);
/// Binds a DateTime.
void reset();

View File

@ -99,6 +99,15 @@ bool Extractor::extract(std::size_t pos, Poco::Int64& val)
}
#ifndef POCO_LONG_IS_64_BIT
bool Extractor::extract(std::size_t pos, long& val)
{
val = 0;
return true;
}
#endif
bool Extractor::extract(std::size_t pos, Poco::UInt64& val)
{
val = 0;
@ -152,4 +161,16 @@ bool Extractor::extract(std::size_t pos, Poco::DateTime& val)
}
bool Extractor::extract(std::size_t pos, Poco::Any& val)
{
return true;
}
bool Extractor::extract(std::size_t pos, Poco::DynamicAny& val)
{
return true;
}
} } } // namespace Poco::Data::Test

View File

@ -78,6 +78,17 @@ public:
bool extract(std::size_t pos, Poco::UInt64& val);
/// Extracts an UInt64.
bool extract(std::size_t pos, Poco::Any& val);
/// Extracts an Any.
bool extract(std::size_t pos, Poco::DynamicAny& val);
/// Extracts a DynamicAny.
#ifndef POCO_LONG_IS_64_BIT
bool extract(std::size_t pos, long& val);
/// Extracts a long.
#endif
bool extract(std::size_t pos, bool& val);
/// Extracts a boolean.

View File

@ -90,6 +90,13 @@ void Preparation::prepare(std::size_t pos, Poco::UInt64)
}
#ifndef POCO_LONG_IS_64_BIT
void Preparation::prepare(std::size_t pos, long)
{
}
#endif
void Preparation::prepare(std::size_t pos, bool)
{
}
@ -130,4 +137,9 @@ void Preparation::prepare(std::size_t pos, const Poco::Any&)
}
void Preparation::prepare(std::size_t pos, const Poco::DynamicAny&)
{
}
} } } // namespace Poco::Data::Test

View File

@ -56,52 +56,60 @@ public:
/// Destroys the Preparation.
void prepare(std::size_t pos, Poco::Int8);
/// Extracts an Int8.
/// Prepares an Int8.
void prepare(std::size_t pos, Poco::UInt8);
/// Extracts an UInt8.
/// Prepares an UInt8.
void prepare(std::size_t pos, Poco::Int16);
/// Extracts an Int16.
/// Prepares an Int16.
void prepare(std::size_t pos, Poco::UInt16);
/// Extracts an UInt16.
/// Prepares an UInt16.
void prepare(std::size_t pos, Poco::Int32);
/// Extracts an Int32.
/// Prepares an Int32.
void prepare(std::size_t pos, Poco::UInt32);
/// Extracts an UInt32.
/// Prepares an UInt32.
void prepare(std::size_t pos, Poco::Int64);
/// Extracts an Int64.
/// Prepares an Int64.
void prepare(std::size_t pos, Poco::UInt64);
/// Extracts an UInt64.
/// Prepares an UInt64.
#ifndef POCO_LONG_IS_64_BIT
void prepare(std::size_t pos, long);
/// Prepares a long.
#endif
void prepare(std::size_t pos, bool);
/// Extracts a boolean.
/// Prepares a boolean.
void prepare(std::size_t pos, float);
/// Extracts a float.
/// Prepares a float.
void prepare(std::size_t pos, double);
/// Extracts a double.
/// Prepares a double.
void prepare(std::size_t pos, char);
/// Extracts a single character.
/// Prepares a single character.
void prepare(std::size_t pos, const std::string&);
/// Extracts a string.
/// Prepares a string.
void prepare(std::size_t pos, const Poco::Data::BLOB&);
/// Extracts a BLOB.
/// Prepares a BLOB.
void prepare(std::size_t pos, const Poco::DateTime&);
/// Extracts a DateTime.
/// Prepares a DateTime.
void prepare(std::size_t pos, const Poco::Any&);
/// Extracts an Any.
/// Prepares an Any.
void prepare(std::size_t pos, const Poco::DynamicAny&);
/// Prepares a DynamicAny.
};