Skip to content

Commit

Permalink
Merge pull request #1 from pocoproject/develop
Browse files Browse the repository at this point in the history
Merging upstream to fork
  • Loading branch information
cristiantm committed Mar 6, 2014
2 parents 0ad18f3 + 9f3abcb commit 3600cb3
Show file tree
Hide file tree
Showing 41 changed files with 529 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ endif(APRUTIL_FOUND AND APACHE_FOUND)
#############################################################
# Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ
CONFIGURE_FILE(
"${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)

Expand Down
5 changes: 5 additions & 0 deletions Data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ if (NOT POCO_STATIC)
add_definitions(-DData_EXPORTS -DTHREADSAFE -DODBC_EXPORTS -DMySQL_EXPORTS -DSQLite_EXPORTS)
endif (NOT POCO_STATIC)

if(MSVC AND NOT(MSVC_VERSION LESS 1400))
set_source_files_properties(src/StatementImpl.cpp
PROPERTIES COMPILE_FLAGS "/bigobj")
endif()

add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
set_target_properties( ${LIBNAME}
PROPERTIES
Expand Down
16 changes: 8 additions & 8 deletions Data/doc/00200-DataUserManual.page
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ The following complete example shows how to use POCO Data:
#include <iostream>

using namespace Poco::Data::Keywords;
using Poco::Data:Session;
using Poco::Data:Statement;
using Poco::Data::Session;
using Poco::Data::Statement;

struct Person
{
Expand Down Expand Up @@ -849,20 +849,20 @@ No worries -- that's what the RecordSet class does:
std::cout << rs.columnName(col) << std::endl;

// iterate over all rows and columns
for (RecordSet::Iterator it = rset.begin(); it != rset.end(); ++it)
for (RecordSet::Iterator it = rs.begin(); it != rs.end(); ++it)
std::cout << *it << " ";
----

As you may see above, <[RecordSet]> class comes with a full-blown C++
compatible iterator that allows the above loop to be turned into a
one-liner:

std::copy(rset.begin(), rset.end(), std::ostream_iterator<Row>(std::cout));
std::copy(rs.begin(), rs.end(), std::ostream_iterator<Row>(std::cout));
----

RecordSet has the stream operator defined, so this shortcut to the above functionality will work, too:

std::cout << rset;
std::cout << rs;
----

The default formatter supplied with RecordSet is quite rudimentary, but
Expand Down Expand Up @@ -965,7 +965,7 @@ The template specialization must implement the following methods:
public:
static void bind(std::size_t pos, const Person&amp; obj, AbstractBinder::Ptr pBinder)
{
poco_assert_dbg (pBinder != 0);
poco_assert_dbg (!pBinder.isNull());
// the table is defined as Person (FirstName VARCHAR(30), lastName VARCHAR, SocialSecNr INTEGER(3))
// Note that we advance pos by the number of columns the datatype uses! For string/int this is one.
TypeHandler<std::string>::bind(pos++, obj.getFirstName(), pBinder);
Expand All @@ -980,7 +980,7 @@ The template specialization must implement the following methods:

static void prepare(std::size_t pos, const Person&amp; obj, AbstractPreparation::Ptr pPrepare)
{
poco_assert_dbg (pBinder != 0);
poco_assert_dbg (!pPrepare.isNull());
// the table is defined as Person (FirstName VARCHAR(30), lastName VARCHAR, SocialSecNr INTEGER(3))
// Note that we advance pos by the number of columns the datatype uses! For string/int this is one.
TypeHandler<std::string>::prepare(pos++, obj.getFirstName(), pPrepare);
Expand All @@ -991,7 +991,7 @@ The template specialization must implement the following methods:
static void extract(std::size_t pos, Person&amp; obj, const Person&amp; defVal, AbstractExtractor::Ptr pExt)
/// obj will contain the result, defVal contains values we should use when one column is NULL
{
poco_assert_dbg (pExt != 0);
poco_assert_dbg (!pExt.isNull());
std::string firstName;
std::string lastName;
Poco::UInt64 socialSecNr = 0;
Expand Down
4 changes: 2 additions & 2 deletions Data/include/Poco/Data/SessionPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Data_API SessionPool: public RefCountedObject
template <typename T>
Session get(const std::string& name, const T& value)
/// Returns a Session with requested property set.
/// The property can be diferent from the default pool
/// The property can be different from the default pool
/// value, in which case it is reset back to the pool
/// value when the session is reclaimed by the pool.
{
Expand All @@ -132,7 +132,7 @@ class Data_API SessionPool: public RefCountedObject

Session get(const std::string& name, bool value);
/// Returns a Session with requested feature set.
/// The feature can be diferent from the default pool
/// The feature can be different from the default pool
/// value, in which case it is reset back to the pool
/// value when the session is reclaimed by the pool.

Expand Down
4 changes: 4 additions & 0 deletions Foundation/Foundation_CE_vs90.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -1885,6 +1885,10 @@
RelativePath=".\include\Poco\MD5Engine.h"
>
</File>
<File
RelativePath=".\include\Poco\PBKDF2Engine.h"
>
</File>
<File
RelativePath=".\include\Poco\Random.h"
>
Expand Down
1 change: 1 addition & 0 deletions Foundation/Foundation_vs100.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,7 @@
<ClInclude Include="include\Poco\NumericString.h" />
<ClInclude Include="include\Poco\ObjectPool.h" />
<ClInclude Include="include\Poco\Optional.h" />
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
<ClInclude Include="include\Poco\Platform.h" />
<ClInclude Include="include\Poco\Platform_POSIX.h" />
<ClInclude Include="include\Poco\Platform_VMS.h" />
Expand Down
3 changes: 3 additions & 0 deletions Foundation/Foundation_vs100.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1889,6 +1889,9 @@
<ClInclude Include="include\poco\DirectoryIteratorStrategy.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\PBKDF2Engine.h">
<Filter>Crypt\Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="src\pocomsg.rc">
Expand Down
1 change: 1 addition & 0 deletions Foundation/Foundation_vs110.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,7 @@
<ClInclude Include="include\Poco\NumericString.h" />
<ClInclude Include="include\Poco\ObjectPool.h" />
<ClInclude Include="include\Poco\Optional.h" />
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
<ClInclude Include="include\Poco\Platform.h" />
<ClInclude Include="include\Poco\Platform_POSIX.h" />
<ClInclude Include="include\Poco\Platform_VMS.h" />
Expand Down
3 changes: 3 additions & 0 deletions Foundation/Foundation_vs110.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,9 @@
<ClInclude Include="include\Poco\Alignment.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\PBKDF2Engine.h">
<Filter>Crypt\Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="src\pocomsg.rc">
Expand Down
1 change: 1 addition & 0 deletions Foundation/Foundation_vs120.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,7 @@
<ClInclude Include="include\Poco\NumericString.h" />
<ClInclude Include="include\Poco\ObjectPool.h" />
<ClInclude Include="include\Poco\Optional.h" />
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
<ClInclude Include="include\Poco\Platform.h" />
<ClInclude Include="include\Poco\Platform_POSIX.h" />
<ClInclude Include="include\Poco\Platform_VMS.h" />
Expand Down
3 changes: 3 additions & 0 deletions Foundation/Foundation_vs71.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -1922,6 +1922,9 @@
<File
RelativePath=".\include\Poco\MD5Engine.h">
</File>
<File
RelativePath=".\include\Poco\PBKDF2Engine.h">
</File>
<File
RelativePath=".\include\Poco\Random.h">
</File>
Expand Down
4 changes: 4 additions & 0 deletions Foundation/Foundation_vs80.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -2463,6 +2463,10 @@
RelativePath=".\include\Poco\MD5Engine.h"
>
</File>
<File
RelativePath=".\include\Poco\PBKDF2Engine.h"
>
</File>
<File
RelativePath=".\include\Poco\Random.h"
>
Expand Down
4 changes: 4 additions & 0 deletions Foundation/Foundation_vs90.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -2456,6 +2456,10 @@
RelativePath=".\include\Poco\MD5Engine.h"
>
</File>
<File
RelativePath=".\include\Poco\PBKDF2Engine.h"
>
</File>
<File
RelativePath=".\include\Poco\Random.h"
>
Expand Down
1 change: 1 addition & 0 deletions Foundation/Foundation_x64_vs100.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,7 @@
<ClInclude Include="include\Poco\NumericString.h" />
<ClInclude Include="include\Poco\ObjectPool.h" />
<ClInclude Include="include\Poco\Optional.h" />
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
<ClInclude Include="include\Poco\Platform.h" />
<ClInclude Include="include\Poco\Platform_POSIX.h" />
<ClInclude Include="include\Poco\Platform_VMS.h" />
Expand Down
3 changes: 3 additions & 0 deletions Foundation/Foundation_x64_vs100.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1880,6 +1880,9 @@
<ClInclude Include="include\Poco\UTF32Encoding.h">
<Filter>Text\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\PBKDF2Engine.h">
<Filter>Crypt\Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="src\pocomsg.rc">
Expand Down
1 change: 1 addition & 0 deletions Foundation/Foundation_x64_vs110.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@
<ClInclude Include="include\Poco\NumericString.h" />
<ClInclude Include="include\Poco\ObjectPool.h" />
<ClInclude Include="include\Poco\Optional.h" />
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
<ClInclude Include="include\Poco\Platform.h" />
<ClInclude Include="include\Poco\Platform_POSIX.h" />
<ClInclude Include="include\Poco\Platform_VMS.h" />
Expand Down
3 changes: 3 additions & 0 deletions Foundation/Foundation_x64_vs110.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1880,6 +1880,9 @@
<ClInclude Include="include\Poco\UTF32Encoding.h">
<Filter>Text\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\PBKDF2Engine.h">
<Filter>Crypt\Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="src\pocomsg.rc">
Expand Down
1 change: 1 addition & 0 deletions Foundation/Foundation_x64_vs120.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@
<ClInclude Include="include\Poco\NumericString.h" />
<ClInclude Include="include\Poco\ObjectPool.h" />
<ClInclude Include="include\Poco\Optional.h" />
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
<ClInclude Include="include\Poco\Platform.h" />
<ClInclude Include="include\Poco\Platform_POSIX.h" />
<ClInclude Include="include\Poco\Platform_VMS.h" />
Expand Down
4 changes: 4 additions & 0 deletions Foundation/Foundation_x64_vs90.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -2458,6 +2458,10 @@
RelativePath=".\include\Poco\MD5Engine.h"
>
</File>
<File
RelativePath=".\include\Poco\PBKDF2Engine.h"
>
</File>
<File
RelativePath=".\include\Poco\Random.h"
>
Expand Down
Loading

0 comments on commit 3600cb3

Please sign in to comment.