namespace Keywords (!!! breaks existing code !!!)

Following keywords were moved from Poco:Data to Poco::Data::Keywords namespace

- now
- use
- bind
- into
- in
- out
- io
- from
- bulk
- null
- limit
- upperLimit
- lowerLimit
- range
This commit is contained in:
Aleksandar Fabijanic
2008-03-20 20:31:23 +00:00
parent 405e2e5cba
commit d2de70c58a
33 changed files with 286 additions and 145 deletions

View File

@@ -63,9 +63,15 @@ enum NullData
};
namespace Keywords {
static const NullData null = NULL_GENERIC;
} // namespace Keywords
class Data_API AbstractBinder
/// Interface for Binding data types to placeholders.
{

View File

@@ -722,6 +722,9 @@ private:
};
namespace Keywords {
template <typename T>
inline Binding<T>* use(T& t, const std::string& name = "")
/// Convenience function for a more compact Binding creation.
@@ -814,6 +817,9 @@ inline Binding<T>* bind(T t)
}
} // namespace Keywords
} } // namespace Poco::Data

View File

@@ -88,6 +88,9 @@ inline Poco::UInt32 Bulk::size() const
}
namespace Keywords {
template <typename T>
inline Bulk bulk(const T& limit)
/// Convenience function for creation of bulk.
@@ -103,6 +106,9 @@ inline void bulk(char)
}
} // namespace Keywords
typedef void (*BulkFnType)(char);

View File

@@ -110,6 +110,9 @@ private:
};
namespace Keywords {
template <typename T>
BulkBinding<std::vector<T> >* use(const std::vector<T>& t, BulkFnType, const std::string& name = "")
/// Convenience function for a more compact BulkBinding creation for std::vector.
@@ -158,6 +161,9 @@ BulkBinding<std::list<T> >* in(const std::list<T>& t, BulkFnType, const std::str
}
} // namespace Keywords
} } // namespace Poco::Data

View File

@@ -215,6 +215,9 @@ private:
};
namespace Keywords {
template <typename T>
BulkExtraction<std::vector<T> >* into(std::vector<T>& t, const Bulk& bulk, const Position& pos = Position(0))
/// Convenience function to allow for a more compact creation of an extraction object
@@ -275,6 +278,9 @@ BulkExtraction<std::list<T> >* into(std::list<T>& t, BulkFnType, const Position&
}
} // namespace Keywords
} } // namespace Poco::Data

View File

@@ -763,6 +763,9 @@ private:
};
namespace Keywords {
template <typename T>
inline Extraction<T>* into(T& t)
/// Convenience function to allow for a more compact creation of an extraction object.
@@ -802,6 +805,9 @@ inline AbstractExtractionVec& into(AbstractExtractionVec& ev)
}
} // namespace Keywords
} } // namespace Poco::Data

View File

@@ -77,6 +77,9 @@ inline Poco::UInt32 Position::value() const
}
namespace Keywords {
template <typename T>
inline Position from(const T& value)
/// Convenience function for creation of position.
@@ -85,6 +88,9 @@ inline Position from(const T& value)
}
} // namespace Keywords
} } // namespace Poco::Data

View File

@@ -85,6 +85,9 @@ inline const Limit& Range::upper() const
}
namespace Keywords {
template <typename T>
Limit limit(T lim, bool hard = false)
/// Creates an upperLimit
@@ -114,6 +117,9 @@ Range range(T low, T upp, bool hard = false)
}
} // namespace Keywords
} } // namespace Poco::Data

View File

@@ -438,6 +438,9 @@ private:
};
namespace Keywords {
//
// Manipulators
//
@@ -509,6 +512,9 @@ inline void Data_API reset(Statement& statement)
}
} // namespace Keywords
//
// inlines
//