mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-17 15:14:48 +02:00
Merge branch 'develop' into pr/1113
Conflicts: Foundation/testsuite/TestSuite_vs120.vcxproj
This commit is contained in:
commit
3eb023132b
@ -25,6 +25,11 @@ before_install:
|
|||||||
services:
|
services:
|
||||||
- mongodb
|
- mongodb
|
||||||
- redis-server
|
- redis-server
|
||||||
|
- postgresql
|
||||||
|
|
||||||
|
addons:
|
||||||
|
postgresql: "9.3"
|
||||||
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
slack:
|
slack:
|
||||||
@ -50,7 +55,7 @@ matrix:
|
|||||||
- export CC="clang"
|
- export CC="clang"
|
||||||
- export CXX="clang++"
|
- export CXX="clang++"
|
||||||
- clang++ -x c++ /dev/null -dM -E
|
- clang++ -x c++ /dev/null -dM -E
|
||||||
- ./configure --everything --omit=Data/ODBC,Data/MySQL,Data/SQLite && make -s -j2
|
- ./configure --everything --omit=Data/ODBC,Data/MySQL,Data/SQLite,Data/PostgreSQL && make -s -j2
|
||||||
- sudo make install
|
- sudo make install
|
||||||
- ./travis/OSX/runtests.sh
|
- ./travis/OSX/runtests.sh
|
||||||
|
|
||||||
@ -145,7 +150,7 @@ matrix:
|
|||||||
# TODO osx build
|
# TODO osx build
|
||||||
# TODO run test suite
|
# TODO run test suite
|
||||||
# script:
|
# script:
|
||||||
# - ./configure && make -s -j2
|
# - ./configure && make -s -i -j2
|
||||||
# - sudo ifconfig -a
|
# - sudo ifconfig -a
|
||||||
# - sudo ifconfig venet0 multicast
|
# - sudo ifconfig venet0 multicast
|
||||||
# - sudo ifconfig -a
|
# - sudo ifconfig -a
|
||||||
|
@ -70,6 +70,7 @@ option(ENABLE_CRYPTO "Enable Crypto" ON)
|
|||||||
option(ENABLE_DATA "Enable Data" ON)
|
option(ENABLE_DATA "Enable Data" ON)
|
||||||
option(ENABLE_DATA_SQLITE "Enable Data SQlite" ON)
|
option(ENABLE_DATA_SQLITE "Enable Data SQlite" ON)
|
||||||
option(ENABLE_DATA_MYSQL "Enable Data MySQL" ON)
|
option(ENABLE_DATA_MYSQL "Enable Data MySQL" ON)
|
||||||
|
option(ENABLE_DATA_POSTGRESQL "Enable Data PosgreSQL" ON)
|
||||||
option(ENABLE_DATA_ODBC "Enable Data ODBC" ON)
|
option(ENABLE_DATA_ODBC "Enable Data ODBC" ON)
|
||||||
option(ENABLE_SEVENZIP "Enable SevenZip" OFF)
|
option(ENABLE_SEVENZIP "Enable SevenZip" OFF)
|
||||||
option(ENABLE_ZIP "Enable Zip" ON)
|
option(ENABLE_ZIP "Enable Zip" ON)
|
||||||
|
@ -48,12 +48,13 @@ Christopher Baker
|
|||||||
Scott Davis
|
Scott Davis
|
||||||
Jeff Adams
|
Jeff Adams
|
||||||
Martin Osborne
|
Martin Osborne
|
||||||
Björn Schramke
|
Björn Schramke
|
||||||
Jonathan Seeley
|
Jonathan Seeley
|
||||||
Tor Lillqvist
|
Tor Lillqvist
|
||||||
Alexander Bychuk
|
Alexander Bychuk
|
||||||
Francisco RamÃrez
|
Francisco Ramirez
|
||||||
Francis André
|
Francis André
|
||||||
Benoît Bleuzé
|
Benoît Bleuzé
|
||||||
|
Kostya Lutsenko
|
||||||
--
|
--
|
||||||
$Id$
|
$Id$
|
||||||
|
@ -130,6 +130,14 @@ public:
|
|||||||
/// Returns true if verification against the issuer certificate
|
/// Returns true if verification against the issuer certificate
|
||||||
/// was successful, false otherwise.
|
/// was successful, false otherwise.
|
||||||
|
|
||||||
|
bool equals(const X509Certificate& otherCertificate) const;
|
||||||
|
/// Checks whether the certificate is equal to
|
||||||
|
/// the other certificate, by comparing the hashes
|
||||||
|
/// of both certificates.
|
||||||
|
///
|
||||||
|
/// Returns true if both certificates are identical,
|
||||||
|
/// otherwise false.
|
||||||
|
|
||||||
const X509* certificate() const;
|
const X509* certificate() const;
|
||||||
/// Returns the underlying OpenSSL certificate.
|
/// Returns the underlying OpenSSL certificate.
|
||||||
|
|
||||||
|
@ -284,4 +284,12 @@ bool X509Certificate::issuedBy(const X509Certificate& issuerCertificate) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool X509Certificate::equals(const X509Certificate& otherCertificate) const
|
||||||
|
{
|
||||||
|
X509* pCert = const_cast<X509*>(_pCert);
|
||||||
|
X509* pOtherCert = const_cast<X509*>(otherCertificate.certificate());
|
||||||
|
return X509_cmp(pCert, pOtherCert) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } // namespace Poco::Crypto
|
} } // namespace Poco::Crypto
|
||||||
|
@ -304,6 +304,11 @@ void CryptoTest::testCertificate()
|
|||||||
|
|
||||||
// fails with recent OpenSSL versions:
|
// fails with recent OpenSSL versions:
|
||||||
// assert (cert.issuedBy(cert));
|
// assert (cert.issuedBy(cert));
|
||||||
|
|
||||||
|
std::istringstream otherCertStream(APPINF_PEM);
|
||||||
|
X509Certificate otherCert(otherCertStream);
|
||||||
|
|
||||||
|
assert (cert.equals(otherCert));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
#include "winres.h"
|
#include "winres.h"
|
||||||
|
|
||||||
#define POCO_VERSION 1,7,0,0
|
#define POCO_VERSION 2,0,0,0
|
||||||
#define POCO_VERSION_STR "1.7.0"
|
#define POCO_VERSION_STR "2.0.0"
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION POCO_VERSION
|
FILEVERSION POCO_VERSION
|
||||||
@ -28,7 +28,7 @@ BEGIN
|
|||||||
VALUE "FileDescription", "This file is part of the POCO C++ Libraries."
|
VALUE "FileDescription", "This file is part of the POCO C++ Libraries."
|
||||||
VALUE "FileVersion", POCO_VERSION_STR
|
VALUE "FileVersion", POCO_VERSION_STR
|
||||||
VALUE "InternalName", "POCO"
|
VALUE "InternalName", "POCO"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2004-2015, Applied Informatics Software Engineering GmbH and Contributors."
|
VALUE "LegalCopyright", "Copyright (C) 2004-2016, Applied Informatics Software Engineering GmbH and Contributors."
|
||||||
VALUE "ProductName", "POCO C++ Libraries - http://pocoproject.org"
|
VALUE "ProductName", "POCO C++ Libraries - http://pocoproject.org"
|
||||||
VALUE "ProductVersion", POCO_VERSION_STR
|
VALUE "ProductVersion", POCO_VERSION_STR
|
||||||
END
|
END
|
||||||
|
@ -55,6 +55,17 @@ if(ENABLE_DATA_MYSQL)
|
|||||||
endif(MYSQL_FOUND)
|
endif(MYSQL_FOUND)
|
||||||
endif(ENABLE_DATA_MYSQL)
|
endif(ENABLE_DATA_MYSQL)
|
||||||
|
|
||||||
|
if(ENABLE_DATA_POSTGRESQL)
|
||||||
|
find_package(PostgreSQL)
|
||||||
|
if(POSTGRESQL_FOUND)
|
||||||
|
include_directories("${POSTGRESQL_INCLUDE_DIR}")
|
||||||
|
message(STATUS "PostgreSQL Support Enabled")
|
||||||
|
add_subdirectory( PostgreSQL )
|
||||||
|
else()
|
||||||
|
message(STATUS "PostgreSQL Support Disabled - no PostgreSQL library")
|
||||||
|
endif(POSTGRESQL_FOUND)
|
||||||
|
endif(ENABLE_DATA_POSTGRESQL)
|
||||||
|
|
||||||
if(ENABLE_DATA_ODBC)
|
if(ENABLE_DATA_ODBC)
|
||||||
find_package(ODBC)
|
find_package(ODBC)
|
||||||
if(WIN32 AND NOT WINCE)
|
if(WIN32 AND NOT WINCE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="debug_shared|Win32">
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<RootNamespace>Data</RootNamespace>
|
<RootNamespace>Data</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@ -63,27 +63,27 @@
|
|||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings"/>
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros"/>
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoDatad</TargetName>
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoDatad</TargetName>
|
||||||
@ -125,17 +125,18 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;Data_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;Data_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<OutputFile>..\bin\PocoDatad.dll</OutputFile>
|
<OutputFile>..\bin\PocoDatad.dll</OutputFile>
|
||||||
@ -163,9 +164,9 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -186,18 +187,19 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<ProgramDataBaseFileName>..\lib\PocoDatamtd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\lib\PocoDatamtd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
<OutputFile>..\lib\PocoDatamtd.lib</OutputFile>
|
<OutputFile>..\lib\PocoDatamtd.lib</OutputFile>
|
||||||
@ -218,9 +220,9 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
@ -233,18 +235,19 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<ProgramDataBaseFileName>..\lib\PocoDatamdd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\lib\PocoDatamdd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
<OutputFile>..\lib\PocoDatamdd.lib</OutputFile>
|
<OutputFile>..\lib\PocoDatamdd.lib</OutputFile>
|
||||||
@ -265,10 +268,10 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<ProgramDataBaseFileName>..\lib\PocoDatamd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\lib\PocoDatamd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
@ -365,6 +368,6 @@
|
|||||||
<ClCompile Include="src\Time.cpp"/>
|
<ClCompile Include="src\Time.cpp"/>
|
||||||
<ClCompile Include="src\Transaction.cpp"/>
|
<ClCompile Include="src\Transaction.cpp"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets"/>
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="debug_shared|x64">
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<RootNamespace>Data</RootNamespace>
|
<RootNamespace>Data</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@ -63,27 +63,27 @@
|
|||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings"/>
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros"/>
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoData64d</TargetName>
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoData64d</TargetName>
|
||||||
@ -125,18 +125,19 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;Data_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;Data_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<OutputFile>..\bin64\PocoData64d.dll</OutputFile>
|
<OutputFile>..\bin64\PocoData64d.dll</OutputFile>
|
||||||
@ -164,11 +165,12 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<OutputFile>..\bin64\PocoData64.dll</OutputFile>
|
<OutputFile>..\bin64\PocoData64.dll</OutputFile>
|
||||||
@ -188,19 +190,20 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<ProgramDataBaseFileName>..\lib64\PocoDatamtd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\lib64\PocoDatamtd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
<OutputFile>..\lib64\PocoDatamtd.lib</OutputFile>
|
<OutputFile>..\lib64\PocoDatamtd.lib</OutputFile>
|
||||||
@ -221,11 +224,12 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
<OutputFile>..\lib64\PocoDatamt.lib</OutputFile>
|
<OutputFile>..\lib64\PocoDatamt.lib</OutputFile>
|
||||||
@ -237,19 +241,20 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<ProgramDataBaseFileName>..\lib64\PocoDatamdd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\lib64\PocoDatamdd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
<OutputFile>..\lib64\PocoDatamdd.lib</OutputFile>
|
<OutputFile>..\lib64\PocoDatamdd.lib</OutputFile>
|
||||||
@ -270,11 +275,12 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
<OutputFile>..\lib64\PocoDatamd.lib</OutputFile>
|
<OutputFile>..\lib64\PocoDatamd.lib</OutputFile>
|
||||||
@ -370,6 +376,6 @@
|
|||||||
<ClCompile Include="src\Time.cpp"/>
|
<ClCompile Include="src\Time.cpp"/>
|
||||||
<ClCompile Include="src\Transaction.cpp"/>
|
<ClCompile Include="src\Transaction.cpp"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets"/>
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -42,71 +42,71 @@ public:
|
|||||||
virtual ~Binder();
|
virtual ~Binder();
|
||||||
/// Destroys the 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// Binds an UInt64.
|
||||||
|
|
||||||
#ifndef POCO_LONG_IS_64_BIT
|
#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.
|
/// 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.
|
/// Binds an unsigned long.
|
||||||
|
|
||||||
#endif // POCO_LONG_IS_64_BIT
|
#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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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.
|
/// 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::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);
|
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&);
|
Binder(const Binder&);
|
||||||
/// Don't copy the 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.
|
/// Binds a const char ptr.
|
||||||
/// This is a private no-op in this implementation
|
/// This is a private no-op in this implementation
|
||||||
/// due to security risk.
|
/// due to security risk.
|
||||||
|
@ -54,7 +54,7 @@ protected:
|
|||||||
/// Returns the number of affected rows.
|
/// Returns the number of affected rows.
|
||||||
/// Used to find out the number of rows affected by insert, delete or update.
|
/// 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.
|
/// Returns column meta data.
|
||||||
|
|
||||||
virtual bool hasNext();
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_TINY, &val, 0);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_TINY, &val, 0, true);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_SHORT, &val, 0);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_SHORT, &val, 0, true);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_LONG, &val, 0);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_LONG, &val, 0, true);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_LONGLONG, &val, 0);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_LONGLONG, &val, 0, true);
|
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
|
#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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_LONG, &val, 0);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_LONG, &val, 0, true);
|
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
|
#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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_TINY, &val, 0);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_FLOAT, &val, 0);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_DOUBLE, &val, 0);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_TINY, &val, 0);
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_STRING, val.c_str(), static_cast<int>(val.length()));
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_BLOB, val.rawContent(), static_cast<int>(val.size()));
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_BLOB, val.rawContent(), static_cast<int>(val.size()));
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
MYSQL_TIME mt = {0};
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
MYSQL_TIME mt = {0};
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
MYSQL_TIME mt = {0};
|
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);
|
poco_assert(dir == PD_IN);
|
||||||
realBind(pos, MYSQL_TYPE_NULL, 0, 0);
|
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();
|
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();
|
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();
|
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);
|
return _metadata.metaColumn(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,8 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
@ -188,7 +189,8 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
@ -235,7 +237,8 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="debug_shared|x64">
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<RootNamespace>ODBC</RootNamespace>
|
<RootNamespace>ODBC</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@ -63,27 +63,27 @@
|
|||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings"/>
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros"/>
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoDataODBC64d</TargetName>
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoDataODBC64d</TargetName>
|
||||||
@ -125,17 +125,18 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -164,10 +165,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -188,18 +190,19 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<ProgramDataBaseFileName>..\..\lib64\PocoDataODBCmtd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\..\lib64\PocoDataODBCmtd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
<OutputFile>..\..\lib64\PocoDataODBCmtd.lib</OutputFile>
|
<OutputFile>..\..\lib64\PocoDataODBCmtd.lib</OutputFile>
|
||||||
@ -220,10 +223,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
<OutputFile>..\..\lib64\PocoDataODBCmt.lib</OutputFile>
|
<OutputFile>..\..\lib64\PocoDataODBCmt.lib</OutputFile>
|
||||||
@ -235,18 +239,19 @@
|
|||||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<ProgramDataBaseFileName>..\..\lib64\PocoDataODBCmdd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\..\lib64\PocoDataODBCmdd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
<OutputFile>..\..\lib64\PocoDataODBCmdd.lib</OutputFile>
|
<OutputFile>..\..\lib64\PocoDataODBCmdd.lib</OutputFile>
|
||||||
@ -267,51 +272,52 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
<OutputFile>..\..\lib64\PocoDataODBCmd.lib</OutputFile>
|
<OutputFile>..\..\lib64\PocoDataODBCmd.lib</OutputFile>
|
||||||
</Lib>
|
</Lib>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Binder.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Binder.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\ConnectionHandle.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\ConnectionHandle.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Connector.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Connector.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Diagnostics.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Diagnostics.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\EnvironmentHandle.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\EnvironmentHandle.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Error.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Error.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Extractor.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Extractor.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Handle.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Handle.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\ODBC.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\ODBC.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCException.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\ODBCException.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCMetaColumn.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\ODBCMetaColumn.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCStatementImpl.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\ODBCStatementImpl.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Parameter.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Parameter.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Preparator.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Preparator.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\SessionImpl.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\SessionImpl.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\TypeInfo.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\TypeInfo.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Unicode.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_UNIXODBC.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Unicode_UNIXODBC.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_WIN32.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Unicode_WIN32.h" />
|
||||||
<ClInclude Include="include\Poco\Data\ODBC\Utility.h"/>
|
<ClInclude Include="include\Poco\Data\ODBC\Utility.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\Binder.cpp"/>
|
<ClCompile Include="src\Binder.cpp" />
|
||||||
<ClCompile Include="src\ConnectionHandle.cpp"/>
|
<ClCompile Include="src\ConnectionHandle.cpp" />
|
||||||
<ClCompile Include="src\Connector.cpp"/>
|
<ClCompile Include="src\Connector.cpp" />
|
||||||
<ClCompile Include="src\EnvironmentHandle.cpp"/>
|
<ClCompile Include="src\EnvironmentHandle.cpp" />
|
||||||
<ClCompile Include="src\Extractor.cpp"/>
|
<ClCompile Include="src\Extractor.cpp" />
|
||||||
<ClCompile Include="src\ODBCException.cpp"/>
|
<ClCompile Include="src\ODBCException.cpp" />
|
||||||
<ClCompile Include="src\ODBCMetaColumn.cpp"/>
|
<ClCompile Include="src\ODBCMetaColumn.cpp" />
|
||||||
<ClCompile Include="src\ODBCStatementImpl.cpp"/>
|
<ClCompile Include="src\ODBCStatementImpl.cpp" />
|
||||||
<ClCompile Include="src\Parameter.cpp"/>
|
<ClCompile Include="src\Parameter.cpp" />
|
||||||
<ClCompile Include="src\Preparator.cpp"/>
|
<ClCompile Include="src\Preparator.cpp" />
|
||||||
<ClCompile Include="src\SessionImpl.cpp"/>
|
<ClCompile Include="src\SessionImpl.cpp" />
|
||||||
<ClCompile Include="src\TypeInfo.cpp"/>
|
<ClCompile Include="src\TypeInfo.cpp" />
|
||||||
<ClCompile Include="src\Unicode.cpp"/>
|
<ClCompile Include="src\Unicode.cpp" />
|
||||||
<ClCompile Include="src\Unicode_UNIXODBC.cpp">
|
<ClCompile Include="src\Unicode_UNIXODBC.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||||
@ -328,8 +334,8 @@
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\Utility.cpp"/>
|
<ClCompile Include="src\Utility.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets"/>
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -58,12 +58,28 @@ namespace ODBC {
|
|||||||
class ODBC_API Binder: public Poco::Data::AbstractBinder
|
class ODBC_API Binder: public Poco::Data::AbstractBinder
|
||||||
/// Binds placeholders in the sql query to the provided values. Performs data types mapping.
|
/// Binds placeholders in the sql query to the provided values. Performs data types mapping.
|
||||||
{
|
{
|
||||||
|
|
||||||
|
struct ParamDescriptor
|
||||||
|
{
|
||||||
|
ParamDescriptor() : colSize(0), cDataType(0), decDigits(-1)
|
||||||
|
{}
|
||||||
|
|
||||||
|
ParamDescriptor(SQLINTEGER colSize_, SQLSMALLINT cDataType_, SQLSMALLINT decDigits_) : colSize(colSize_), cDataType(cDataType_), decDigits(decDigits_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
bool defined() const { return cDataType != 0; }
|
||||||
|
SQLINTEGER colSize;
|
||||||
|
SQLSMALLINT cDataType;
|
||||||
|
SQLSMALLINT decDigits;
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef AbstractBinder::Direction Direction;
|
typedef AbstractBinder::Direction Direction;
|
||||||
typedef std::map<SQLPOINTER, SQLLEN> ParamMap;
|
typedef std::map<SQLPOINTER, SQLLEN> ParamMap;
|
||||||
|
|
||||||
static const size_t DEFAULT_PARAM_SIZE = 1024;
|
static const size_t DEFAULT_PARAM_SIZE = 1024;
|
||||||
|
|
||||||
|
|
||||||
enum ParameterBinding
|
enum ParameterBinding
|
||||||
{
|
{
|
||||||
PB_IMMEDIATE,
|
PB_IMMEDIATE,
|
||||||
@ -72,14 +88,16 @@ public:
|
|||||||
|
|
||||||
Binder(const StatementHandle& rStmt,
|
Binder(const StatementHandle& rStmt,
|
||||||
std::size_t maxFieldSize,
|
std::size_t maxFieldSize,
|
||||||
ParameterBinding dataBinding = PB_IMMEDIATE,
|
ParameterBinding dataBinding,
|
||||||
TypeInfo* pDataTypes = 0);
|
TypeInfo* pDataTypes,
|
||||||
|
ODBCMetaColumn::NumericConversion numericConversion,
|
||||||
|
bool insertOnly);
|
||||||
/// Creates the Binder.
|
/// Creates the Binder.
|
||||||
|
|
||||||
~Binder();
|
~Binder();
|
||||||
/// Destroys the Binder.
|
/// Destroys the Binder.
|
||||||
|
|
||||||
void bind(std::size_t pos, const Poco::Int8& val, Direction dir);
|
void bind(std::size_t pos, const Poco::Int8& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds an Int8.
|
/// Binds an Int8.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<Poco::Int8>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<Poco::Int8>& val, Direction dir);
|
||||||
@ -91,7 +109,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<Poco::Int8>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<Poco::Int8>& val, Direction dir);
|
||||||
/// Binds an Int8 list.
|
/// Binds an Int8 list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const Poco::UInt8& val, Direction dir);
|
void bind(std::size_t pos, const Poco::UInt8& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds an UInt8.
|
/// Binds an UInt8.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<Poco::UInt8>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<Poco::UInt8>& val, Direction dir);
|
||||||
@ -103,7 +121,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<Poco::UInt8>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<Poco::UInt8>& val, Direction dir);
|
||||||
/// Binds an UInt8 list.
|
/// Binds an UInt8 list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const Poco::Int16& val, Direction dir);
|
void bind(std::size_t pos, const Poco::Int16& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds an Int16.
|
/// Binds an Int16.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<Poco::Int16>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<Poco::Int16>& val, Direction dir);
|
||||||
@ -115,7 +133,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<Poco::Int16>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<Poco::Int16>& val, Direction dir);
|
||||||
/// Binds an Int16 list.
|
/// Binds an Int16 list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const Poco::UInt16& val, Direction dir);
|
void bind(std::size_t pos, const Poco::UInt16& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds an UInt16.
|
/// Binds an UInt16.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<Poco::UInt16>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<Poco::UInt16>& val, Direction dir);
|
||||||
@ -127,7 +145,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<Poco::UInt16>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<Poco::UInt16>& val, Direction dir);
|
||||||
/// Binds an UInt16 list.
|
/// Binds an UInt16 list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const Poco::Int32& val, Direction dir);
|
void bind(std::size_t pos, const Poco::Int32& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds an Int32.
|
/// Binds an Int32.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<Poco::Int32>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<Poco::Int32>& val, Direction dir);
|
||||||
@ -139,7 +157,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<Poco::Int32>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<Poco::Int32>& val, Direction dir);
|
||||||
/// Binds an Int32 list.
|
/// Binds an Int32 list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const Poco::UInt32& val, Direction dir);
|
void bind(std::size_t pos, const Poco::UInt32& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds an UInt32.
|
/// Binds an UInt32.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<Poco::UInt32>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<Poco::UInt32>& val, Direction dir);
|
||||||
@ -151,7 +169,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<Poco::UInt32>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<Poco::UInt32>& val, Direction dir);
|
||||||
/// Binds an UInt32 list.
|
/// Binds an UInt32 list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const Poco::Int64& val, Direction dir);
|
void bind(std::size_t pos, const Poco::Int64& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds an Int64.
|
/// Binds an Int64.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<Poco::Int64>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<Poco::Int64>& val, Direction dir);
|
||||||
@ -163,7 +181,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<Poco::Int64>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<Poco::Int64>& val, Direction dir);
|
||||||
/// Binds an Int64 list.
|
/// Binds an Int64 list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const Poco::UInt64& val, Direction dir);
|
void bind(std::size_t pos, const Poco::UInt64& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds an UInt64.
|
/// Binds an UInt64.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<Poco::UInt64>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<Poco::UInt64>& val, Direction dir);
|
||||||
@ -176,10 +194,10 @@ public:
|
|||||||
/// Binds an UInt64 list.
|
/// Binds an UInt64 list.
|
||||||
|
|
||||||
#ifndef POCO_LONG_IS_64_BIT
|
#ifndef POCO_LONG_IS_64_BIT
|
||||||
void bind(std::size_t pos, const long& val, Direction dir);
|
void bind(std::size_t pos, const long& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a long.
|
/// Binds a long.
|
||||||
|
|
||||||
void bind(std::size_t pos, const unsigned long& val, Direction dir);
|
void bind(std::size_t pos, const unsigned long& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds an unsigned long.
|
/// Binds an unsigned long.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<long>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<long>& val, Direction dir);
|
||||||
@ -192,7 +210,7 @@ public:
|
|||||||
/// Binds a long list.
|
/// Binds a long list.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void bind(std::size_t pos, const bool& val, Direction dir);
|
void bind(std::size_t pos, const bool& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a boolean.
|
/// Binds a boolean.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<bool>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<bool>& val, Direction dir);
|
||||||
@ -204,7 +222,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<bool>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<bool>& val, Direction dir);
|
||||||
/// Binds a boolean list.
|
/// Binds a boolean list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const float& val, Direction dir);
|
void bind(std::size_t pos, const float& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a float.
|
/// Binds a float.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<float>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<float>& val, Direction dir);
|
||||||
@ -216,7 +234,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<float>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<float>& val, Direction dir);
|
||||||
/// Binds a float list.
|
/// Binds a float list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const double& val, Direction dir);
|
void bind(std::size_t pos, const double& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a double.
|
/// Binds a double.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<double>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<double>& val, Direction dir);
|
||||||
@ -228,7 +246,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<double>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<double>& val, Direction dir);
|
||||||
/// Binds a double list.
|
/// Binds a double list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const char& val, Direction dir);
|
void bind(std::size_t pos, const char& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a single character.
|
/// Binds a single character.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<char>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<char>& val, Direction dir);
|
||||||
@ -240,7 +258,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<char>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<char>& val, Direction dir);
|
||||||
/// Binds a character list.
|
/// Binds a character list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::string& val, Direction dir);
|
void bind(std::size_t pos, const std::string& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a string.
|
/// Binds a string.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<std::string>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<std::string>& val, Direction dir);
|
||||||
@ -252,7 +270,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<std::string>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<std::string>& val, Direction dir);
|
||||||
/// Binds a string list.
|
/// Binds a string list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const UTF16String& val, Direction dir);
|
void bind(std::size_t pos, const UTF16String& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a string.
|
/// Binds a string.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<UTF16String>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<UTF16String>& val, Direction dir);
|
||||||
@ -264,10 +282,10 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<UTF16String>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<UTF16String>& val, Direction dir);
|
||||||
/// Binds a string list.
|
/// Binds a string list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const BLOB& val, Direction dir);
|
void bind(std::size_t pos, const BLOB& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a BLOB. In-bound only.
|
/// Binds a BLOB. In-bound only.
|
||||||
|
|
||||||
void bind(std::size_t pos, const CLOB& val, Direction dir);
|
void bind(std::size_t pos, const CLOB& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a CLOB. In-bound only.
|
/// Binds a CLOB. In-bound only.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<BLOB>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<BLOB>& val, Direction dir);
|
||||||
@ -288,7 +306,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<CLOB>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<CLOB>& val, Direction dir);
|
||||||
/// Binds a CLOB list.
|
/// Binds a CLOB list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const Date& val, Direction dir);
|
void bind(std::size_t pos, const Date& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a Date.
|
/// Binds a Date.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<Date>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<Date>& val, Direction dir);
|
||||||
@ -300,7 +318,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<Date>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<Date>& val, Direction dir);
|
||||||
/// Binds a Date list.
|
/// Binds a Date list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const Time& val, Direction dir);
|
void bind(std::size_t pos, const Time& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a Time.
|
/// Binds a Time.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<Time>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<Time>& val, Direction dir);
|
||||||
@ -312,7 +330,7 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<Time>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<Time>& val, Direction dir);
|
||||||
/// Binds a Time list.
|
/// Binds a Time list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const DateTime& val, Direction dir);
|
void bind(std::size_t pos, const DateTime& val, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a DateTime.
|
/// Binds a DateTime.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<DateTime>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<DateTime>& val, Direction dir);
|
||||||
@ -324,16 +342,16 @@ public:
|
|||||||
void bind(std::size_t pos, const std::list<DateTime>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<DateTime>& val, Direction dir);
|
||||||
/// Binds a DateTime list.
|
/// Binds a DateTime list.
|
||||||
|
|
||||||
void bind(std::size_t pos, const NullData& val, Direction dir);
|
void bind(std::size_t pos, const NullData& val, Direction dir, const std::type_info& bindType);
|
||||||
/// Binds a null. In-bound only.
|
/// Binds a null. In-bound only.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::vector<NullData>& val, Direction dir);
|
void bind(std::size_t pos, const std::vector<NullData>& val, Direction dir, const std::type_info& bindType);
|
||||||
/// Binds a null vector.
|
/// Binds a null vector.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::deque<NullData>& val, Direction dir);
|
void bind(std::size_t pos, const std::deque<NullData>& val, Direction dir, const std::type_info& bindType);
|
||||||
/// Binds a null deque.
|
/// Binds a null deque.
|
||||||
|
|
||||||
void bind(std::size_t pos, const std::list<NullData>& val, Direction dir);
|
void bind(std::size_t pos, const std::list<NullData>& val, Direction dir, const std::type_info& bindType);
|
||||||
/// Binds a null list.
|
/// Binds a null list.
|
||||||
|
|
||||||
void setDataBinding(ParameterBinding binding);
|
void setDataBinding(ParameterBinding binding);
|
||||||
@ -353,6 +371,7 @@ public:
|
|||||||
/// Clears the cached storage.
|
/// Clears the cached storage.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
typedef std::vector<ParamDescriptor> ParameterInfoVec;
|
||||||
typedef std::vector<SQLLEN*> LengthPtrVec;
|
typedef std::vector<SQLLEN*> LengthPtrVec;
|
||||||
typedef std::vector<SQLLEN> LengthVec;
|
typedef std::vector<SQLLEN> LengthVec;
|
||||||
typedef std::vector<LengthVec*> LengthVecVec;
|
typedef std::vector<LengthVec*> LengthVecVec;
|
||||||
@ -365,18 +384,19 @@ private:
|
|||||||
typedef std::vector<TimeVec*> TimeVecVec;
|
typedef std::vector<TimeVec*> TimeVecVec;
|
||||||
typedef std::vector<SQL_TIMESTAMP_STRUCT> DateTimeVec;
|
typedef std::vector<SQL_TIMESTAMP_STRUCT> DateTimeVec;
|
||||||
typedef std::vector<DateTimeVec*> DateTimeVecVec;
|
typedef std::vector<DateTimeVec*> DateTimeVecVec;
|
||||||
typedef std::vector<Poco::Any> AnyVec;
|
typedef std::vector<Poco::Any*> AnyPtrVec;
|
||||||
typedef std::vector<AnyVec> AnyVecVec;
|
typedef std::vector<AnyPtrVec> AnyPtrVecVec;
|
||||||
typedef std::map<char*, std::string*> StringMap;
|
typedef std::map<char*, std::string*> StringMap;
|
||||||
typedef std::map<UTF16String::value_type*, UTF16String*> UTF16StringMap;
|
typedef std::map<UTF16String::value_type*, UTF16String*> UTF16StringMap;
|
||||||
typedef std::map<SQL_DATE_STRUCT*, Date*> DateMap;
|
typedef std::map<SQL_DATE_STRUCT*, Date*> DateMap;
|
||||||
typedef std::map<SQL_TIME_STRUCT*, Time*> TimeMap;
|
typedef std::map<SQL_TIME_STRUCT*, Time*> TimeMap;
|
||||||
typedef std::map<SQL_TIMESTAMP_STRUCT*, DateTime*> TimestampMap;
|
typedef std::map<SQL_TIMESTAMP_STRUCT*, DateTime*> TimestampMap;
|
||||||
|
typedef std::map<SQLLEN*, WhenNullCb> NullCbMap;
|
||||||
|
|
||||||
void describeParameter(std::size_t pos);
|
void describeParameter(std::size_t pos);
|
||||||
/// Sets the description field for the parameter, if needed.
|
/// Sets the description field for the parameter, if needed.
|
||||||
|
|
||||||
void bind(std::size_t pos, const char* const& pVal, Direction dir);
|
void bind(std::size_t pos, const char* const& pVal, Direction dir, const WhenNullCb& nullCb);
|
||||||
/// Binds a const char ptr.
|
/// Binds a const char ptr.
|
||||||
/// This is a private no-op in this implementation
|
/// This is a private no-op in this implementation
|
||||||
/// due to security risk.
|
/// due to security risk.
|
||||||
@ -386,13 +406,19 @@ private:
|
|||||||
/// specified by user.
|
/// specified by user.
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void bindImpl(std::size_t pos, T& val, SQLSMALLINT cDataType, Direction dir)
|
void bindImpl(std::size_t pos, T& val, SQLSMALLINT cDataType, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
SQLINTEGER colSize = 0;
|
SQLINTEGER colSize = 0;
|
||||||
SQLSMALLINT decDigits = 0;
|
SQLSMALLINT decDigits = 0;
|
||||||
getColSizeAndPrecision(pos, cDataType, colSize, decDigits);
|
getColSizeAndPrecision(pos, cDataType, colSize, decDigits);
|
||||||
|
SQLLEN* pLenIn = NULL;
|
||||||
_lengthIndicator.push_back(0);
|
if (isOutBound(dir) && nullCb.defined())
|
||||||
|
{
|
||||||
|
pLenIn = new SQLLEN;
|
||||||
|
*pLenIn = SQL_NTS; // microsoft example does that, otherwise no null indicator is returned
|
||||||
|
_nullCbMap.insert(NullCbMap::value_type(pLenIn, nullCb));
|
||||||
|
}
|
||||||
|
_lengthIndicator.push_back(pLenIn);
|
||||||
|
|
||||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||||
(SQLUSMALLINT) pos + 1,
|
(SQLUSMALLINT) pos + 1,
|
||||||
@ -401,14 +427,15 @@ private:
|
|||||||
Utility::sqlDataType(cDataType),
|
Utility::sqlDataType(cDataType),
|
||||||
colSize,
|
colSize,
|
||||||
decDigits,
|
decDigits,
|
||||||
(SQLPOINTER) &val, 0, 0)))
|
(SQLPOINTER)&val, 0,
|
||||||
|
_lengthIndicator.back())))
|
||||||
{
|
{
|
||||||
throw StatementException(_rStmt, "SQLBindParameter()");
|
throw StatementException(_rStmt, "SQLBindParameter()");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename L>
|
template <typename L>
|
||||||
void bindImplLOB(std::size_t pos, const L& val, Direction dir)
|
void bindImplLOB(std::size_t pos, const L& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
if (isOutBound(dir) || !isInBound(dir))
|
if (isOutBound(dir) || !isInBound(dir))
|
||||||
throw NotImplementedException("LOB parameter type can only be inbound.");
|
throw NotImplementedException("LOB parameter type can only be inbound.");
|
||||||
@ -424,13 +451,17 @@ private:
|
|||||||
if (PB_AT_EXEC == _paramBinding)
|
if (PB_AT_EXEC == _paramBinding)
|
||||||
*pLenIn = SQL_LEN_DATA_AT_EXEC(size);
|
*pLenIn = SQL_LEN_DATA_AT_EXEC(size);
|
||||||
|
|
||||||
|
if (isOutBound(dir) && nullCb.defined())
|
||||||
|
_nullCbMap.insert(NullCbMap::value_type(pLenIn, nullCb));
|
||||||
|
|
||||||
_lengthIndicator.push_back(pLenIn);
|
_lengthIndicator.push_back(pLenIn);
|
||||||
|
SQLSMALLINT sqlType = (isInBound(dir) && size <= _maxVarBinColSize) ? SQL_VARBINARY : SQL_LONGVARBINARY;
|
||||||
|
|
||||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||||
(SQLUSMALLINT) pos + 1,
|
(SQLUSMALLINT) pos + 1,
|
||||||
SQL_PARAM_INPUT,
|
SQL_PARAM_INPUT,
|
||||||
SQL_C_BINARY,
|
SQL_C_BINARY,
|
||||||
SQL_LONGVARBINARY,
|
sqlType,
|
||||||
(SQLUINTEGER) size,
|
(SQLUINTEGER) size,
|
||||||
0,
|
0,
|
||||||
pVal,
|
pVal,
|
||||||
@ -485,9 +516,9 @@ private:
|
|||||||
if (_containers.size() <= pos)
|
if (_containers.size() <= pos)
|
||||||
_containers.resize(pos + 1);
|
_containers.resize(pos + 1);
|
||||||
|
|
||||||
_containers[pos].push_back(std::vector<Type>());
|
_containers[pos].push_back( new Any(std::vector<Type>()) );
|
||||||
|
|
||||||
std::vector<Type>& cont = RefAnyCast<std::vector<Type> >(_containers[pos].back());
|
std::vector<Type>& cont = RefAnyCast<std::vector<Type> >( *_containers[pos].back() );
|
||||||
cont.assign(val.begin(), val.end());
|
cont.assign(val.begin(), val.end());
|
||||||
bindImplVec(pos, cont, cDataType, dir);
|
bindImplVec(pos, cont, cDataType, dir);
|
||||||
}
|
}
|
||||||
@ -586,12 +617,13 @@ private:
|
|||||||
std::memcpy(_charPtrs[pos] + offset, it->c_str(), strSize);
|
std::memcpy(_charPtrs[pos] + offset, it->c_str(), strSize);
|
||||||
offset += size;
|
offset += size;
|
||||||
}
|
}
|
||||||
|
SQLSMALLINT sqlType = (isInBound(dir) && size < _maxCharColLength) ? SQL_VARCHAR : SQL_LONGVARCHAR;
|
||||||
|
|
||||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||||
(SQLUSMALLINT) pos + 1,
|
(SQLUSMALLINT) pos + 1,
|
||||||
toODBCDirection(dir),
|
toODBCDirection(dir),
|
||||||
SQL_C_CHAR,
|
SQL_C_CHAR,
|
||||||
SQL_LONGVARCHAR,
|
sqlType,
|
||||||
(SQLUINTEGER) size - 1,
|
(SQLUINTEGER) size - 1,
|
||||||
0,
|
0,
|
||||||
_charPtrs[pos],
|
_charPtrs[pos],
|
||||||
@ -652,12 +684,12 @@ private:
|
|||||||
std::memcpy(_utf16CharPtrs[pos] + offset, it->data(), strSize);
|
std::memcpy(_utf16CharPtrs[pos] + offset, it->data(), strSize);
|
||||||
offset += (size / sizeof(UTF16Char));
|
offset += (size / sizeof(UTF16Char));
|
||||||
}
|
}
|
||||||
|
SQLSMALLINT sqlType = (isInBound(dir) && size < _maxWCharColLength) ? SQL_WVARCHAR : SQL_WLONGVARCHAR;
|
||||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||||
(SQLUSMALLINT)pos + 1,
|
(SQLUSMALLINT)pos + 1,
|
||||||
toODBCDirection(dir),
|
toODBCDirection(dir),
|
||||||
SQL_C_WCHAR,
|
SQL_C_WCHAR,
|
||||||
SQL_WLONGVARCHAR,
|
sqlType,
|
||||||
(SQLUINTEGER)size - 1,
|
(SQLUINTEGER)size - 1,
|
||||||
0,
|
0,
|
||||||
_utf16CharPtrs[pos],
|
_utf16CharPtrs[pos],
|
||||||
@ -722,12 +754,13 @@ private:
|
|||||||
std::memcpy(_charPtrs[pos] + offset, cIt->rawContent(), blobSize * sizeof(CharType));
|
std::memcpy(_charPtrs[pos] + offset, cIt->rawContent(), blobSize * sizeof(CharType));
|
||||||
offset += size;
|
offset += size;
|
||||||
}
|
}
|
||||||
|
SQLSMALLINT sqlType = (isInBound(dir) && size <= _maxVarBinColSize) ? SQL_VARBINARY : SQL_LONGVARBINARY;
|
||||||
|
|
||||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||||
(SQLUSMALLINT) pos + 1,
|
(SQLUSMALLINT) pos + 1,
|
||||||
SQL_PARAM_INPUT,
|
SQL_PARAM_INPUT,
|
||||||
SQL_C_BINARY,
|
SQL_C_BINARY,
|
||||||
SQL_LONGVARBINARY,
|
sqlType,
|
||||||
(SQLUINTEGER) size,
|
(SQLUINTEGER) size,
|
||||||
0,
|
0,
|
||||||
_charPtrs[pos],
|
_charPtrs[pos],
|
||||||
@ -754,8 +787,6 @@ private:
|
|||||||
|
|
||||||
setParamSetSize(length);
|
setParamSetSize(length);
|
||||||
|
|
||||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_DATE_STRUCT);
|
|
||||||
|
|
||||||
if (_vecLengthIndicator.size() <= pos)
|
if (_vecLengthIndicator.size() <= pos)
|
||||||
{
|
{
|
||||||
_vecLengthIndicator.resize(pos + 1, 0);
|
_vecLengthIndicator.resize(pos + 1, 0);
|
||||||
@ -804,8 +835,6 @@ private:
|
|||||||
|
|
||||||
setParamSetSize(val.size());
|
setParamSetSize(val.size());
|
||||||
|
|
||||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIME_STRUCT);
|
|
||||||
|
|
||||||
if (_vecLengthIndicator.size() <= pos)
|
if (_vecLengthIndicator.size() <= pos)
|
||||||
{
|
{
|
||||||
_vecLengthIndicator.resize(pos + 1, 0);
|
_vecLengthIndicator.resize(pos + 1, 0);
|
||||||
@ -855,8 +884,6 @@ private:
|
|||||||
|
|
||||||
setParamSetSize(length);
|
setParamSetSize(length);
|
||||||
|
|
||||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIMESTAMP_STRUCT);
|
|
||||||
|
|
||||||
if (_vecLengthIndicator.size() <= pos)
|
if (_vecLengthIndicator.size() <= pos)
|
||||||
{
|
{
|
||||||
_vecLengthIndicator.resize(pos + 1, 0);
|
_vecLengthIndicator.resize(pos + 1, 0);
|
||||||
@ -891,7 +918,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename C>
|
template<typename C>
|
||||||
void bindImplNullContainer(std::size_t pos, const C& val, Direction dir)
|
void bindImplNullContainer(std::size_t pos, const C& val, Direction dir, const std::type_info& bindElemType)
|
||||||
{
|
{
|
||||||
if (isOutBound(dir) || !isInBound(dir))
|
if (isOutBound(dir) || !isInBound(dir))
|
||||||
throw NotImplementedException("Null container parameter type can only be inbound.");
|
throw NotImplementedException("Null container parameter type can only be inbound.");
|
||||||
@ -906,8 +933,6 @@ private:
|
|||||||
|
|
||||||
setParamSetSize(length);
|
setParamSetSize(length);
|
||||||
|
|
||||||
SQLINTEGER size = SQL_NULL_DATA;
|
|
||||||
|
|
||||||
if (_vecLengthIndicator.size() <= pos)
|
if (_vecLengthIndicator.size() <= pos)
|
||||||
{
|
{
|
||||||
_vecLengthIndicator.resize(pos + 1, 0);
|
_vecLengthIndicator.resize(pos + 1, 0);
|
||||||
@ -916,13 +941,14 @@ private:
|
|||||||
|
|
||||||
SQLINTEGER colSize = 0;
|
SQLINTEGER colSize = 0;
|
||||||
SQLSMALLINT decDigits = 0;
|
SQLSMALLINT decDigits = 0;
|
||||||
getColSizeAndPrecision(pos, SQL_C_STINYINT, colSize, decDigits);
|
SQLSMALLINT colType = _pTypeInfo->tryTypeidToCType(bindElemType, SQL_C_STINYINT);
|
||||||
|
getColSizeAndPrecision(pos, colType, colSize, decDigits);
|
||||||
|
|
||||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||||
(SQLUSMALLINT) pos + 1,
|
(SQLUSMALLINT) pos + 1,
|
||||||
SQL_PARAM_INPUT,
|
SQL_PARAM_INPUT,
|
||||||
SQL_C_STINYINT,
|
colType,
|
||||||
Utility::sqlDataType(SQL_C_STINYINT),
|
Utility::sqlDataType(colType),
|
||||||
colSize,
|
colSize,
|
||||||
decDigits,
|
decDigits,
|
||||||
0,
|
0,
|
||||||
@ -957,6 +983,7 @@ private:
|
|||||||
void freeMemory();
|
void freeMemory();
|
||||||
/// Frees all dynamically allocated memory resources.
|
/// Frees all dynamically allocated memory resources.
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void getMinValueSize(T& val, SQLINTEGER& size)
|
void getMinValueSize(T& val, SQLINTEGER& size)
|
||||||
/// Some ODBC drivers return DB-wide maximum allowed size for variable size columns,
|
/// Some ODBC drivers return DB-wide maximum allowed size for variable size columns,
|
||||||
@ -995,6 +1022,7 @@ private:
|
|||||||
ParamMap _inParams;
|
ParamMap _inParams;
|
||||||
ParamMap _outParams;
|
ParamMap _outParams;
|
||||||
ParameterBinding _paramBinding;
|
ParameterBinding _paramBinding;
|
||||||
|
ParameterInfoVec _parameters;
|
||||||
|
|
||||||
DateMap _dates;
|
DateMap _dates;
|
||||||
TimeMap _times;
|
TimeMap _times;
|
||||||
@ -1011,16 +1039,22 @@ private:
|
|||||||
const TypeInfo* _pTypeInfo;
|
const TypeInfo* _pTypeInfo;
|
||||||
SQLINTEGER _paramSetSize;
|
SQLINTEGER _paramSetSize;
|
||||||
std::size_t _maxFieldSize;
|
std::size_t _maxFieldSize;
|
||||||
AnyVecVec _containers;
|
AnyPtrVecVec _containers;
|
||||||
|
std::size_t _maxCharColLength;
|
||||||
|
std::size_t _maxWCharColLength;
|
||||||
|
std::size_t _maxVarBinColSize;
|
||||||
|
ODBCMetaColumn::NumericConversion _numericConversion;
|
||||||
|
NullCbMap _nullCbMap;
|
||||||
|
bool _insertOnly;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// inlines
|
// inlines
|
||||||
//
|
//
|
||||||
inline void Binder::bind(std::size_t pos, const Poco::Int8& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const Poco::Int8& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_STINYINT, dir);
|
bindImpl(pos, val, SQL_C_STINYINT, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1042,9 +1076,9 @@ inline void Binder::bind(std::size_t pos, const std::list<Poco::Int8>& val, Dire
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const Poco::UInt8& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const Poco::UInt8& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_UTINYINT, dir);
|
bindImpl(pos, val, SQL_C_UTINYINT, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1066,9 +1100,9 @@ inline void Binder::bind(std::size_t pos, const std::list<Poco::UInt8>& val, Dir
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const Poco::Int16& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const Poco::Int16& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_SSHORT, dir);
|
bindImpl(pos, val, SQL_C_SSHORT, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1090,9 +1124,9 @@ inline void Binder::bind(std::size_t pos, const std::list<Poco::Int16>& val, Dir
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const Poco::UInt16& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const Poco::UInt16& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_USHORT, dir);
|
bindImpl(pos, val, SQL_C_USHORT, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1114,9 +1148,9 @@ inline void Binder::bind(std::size_t pos, const std::list<Poco::UInt16>& val, Di
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const Poco::Int32& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const Poco::Int32& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_SLONG, dir);
|
bindImpl(pos, val, SQL_C_SLONG, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1138,9 +1172,9 @@ inline void Binder::bind(std::size_t pos, const std::list<Poco::Int32>& val, Dir
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const Poco::UInt32& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const Poco::UInt32& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_ULONG, dir);
|
bindImpl(pos, val, SQL_C_ULONG, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1162,9 +1196,9 @@ inline void Binder::bind(std::size_t pos, const std::list<Poco::UInt32>& val, Di
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const Poco::Int64& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const Poco::Int64& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_SBIGINT, dir);
|
bindImpl(pos, val, SQL_C_SBIGINT, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1186,9 +1220,9 @@ inline void Binder::bind(std::size_t pos, const std::list<Poco::Int64>& val, Dir
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const Poco::UInt64& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const Poco::UInt64& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_UBIGINT, dir);
|
bindImpl(pos, val, SQL_C_UBIGINT, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1211,15 +1245,15 @@ inline void Binder::bind(std::size_t pos, const std::list<Poco::UInt64>& val, Di
|
|||||||
|
|
||||||
|
|
||||||
#ifndef POCO_LONG_IS_64_BIT
|
#ifndef POCO_LONG_IS_64_BIT
|
||||||
inline void Binder::bind(std::size_t pos, const long& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const long& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_SLONG, dir);
|
bindImpl(pos, val, SQL_C_SLONG, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_SLONG, dir);
|
bindImpl(pos, val, SQL_C_SLONG, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1242,9 +1276,9 @@ inline void Binder::bind(std::size_t pos, const std::list<long>& val, Direction
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const float& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const float& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_FLOAT, dir);
|
bindImpl(pos, val, SQL_C_FLOAT, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1266,9 +1300,9 @@ inline void Binder::bind(std::size_t pos, const std::list<float>& val, Direction
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const double& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const double& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_DOUBLE, dir);
|
bindImpl(pos, val, SQL_C_DOUBLE, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1290,9 +1324,9 @@ inline void Binder::bind(std::size_t pos, const std::list<double>& val, Directio
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const bool& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const bool& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_BIT, dir);
|
bindImpl(pos, val, SQL_C_BIT, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1314,9 +1348,9 @@ inline void Binder::bind(std::size_t pos, const std::list<bool>& val, Direction
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const char& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const char& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImpl(pos, val, SQL_C_STINYINT, dir);
|
bindImpl(pos, val, SQL_C_STINYINT, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1373,15 +1407,15 @@ inline void Binder::bind(std::size_t pos, const std::list<UTF16String>& val, Dir
|
|||||||
bindImplContainerUTF16String(pos, val, dir);
|
bindImplContainerUTF16String(pos, val, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const BLOB& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const BLOB& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImplLOB<BLOB>(pos, val, dir);
|
bindImplLOB<BLOB>(pos, val, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const CLOB& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const CLOB& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
bindImplLOB<CLOB>(pos, val, dir);
|
bindImplLOB<CLOB>(pos, val, dir, nullCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1475,21 +1509,21 @@ inline void Binder::bind(std::size_t pos, const std::list<DateTime>& val, Direct
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const std::vector<NullData>& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const std::vector<NullData>& val, Direction dir, const std::type_info& bindElemType)
|
||||||
{
|
{
|
||||||
bindImplNullContainer(pos, val, dir);
|
bindImplNullContainer(pos, val, dir, bindElemType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const std::deque<NullData>& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const std::deque<NullData>& val, Direction dir, const std::type_info& bindElemType)
|
||||||
{
|
{
|
||||||
bindImplNullContainer(pos, val, dir);
|
bindImplNullContainer(pos, val, dir, bindElemType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Binder::bind(std::size_t pos, const std::list<NullData>& val, Direction dir)
|
inline void Binder::bind(std::size_t pos, const std::list<NullData>& val, Direction dir, const std::type_info& bindElemType)
|
||||||
{
|
{
|
||||||
bindImplNullContainer(pos, val, dir);
|
bindImplNullContainer(pos, val, dir, bindElemType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#ifndef Data_ODBC_ConnectionHandle_INCLUDED
|
#ifndef Data_ODBC_ConnectionHandle_INCLUDED
|
||||||
#define Data_ODBC_ConnectionHandle_INCLUDED
|
#define Data_ODBC_ConnectionHandle_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Poco/Data/ODBC/ODBC.h"
|
#include "Poco/Data/ODBC/ODBC.h"
|
||||||
#include "Poco/Data/ODBC/EnvironmentHandle.h"
|
#include "Poco/Data/ODBC/EnvironmentHandle.h"
|
||||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||||
@ -49,6 +48,9 @@ public:
|
|||||||
const SQLHDBC& handle() const;
|
const SQLHDBC& handle() const;
|
||||||
/// Returns const reference to handle;
|
/// Returns const reference to handle;
|
||||||
|
|
||||||
|
operator bool() const;
|
||||||
|
/// Returns true if the handle is valid
|
||||||
|
|
||||||
private:
|
private:
|
||||||
operator SQLHDBC& ();
|
operator SQLHDBC& ();
|
||||||
/// Conversion operator into reference to native type.
|
/// Conversion operator into reference to native type.
|
||||||
@ -59,9 +61,8 @@ private:
|
|||||||
ConnectionHandle(const ConnectionHandle&);
|
ConnectionHandle(const ConnectionHandle&);
|
||||||
const ConnectionHandle& operator=(const ConnectionHandle&);
|
const ConnectionHandle& operator=(const ConnectionHandle&);
|
||||||
|
|
||||||
const EnvironmentHandle* _pEnvironment;
|
const EnvironmentHandle _environment;
|
||||||
SQLHDBC _hdbc;
|
SQLHDBC _hdbc;
|
||||||
bool _ownsEnvironment;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -92,6 +93,11 @@ inline SQLHDBC& ConnectionHandle::handle()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline ConnectionHandle::operator bool () const
|
||||||
|
{
|
||||||
|
return _hdbc != SQL_NULL_HDBC;
|
||||||
|
}
|
||||||
|
|
||||||
} } } // namespace Poco::Data::ODBC
|
} } } // namespace Poco::Data::ODBC
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,12 +59,12 @@ public:
|
|||||||
typedef std::vector<DiagnosticFields> FieldVec;
|
typedef std::vector<DiagnosticFields> FieldVec;
|
||||||
typedef typename FieldVec::const_iterator Iterator;
|
typedef typename FieldVec::const_iterator Iterator;
|
||||||
|
|
||||||
explicit Diagnostics(const H& handle): _handle(handle)
|
explicit Diagnostics(const H& handle)
|
||||||
/// Creates and initializes the Diagnostics.
|
/// Creates and initializes the Diagnostics.
|
||||||
{
|
{
|
||||||
std::memset(_connectionName, 0, sizeof(_connectionName));
|
std::memset(_connectionName, 0, sizeof(_connectionName));
|
||||||
std::memset(_serverName, 0, sizeof(_serverName));
|
std::memset(_serverName, 0, sizeof(_serverName));
|
||||||
diagnostics();
|
diagnostics(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
~Diagnostics()
|
~Diagnostics()
|
||||||
@ -138,7 +138,7 @@ public:
|
|||||||
return _fields.end();
|
return _fields.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
const Diagnostics& diagnostics()
|
const Diagnostics& diagnostics(const H& handle)
|
||||||
{
|
{
|
||||||
DiagnosticFields df;
|
DiagnosticFields df;
|
||||||
SQLSMALLINT count = 1;
|
SQLSMALLINT count = 1;
|
||||||
@ -149,7 +149,7 @@ public:
|
|||||||
reset();
|
reset();
|
||||||
|
|
||||||
while (!Utility::isError(SQLGetDiagRec(handleType,
|
while (!Utility::isError(SQLGetDiagRec(handleType,
|
||||||
_handle,
|
handle,
|
||||||
count,
|
count,
|
||||||
df._sqlState,
|
df._sqlState,
|
||||||
&df._nativeError,
|
&df._nativeError,
|
||||||
@ -163,7 +163,7 @@ public:
|
|||||||
// (they fail if connection has not been established yet
|
// (they fail if connection has not been established yet
|
||||||
// or return empty string if not applicable for the context)
|
// or return empty string if not applicable for the context)
|
||||||
if (Utility::isError(SQLGetDiagField(handleType,
|
if (Utility::isError(SQLGetDiagField(handleType,
|
||||||
_handle,
|
handle,
|
||||||
count,
|
count,
|
||||||
SQL_DIAG_CONNECTION_NAME,
|
SQL_DIAG_CONNECTION_NAME,
|
||||||
_connectionName,
|
_connectionName,
|
||||||
@ -182,7 +182,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Utility::isError(SQLGetDiagField(handleType,
|
if (Utility::isError(SQLGetDiagField(handleType,
|
||||||
_handle,
|
handle,
|
||||||
count,
|
count,
|
||||||
SQL_DIAG_SERVER_NAME,
|
SQL_DIAG_SERVER_NAME,
|
||||||
_serverName,
|
_serverName,
|
||||||
@ -223,9 +223,6 @@ private:
|
|||||||
|
|
||||||
/// Diagnostics container
|
/// Diagnostics container
|
||||||
FieldVec _fields;
|
FieldVec _fields;
|
||||||
|
|
||||||
/// Context handle
|
|
||||||
const H& _handle;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,6 +39,9 @@ public:
|
|||||||
EnvironmentHandle();
|
EnvironmentHandle();
|
||||||
/// Creates the EnvironmentHandle.
|
/// Creates the EnvironmentHandle.
|
||||||
|
|
||||||
|
explicit EnvironmentHandle(const SQLHENV* henv);
|
||||||
|
/// Creates the EnvironmentHandle which doesn't own the handle
|
||||||
|
|
||||||
~EnvironmentHandle();
|
~EnvironmentHandle();
|
||||||
/// Destroys the EnvironmentHandle.
|
/// Destroys the EnvironmentHandle.
|
||||||
|
|
||||||
@ -52,8 +55,7 @@ private:
|
|||||||
operator SQLHENV& ();
|
operator SQLHENV& ();
|
||||||
/// Conversion operator into reference to native type.
|
/// Conversion operator into reference to native type.
|
||||||
|
|
||||||
SQLHENV& handle();
|
void init();
|
||||||
/// Returns reference to handle.
|
|
||||||
|
|
||||||
EnvironmentHandle(const EnvironmentHandle&);
|
EnvironmentHandle(const EnvironmentHandle&);
|
||||||
const EnvironmentHandle& operator=(const EnvironmentHandle&);
|
const EnvironmentHandle& operator=(const EnvironmentHandle&);
|
||||||
@ -79,12 +81,6 @@ inline const SQLHENV& EnvironmentHandle::handle() const
|
|||||||
|
|
||||||
|
|
||||||
inline EnvironmentHandle::operator SQLHENV& ()
|
inline EnvironmentHandle::operator SQLHENV& ()
|
||||||
{
|
|
||||||
return handle();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline SQLHENV& EnvironmentHandle::handle()
|
|
||||||
{
|
{
|
||||||
return _henv;
|
return _henv;
|
||||||
}
|
}
|
||||||
|
@ -491,6 +491,9 @@ private:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
bool extractManualLOBImpl(std::size_t pos, Poco::Data::LOB<T>& val, SQLSMALLINT cType);
|
||||||
|
|
||||||
template <typename T, typename NT>
|
template <typename T, typename NT>
|
||||||
bool extAny(std::size_t pos, T& val)
|
bool extAny(std::size_t pos, T& val)
|
||||||
{
|
{
|
||||||
@ -511,7 +514,7 @@ private:
|
|||||||
bool extractImpl(std::size_t pos, T& val)
|
bool extractImpl(std::size_t pos, T& val)
|
||||||
/// Utility function for extraction of Any and DynamicAny.
|
/// Utility function for extraction of Any and DynamicAny.
|
||||||
{
|
{
|
||||||
ODBCMetaColumn column(_rStmt, pos);
|
ODBCMetaColumn column(_rStmt, pos, _pPreparator->numericConversion());
|
||||||
|
|
||||||
switch (column.type())
|
switch (column.type())
|
||||||
{
|
{
|
||||||
@ -717,7 +720,7 @@ inline bool Extractor::isNullLengthIndicator(SQLLEN val) const
|
|||||||
|
|
||||||
inline SQLINTEGER Extractor::columnSize(std::size_t pos) const
|
inline SQLINTEGER Extractor::columnSize(std::size_t pos) const
|
||||||
{
|
{
|
||||||
std::size_t size = ODBCMetaColumn(_rStmt, pos).length();
|
std::size_t size = ODBCMetaColumn(_rStmt, pos, _pPreparator->numericConversion()).length();
|
||||||
std::size_t maxSize = _pPreparator->maxDataSize(pos);
|
std::size_t maxSize = _pPreparator->maxDataSize(pos);
|
||||||
if (size > maxSize) size = maxSize;
|
if (size > maxSize) size = maxSize;
|
||||||
return (SQLINTEGER) size;
|
return (SQLINTEGER) size;
|
||||||
|
@ -43,7 +43,9 @@ template <class H, SQLSMALLINT handleType>
|
|||||||
class HandleException: public ODBCException
|
class HandleException: public ODBCException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HandleException(const H& handle): _error(handle)
|
HandleException(const H& handle, int code = 0) :
|
||||||
|
ODBCException(code),
|
||||||
|
_error(handle)
|
||||||
/// Creates HandleException
|
/// Creates HandleException
|
||||||
{
|
{
|
||||||
message(_error.toString());
|
message(_error.toString());
|
||||||
@ -129,12 +131,24 @@ public:
|
|||||||
_error.toString());
|
_error.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string errorString() const
|
||||||
|
/// Returns the error diagnostics string
|
||||||
|
{
|
||||||
|
return _error.toString();
|
||||||
|
}
|
||||||
|
|
||||||
static std::string errorString(const H& handle)
|
static std::string errorString(const H& handle)
|
||||||
/// Returns the error diagnostics string for the handle.
|
/// Returns the error diagnostics string for the handle.
|
||||||
{
|
{
|
||||||
return Error<H, handleType>(handle).toString();
|
return Error<H, handleType>(handle).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
const Error<H, handleType>& error() const
|
||||||
|
{
|
||||||
|
return _error;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Error<H, handleType> _error;
|
Error<H, handleType> _error;
|
||||||
};
|
};
|
||||||
|
@ -39,7 +39,15 @@ namespace ODBC {
|
|||||||
class ODBC_API ODBCMetaColumn: public MetaColumn
|
class ODBC_API ODBCMetaColumn: public MetaColumn
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ODBCMetaColumn(const StatementHandle& rStmt, std::size_t position);
|
|
||||||
|
enum NumericConversion
|
||||||
|
{
|
||||||
|
NC_BEST_FIT = 0,
|
||||||
|
NC_FORCE_STRING = 1,
|
||||||
|
NC_BEST_FIT_DBL_LIMIT = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
ODBCMetaColumn(const StatementHandle& rStmt, std::size_t position, NumericConversion numericConversion);
|
||||||
/// Creates the ODBCMetaColumn.
|
/// Creates the ODBCMetaColumn.
|
||||||
|
|
||||||
~ODBCMetaColumn();
|
~ODBCMetaColumn();
|
||||||
@ -73,6 +81,7 @@ private:
|
|||||||
SQLLEN _dataLength;
|
SQLLEN _dataLength;
|
||||||
const StatementHandle& _rStmt;
|
const StatementHandle& _rStmt;
|
||||||
ColumnDescription _columnDesc;
|
ColumnDescription _columnDesc;
|
||||||
|
NumericConversion _numericConversion;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ protected:
|
|||||||
/// Returns the number of affected rows.
|
/// Returns the number of affected rows.
|
||||||
/// Used to find out the number of rows affected by insert or update.
|
/// Used to find out the number of rows affected by insert or update.
|
||||||
|
|
||||||
const MetaColumn& metaColumn(std::size_t pos) const;
|
const MetaColumn& metaColumn(std::size_t pos, size_t dataSet) const;
|
||||||
/// Returns column meta data.
|
/// Returns column meta data.
|
||||||
|
|
||||||
bool hasNext();
|
bool hasNext();
|
||||||
@ -93,6 +93,10 @@ protected:
|
|||||||
std::string nativeSQL();
|
std::string nativeSQL();
|
||||||
/// Returns the SQL string as modified by the driver.
|
/// Returns the SQL string as modified by the driver.
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
virtual void insertHint();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef Poco::Data::AbstractBindingVec Bindings;
|
typedef Poco::Data::AbstractBindingVec Bindings;
|
||||||
typedef Poco::SharedPtr<Binder> BinderPtr;
|
typedef Poco::SharedPtr<Binder> BinderPtr;
|
||||||
@ -140,9 +144,10 @@ private:
|
|||||||
|
|
||||||
void getData();
|
void getData();
|
||||||
|
|
||||||
void addPreparator();
|
bool addPreparator(bool addAlways = true);
|
||||||
void fillColumns();
|
void fillColumns(size_t dataSetPos);
|
||||||
void checkError(SQLRETURN rc, const std::string& msg="");
|
void checkError(SQLRETURN rc, const std::string& msg="");
|
||||||
|
bool nextResultSet();
|
||||||
|
|
||||||
const SQLHDBC& _rConnection;
|
const SQLHDBC& _rConnection;
|
||||||
const StatementHandle _stmt;
|
const StatementHandle _stmt;
|
||||||
@ -155,6 +160,9 @@ private:
|
|||||||
bool _prepared;
|
bool _prepared;
|
||||||
mutable std::size_t _affectedRowCount;
|
mutable std::size_t _affectedRowCount;
|
||||||
bool _canCompile;
|
bool _canCompile;
|
||||||
|
ODBCMetaColumn::NumericConversion _numericConversion;
|
||||||
|
bool _isPostgres;
|
||||||
|
bool _insertHint;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,7 +101,10 @@ public:
|
|||||||
Preparator(const StatementHandle& rStmt,
|
Preparator(const StatementHandle& rStmt,
|
||||||
const std::string& statement,
|
const std::string& statement,
|
||||||
std::size_t maxFieldSize,
|
std::size_t maxFieldSize,
|
||||||
DataExtraction dataExtraction = DE_BOUND);
|
DataExtraction dataExtraction,
|
||||||
|
ODBCMetaColumn::NumericConversion numericConversion ,
|
||||||
|
bool isPostgres
|
||||||
|
);
|
||||||
/// Creates the Preparator.
|
/// Creates the Preparator.
|
||||||
|
|
||||||
Preparator(const Preparator& other);
|
Preparator(const Preparator& other);
|
||||||
@ -416,6 +419,9 @@ public:
|
|||||||
DataExtraction getDataExtraction() const;
|
DataExtraction getDataExtraction() const;
|
||||||
/// Returns data extraction mode.
|
/// Returns data extraction mode.
|
||||||
|
|
||||||
|
ODBCMetaColumn::NumericConversion numericConversion() const;
|
||||||
|
/// Tells if numeric values are always converted to string
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<Poco::Any> ValueVec;
|
typedef std::vector<Poco::Any> ValueVec;
|
||||||
typedef std::vector<SQLLEN> LengthVec;
|
typedef std::vector<SQLLEN> LengthVec;
|
||||||
@ -429,7 +435,7 @@ private:
|
|||||||
void prepareImpl(std::size_t pos, const C* pVal = 0)
|
void prepareImpl(std::size_t pos, const C* pVal = 0)
|
||||||
/// Utility function to prepare Any and DynamicAny.
|
/// Utility function to prepare Any and DynamicAny.
|
||||||
{
|
{
|
||||||
ODBCMetaColumn col(_rStmt, pos);
|
ODBCMetaColumn col(_rStmt, pos, _numericConversion);
|
||||||
|
|
||||||
switch (col.type())
|
switch (col.type())
|
||||||
{
|
{
|
||||||
@ -681,6 +687,7 @@ private:
|
|||||||
mutable IndexMap _varLengthArrays;
|
mutable IndexMap _varLengthArrays;
|
||||||
std::size_t _maxFieldSize;
|
std::size_t _maxFieldSize;
|
||||||
DataExtraction _dataExtraction;
|
DataExtraction _dataExtraction;
|
||||||
|
ODBCMetaColumn::NumericConversion _numericConversion;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1267,6 +1274,12 @@ inline Poco::Any& Preparator::at(std::size_t pos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline ODBCMetaColumn::NumericConversion Preparator::numericConversion() const
|
||||||
|
{
|
||||||
|
return _numericConversion;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } } // namespace Poco::Data::ODBC
|
} } } // namespace Poco::Data::ODBC
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ class ODBC_API SessionImpl: public Poco::Data::AbstractSessionImpl<SessionImpl>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static const std::size_t ODBC_MAX_FIELD_SIZE = 1024u;
|
static const std::size_t ODBC_MAX_FIELD_SIZE = 1024u;
|
||||||
|
static const char* const NUMERIC_CONVERSION_PROPERTY;
|
||||||
|
|
||||||
enum TransactionCapability
|
enum TransactionCapability
|
||||||
{
|
{
|
||||||
@ -167,10 +168,24 @@ public:
|
|||||||
Poco::Any dataTypeInfo(const std::string& rName="");
|
Poco::Any dataTypeInfo(const std::string& rName="");
|
||||||
/// Returns the data types information.
|
/// Returns the data types information.
|
||||||
|
|
||||||
|
ODBCMetaColumn::NumericConversion numericConversion() const;
|
||||||
|
/// Tells if NUMERIC values to be always
|
||||||
|
/// converted to string
|
||||||
|
|
||||||
|
void setNumericConversion(ODBCMetaColumn::NumericConversion value);
|
||||||
|
/// Sets flag to tell if NUMERIC values are always returned as
|
||||||
|
/// string
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setDataTypeInfo(const std::string& rName, const Poco::Any& rValue);
|
void setDataTypeInfo(const std::string& rName, const Poco::Any& rValue);
|
||||||
/// No-op. Throws InvalidAccessException.
|
/// No-op. Throws InvalidAccessException.
|
||||||
|
|
||||||
|
void setNumericConversion(const std::string&, const Poco::Any& rValue);
|
||||||
|
|
||||||
|
Poco::Any numericConversion(const std::string& nm);
|
||||||
|
|
||||||
|
void init();
|
||||||
|
|
||||||
static const int FUNCTIONS = SQL_API_ODBC3_ALL_FUNCTIONS_SIZE;
|
static const int FUNCTIONS = SQL_API_ODBC3_ALL_FUNCTIONS_SIZE;
|
||||||
|
|
||||||
void checkError(SQLRETURN rc, const std::string& msg="");
|
void checkError(SQLRETURN rc, const std::string& msg="");
|
||||||
@ -184,6 +199,7 @@ private:
|
|||||||
Poco::Any _maxFieldSize;
|
Poco::Any _maxFieldSize;
|
||||||
bool _autoBind;
|
bool _autoBind;
|
||||||
bool _autoExtract;
|
bool _autoExtract;
|
||||||
|
ODBCMetaColumn::NumericConversion _numericConversion;
|
||||||
TypeInfo _dataTypes;
|
TypeInfo _dataTypes;
|
||||||
char _canTransact;
|
char _canTransact;
|
||||||
bool _inTransaction;
|
bool _inTransaction;
|
||||||
@ -286,6 +302,30 @@ inline int SessionImpl::queryTimeout() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline ODBCMetaColumn::NumericConversion SessionImpl::numericConversion() const
|
||||||
|
{
|
||||||
|
return _numericConversion;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Poco::Any SessionImpl::numericConversion(const std::string&)
|
||||||
|
{
|
||||||
|
return numericConversion();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void SessionImpl::setNumericConversion(ODBCMetaColumn::NumericConversion value)
|
||||||
|
{
|
||||||
|
_numericConversion = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void SessionImpl::setNumericConversion(const std::string&, const Poco::Any& rValue)
|
||||||
|
{
|
||||||
|
setNumericConversion( Poco::AnyCast<ODBCMetaColumn::NumericConversion>(rValue) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } } // namespace Poco::Data::ODBC
|
} } } // namespace Poco::Data::ODBC
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,8 +23,10 @@
|
|||||||
#include "Poco/Data/ODBC/ODBC.h"
|
#include "Poco/Data/ODBC/ODBC.h"
|
||||||
#include "Poco/NamedTuple.h"
|
#include "Poco/NamedTuple.h"
|
||||||
#include "Poco/DynamicAny.h"
|
#include "Poco/DynamicAny.h"
|
||||||
|
#include "Poco/Data/AbstractBinder.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <typeinfo>
|
||||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
@ -71,6 +73,17 @@ public:
|
|||||||
SQLINTEGER,
|
SQLINTEGER,
|
||||||
SQLSMALLINT> TypeInfoTup;
|
SQLSMALLINT> TypeInfoTup;
|
||||||
typedef std::vector<TypeInfoTup> TypeInfoVec;
|
typedef std::vector<TypeInfoTup> TypeInfoVec;
|
||||||
|
typedef const std::type_info* TypeInfoPtr;
|
||||||
|
|
||||||
|
struct TypeInfoComp : public std::binary_function<TypeInfoPtr, TypeInfoPtr, bool>
|
||||||
|
{
|
||||||
|
bool operator()(const TypeInfoPtr& left, const TypeInfoPtr& right) const
|
||||||
|
{ // apply operator< to operands
|
||||||
|
return ( left->before( *right ) );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::map<TypeInfoPtr, SQLSMALLINT, TypeInfoComp> CppTypeInfoMap;
|
||||||
|
|
||||||
explicit TypeInfo(SQLHDBC* pHDBC=0);
|
explicit TypeInfo(SQLHDBC* pHDBC=0);
|
||||||
/// Creates the TypeInfo.
|
/// Creates the TypeInfo.
|
||||||
@ -102,6 +115,13 @@ public:
|
|||||||
/// Prints all the types (as reported by the underlying database)
|
/// Prints all the types (as reported by the underlying database)
|
||||||
/// to the supplied output stream.
|
/// to the supplied output stream.
|
||||||
|
|
||||||
|
SQLSMALLINT tryTypeidToCType(const std::type_info& ti, SQLSMALLINT defaultVal = SQL_C_TINYINT) const;
|
||||||
|
/// try to find mapping of the given C++ typeid to the ODBC C-Type Code
|
||||||
|
/// will return the defaultVal if no match is found
|
||||||
|
|
||||||
|
SQLSMALLINT nullDataType(const NullData val) const;
|
||||||
|
/// Map the null value type to ODBC buffer type
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void fillCTypes();
|
void fillCTypes();
|
||||||
void fillSQLTypes();
|
void fillSQLTypes();
|
||||||
@ -109,6 +129,7 @@ private:
|
|||||||
DataTypeMap _cDataTypes;
|
DataTypeMap _cDataTypes;
|
||||||
DataTypeMap _sqlDataTypes;
|
DataTypeMap _sqlDataTypes;
|
||||||
TypeInfoVec _typeInfo;
|
TypeInfoVec _typeInfo;
|
||||||
|
CppTypeInfoMap _cppDataTypes;
|
||||||
SQLHDBC* _pHDBC;
|
SQLHDBC* _pHDBC;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,13 +40,6 @@ void makeUTF8(Poco::Buffer<SQLWCHAR>& buffer, SQLINTEGER length, SQLPOINTER pTar
|
|||||||
/// Utility function for conversion from UTF-16 to UTF-8.
|
/// Utility function for conversion from UTF-16 to UTF-8.
|
||||||
|
|
||||||
|
|
||||||
inline void makeUTF8(Poco::Buffer<SQLWCHAR>& buffer, int length, SQLPOINTER pTarget, SQLSMALLINT targetLength)
|
|
||||||
/// Utility function for conversion from UTF-16 to UTF-8.
|
|
||||||
{
|
|
||||||
makeUTF8(buffer, length, pTarget, (SQLINTEGER) targetLength);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} } } // namespace Poco::Data::ODBC
|
} } } // namespace Poco::Data::ODBC
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,17 +27,39 @@ namespace Poco {
|
|||||||
namespace Data {
|
namespace Data {
|
||||||
namespace ODBC {
|
namespace ODBC {
|
||||||
|
|
||||||
|
static void getProp(const TypeInfo& dataTypes, SQLSMALLINT sqlType, size_t& val)
|
||||||
|
{
|
||||||
|
const std::string NM("COLUMN_SIZE");
|
||||||
|
Poco::DynamicAny r;
|
||||||
|
if (dataTypes.tryGetInfo(sqlType, NM, r))
|
||||||
|
{
|
||||||
|
long sz = r.convert<long>();
|
||||||
|
// Postgres driver returns SQL_NO_TOTAL(-4) in some cases
|
||||||
|
if (sz >= 0)
|
||||||
|
val = static_cast<size_t>(sz);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Binder::Binder(const StatementHandle& rStmt,
|
Binder::Binder(const StatementHandle& rStmt,
|
||||||
std::size_t maxFieldSize,
|
std::size_t maxFieldSize,
|
||||||
Binder::ParameterBinding dataBinding,
|
Binder::ParameterBinding dataBinding,
|
||||||
TypeInfo* pDataTypes):
|
TypeInfo* pDataTypes,
|
||||||
|
ODBCMetaColumn::NumericConversion numericConversion,
|
||||||
|
bool insertOnly) :
|
||||||
_rStmt(rStmt),
|
_rStmt(rStmt),
|
||||||
_paramBinding(dataBinding),
|
_paramBinding(dataBinding),
|
||||||
_pTypeInfo(pDataTypes),
|
_pTypeInfo(pDataTypes),
|
||||||
_paramSetSize(0),
|
_paramSetSize(0),
|
||||||
_maxFieldSize(maxFieldSize)
|
_maxFieldSize(maxFieldSize),
|
||||||
|
_maxCharColLength(1024),
|
||||||
|
_maxWCharColLength(1024),
|
||||||
|
_maxVarBinColSize(1024),
|
||||||
|
_numericConversion(numericConversion),
|
||||||
|
_insertOnly(insertOnly)
|
||||||
{
|
{
|
||||||
|
getProp(*_pTypeInfo, SQL_WVARCHAR, _maxWCharColLength);
|
||||||
|
getProp(*_pTypeInfo, SQL_VARCHAR, _maxCharColLength);
|
||||||
|
getProp(*_pTypeInfo, SQL_VARBINARY, _maxVarBinColSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -49,61 +71,110 @@ Binder::~Binder()
|
|||||||
|
|
||||||
void Binder::freeMemory()
|
void Binder::freeMemory()
|
||||||
{
|
{
|
||||||
LengthPtrVec::iterator itLen = _lengthIndicator.begin();
|
if (_lengthIndicator.size() > 0)
|
||||||
LengthPtrVec::iterator itLenEnd = _lengthIndicator.end();
|
{
|
||||||
for(; itLen != itLenEnd; ++itLen) delete *itLen;
|
LengthPtrVec::iterator itLen = _lengthIndicator.begin();
|
||||||
|
LengthPtrVec::iterator itLenEnd = _lengthIndicator.end();
|
||||||
|
for (; itLen != itLenEnd; ++itLen) delete *itLen;
|
||||||
|
}
|
||||||
|
|
||||||
LengthVecVec::iterator itVecLen = _vecLengthIndicator.begin();
|
if (_vecLengthIndicator.size() > 0)
|
||||||
LengthVecVec::iterator itVecLenEnd = _vecLengthIndicator.end();
|
{
|
||||||
for (; itVecLen != itVecLenEnd; ++itVecLen) delete *itVecLen;
|
LengthVecVec::iterator itVecLen = _vecLengthIndicator.begin();
|
||||||
|
LengthVecVec::iterator itVecLenEnd = _vecLengthIndicator.end();
|
||||||
|
for (; itVecLen != itVecLenEnd; ++itVecLen) delete *itVecLen;
|
||||||
|
}
|
||||||
|
|
||||||
TimeMap::iterator itT = _times.begin();
|
if (_times.size() > 0)
|
||||||
TimeMap::iterator itTEnd = _times.end();
|
{
|
||||||
for(; itT != itTEnd; ++itT) delete itT->first;
|
TimeMap::iterator itT = _times.begin();
|
||||||
|
TimeMap::iterator itTEnd = _times.end();
|
||||||
|
for (; itT != itTEnd; ++itT) delete itT->first;
|
||||||
|
}
|
||||||
|
|
||||||
DateMap::iterator itD = _dates.begin();
|
if (_dates.size() > 0)
|
||||||
DateMap::iterator itDEnd = _dates.end();
|
{
|
||||||
for(; itD != itDEnd; ++itD) delete itD->first;
|
DateMap::iterator itD = _dates.begin();
|
||||||
|
DateMap::iterator itDEnd = _dates.end();
|
||||||
|
for (; itD != itDEnd; ++itD) delete itD->first;
|
||||||
|
}
|
||||||
|
|
||||||
TimestampMap::iterator itTS = _timestamps.begin();
|
if (_timestamps.size() > 0)
|
||||||
TimestampMap::iterator itTSEnd = _timestamps.end();
|
{
|
||||||
for(; itTS != itTSEnd; ++itTS) delete itTS->first;
|
TimestampMap::iterator itTS = _timestamps.begin();
|
||||||
|
TimestampMap::iterator itTSEnd = _timestamps.end();
|
||||||
|
for (; itTS != itTSEnd; ++itTS) delete itTS->first;
|
||||||
|
}
|
||||||
|
|
||||||
StringMap::iterator itStr = _strings.begin();
|
if (_strings.size() > 0)
|
||||||
StringMap::iterator itStrEnd = _strings.end();
|
{
|
||||||
for(; itStr != itStrEnd; ++itStr) std::free(itStr->first);
|
StringMap::iterator itStr = _strings.begin();
|
||||||
|
StringMap::iterator itStrEnd = _strings.end();
|
||||||
|
for (; itStr != itStrEnd; ++itStr) std::free(itStr->first);
|
||||||
|
}
|
||||||
|
|
||||||
CharPtrVec::iterator itChr = _charPtrs.begin();
|
if (_charPtrs.size() > 0)
|
||||||
CharPtrVec::iterator endChr = _charPtrs.end();
|
{
|
||||||
for (; itChr != endChr; ++itChr) std::free(*itChr);
|
CharPtrVec::iterator itChr = _charPtrs.begin();
|
||||||
|
CharPtrVec::iterator endChr = _charPtrs.end();
|
||||||
|
for (; itChr != endChr; ++itChr) std::free(*itChr);
|
||||||
|
}
|
||||||
|
|
||||||
UTF16CharPtrVec::iterator itUTF16Chr = _utf16CharPtrs.begin();
|
if (_utf16CharPtrs.size() > 0)
|
||||||
UTF16CharPtrVec::iterator endUTF16Chr = _utf16CharPtrs.end();
|
{
|
||||||
for (; itUTF16Chr != endUTF16Chr; ++itUTF16Chr) std::free(*itUTF16Chr);
|
UTF16CharPtrVec::iterator itUTF16Chr = _utf16CharPtrs.begin();
|
||||||
|
UTF16CharPtrVec::iterator endUTF16Chr = _utf16CharPtrs.end();
|
||||||
|
for (; itUTF16Chr != endUTF16Chr; ++itUTF16Chr) std::free(*itUTF16Chr);
|
||||||
|
}
|
||||||
|
|
||||||
BoolPtrVec::iterator itBool = _boolPtrs.begin();
|
if (_boolPtrs.size() > 0)
|
||||||
BoolPtrVec::iterator endBool = _boolPtrs.end();
|
{
|
||||||
for (; itBool != endBool; ++itBool) delete [] *itBool;
|
BoolPtrVec::iterator itBool = _boolPtrs.begin();
|
||||||
|
BoolPtrVec::iterator endBool = _boolPtrs.end();
|
||||||
|
for (; itBool != endBool; ++itBool) delete[] * itBool;
|
||||||
|
}
|
||||||
|
|
||||||
DateVecVec::iterator itDateVec = _dateVecVec.begin();
|
if (_dateVecVec.size() > 0)
|
||||||
DateVecVec::iterator itDateVecEnd = _dateVecVec.end();
|
{
|
||||||
for (; itDateVec != itDateVecEnd; ++itDateVec) delete *itDateVec;
|
DateVecVec::iterator itDateVec = _dateVecVec.begin();
|
||||||
|
DateVecVec::iterator itDateVecEnd = _dateVecVec.end();
|
||||||
|
for (; itDateVec != itDateVecEnd; ++itDateVec) delete *itDateVec;
|
||||||
|
}
|
||||||
|
|
||||||
TimeVecVec::iterator itTimeVec = _timeVecVec.begin();
|
if (_timeVecVec.size() > 0)
|
||||||
TimeVecVec::iterator itTimeVecEnd = _timeVecVec.end();
|
{
|
||||||
for (; itTimeVec != itTimeVecEnd; ++itTimeVec) delete *itTimeVec;
|
TimeVecVec::iterator itTimeVec = _timeVecVec.begin();
|
||||||
|
TimeVecVec::iterator itTimeVecEnd = _timeVecVec.end();
|
||||||
|
for (; itTimeVec != itTimeVecEnd; ++itTimeVec) delete *itTimeVec;
|
||||||
|
}
|
||||||
|
|
||||||
DateTimeVecVec::iterator itDateTimeVec = _dateTimeVecVec.begin();
|
if (_dateTimeVecVec.size() > 0)
|
||||||
DateTimeVecVec::iterator itDateTimeVecEnd = _dateTimeVecVec.end();
|
{
|
||||||
for (; itDateTimeVec != itDateTimeVecEnd; ++itDateTimeVec) delete *itDateTimeVec;
|
DateTimeVecVec::iterator itDateTimeVec = _dateTimeVecVec.begin();
|
||||||
|
DateTimeVecVec::iterator itDateTimeVecEnd = _dateTimeVecVec.end();
|
||||||
|
for (; itDateTimeVec != itDateTimeVecEnd; ++itDateTimeVec) delete *itDateTimeVec;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_containers.size() > 0)
|
||||||
|
{
|
||||||
|
AnyPtrVecVec::iterator itAnyVec = _containers.begin();
|
||||||
|
AnyPtrVecVec::iterator itAnyVecEnd = _containers.end();
|
||||||
|
for (; itAnyVec != itAnyVecEnd; ++itAnyVec)
|
||||||
|
{
|
||||||
|
AnyPtrVec::iterator b = itAnyVec->begin();
|
||||||
|
AnyPtrVec::iterator e = itAnyVec->end();
|
||||||
|
for (; b != e; ++b) delete *b;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
SQLPOINTER pVal = 0;
|
SQLPOINTER pVal = 0;
|
||||||
SQLINTEGER size = (SQLINTEGER) val.size();
|
SQLINTEGER size = (SQLINTEGER) val.size();
|
||||||
|
|
||||||
|
SQLSMALLINT sqType = SQL_LONGVARCHAR;
|
||||||
if (isOutBound(dir))
|
if (isOutBound(dir))
|
||||||
{
|
{
|
||||||
getColumnOrParameterSize(pos, size);
|
getColumnOrParameterSize(pos, size);
|
||||||
@ -111,16 +182,20 @@ void Binder::bind(std::size_t pos, const std::string& val, Direction dir)
|
|||||||
pVal = (SQLPOINTER) pChar;
|
pVal = (SQLPOINTER) pChar;
|
||||||
_outParams.insert(ParamMap::value_type(pVal, size));
|
_outParams.insert(ParamMap::value_type(pVal, size));
|
||||||
_strings.insert(StringMap::value_type(pChar, const_cast<std::string*>(&val)));
|
_strings.insert(StringMap::value_type(pChar, const_cast<std::string*>(&val)));
|
||||||
|
if (size < _maxCharColLength) sqType = SQL_VARCHAR;
|
||||||
}
|
}
|
||||||
else if (isInBound(dir))
|
else if (isInBound(dir))
|
||||||
{
|
{
|
||||||
pVal = (SQLPOINTER) val.c_str();
|
pVal = (SQLPOINTER) val.c_str();
|
||||||
_inParams.insert(ParamMap::value_type(pVal, size));
|
_inParams.insert(ParamMap::value_type(pVal, size));
|
||||||
|
if (size < _maxCharColLength) sqType = SQL_VARCHAR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw InvalidArgumentException("Parameter must be [in] OR [out] bound.");
|
throw InvalidArgumentException("Parameter must be [in] OR [out] bound.");
|
||||||
|
|
||||||
SQLLEN* pLenIn = new SQLLEN;
|
SQLLEN* pLenIn = new SQLLEN;
|
||||||
|
if (isOutBound(dir) && nullCb.defined())
|
||||||
|
_nullCbMap.insert(NullCbMap::value_type( pLenIn, nullCb) );
|
||||||
SQLINTEGER colSize = 0;
|
SQLINTEGER colSize = 0;
|
||||||
SQLSMALLINT decDigits = 0;
|
SQLSMALLINT decDigits = 0;
|
||||||
getColSizeAndPrecision(pos, SQL_C_CHAR, colSize, decDigits);
|
getColSizeAndPrecision(pos, SQL_C_CHAR, colSize, decDigits);
|
||||||
@ -135,7 +210,7 @@ void Binder::bind(std::size_t pos, const std::string& val, Direction dir)
|
|||||||
(SQLUSMALLINT) pos + 1,
|
(SQLUSMALLINT) pos + 1,
|
||||||
toODBCDirection(dir),
|
toODBCDirection(dir),
|
||||||
SQL_C_CHAR,
|
SQL_C_CHAR,
|
||||||
SQL_LONGVARCHAR,
|
sqType,
|
||||||
(SQLUINTEGER) colSize,
|
(SQLUINTEGER) colSize,
|
||||||
0,
|
0,
|
||||||
pVal,
|
pVal,
|
||||||
@ -147,13 +222,13 @@ void Binder::bind(std::size_t pos, const std::string& val, Direction dir)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Binder::bind(std::size_t pos, const UTF16String& val, Direction dir)
|
void Binder::bind(std::size_t pos, const UTF16String& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
typedef UTF16String::value_type CharT;
|
typedef UTF16String::value_type CharT;
|
||||||
|
|
||||||
SQLPOINTER pVal = 0;
|
SQLPOINTER pVal = 0;
|
||||||
SQLINTEGER size = (SQLINTEGER)(val.size() * sizeof(CharT));
|
SQLINTEGER size = (SQLINTEGER)(val.size() * sizeof(CharT));
|
||||||
|
SQLSMALLINT sqType = (val.size() < _maxWCharColLength) ? SQL_WVARCHAR : SQL_WLONGVARCHAR;
|
||||||
if (isOutBound(dir))
|
if (isOutBound(dir))
|
||||||
{
|
{
|
||||||
getColumnOrParameterSize(pos, size);
|
getColumnOrParameterSize(pos, size);
|
||||||
@ -171,6 +246,9 @@ void Binder::bind(std::size_t pos, const UTF16String& val, Direction dir)
|
|||||||
throw InvalidArgumentException("Parameter must be [in] OR [out] bound.");
|
throw InvalidArgumentException("Parameter must be [in] OR [out] bound.");
|
||||||
|
|
||||||
SQLLEN* pLenIn = new SQLLEN;
|
SQLLEN* pLenIn = new SQLLEN;
|
||||||
|
if (isOutBound(dir) && nullCb.defined())
|
||||||
|
_nullCbMap.insert(NullCbMap::value_type(pLenIn, nullCb));
|
||||||
|
|
||||||
SQLINTEGER colSize = 0;
|
SQLINTEGER colSize = 0;
|
||||||
SQLSMALLINT decDigits = 0;
|
SQLSMALLINT decDigits = 0;
|
||||||
getColSizeAndPrecision(pos, SQL_C_WCHAR, colSize, decDigits);
|
getColSizeAndPrecision(pos, SQL_C_WCHAR, colSize, decDigits);
|
||||||
@ -187,7 +265,7 @@ void Binder::bind(std::size_t pos, const UTF16String& val, Direction dir)
|
|||||||
(SQLUSMALLINT)pos + 1,
|
(SQLUSMALLINT)pos + 1,
|
||||||
toODBCDirection(dir),
|
toODBCDirection(dir),
|
||||||
SQL_C_WCHAR,
|
SQL_C_WCHAR,
|
||||||
SQL_WLONGVARCHAR,
|
sqType,
|
||||||
(SQLUINTEGER)colSize,
|
(SQLUINTEGER)colSize,
|
||||||
0,
|
0,
|
||||||
pVal,
|
pVal,
|
||||||
@ -199,14 +277,14 @@ void Binder::bind(std::size_t pos, const UTF16String& 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)
|
||||||
{
|
{
|
||||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_DATE_STRUCT);
|
|
||||||
SQLLEN* pLenIn = new SQLLEN;
|
SQLLEN* pLenIn = new SQLLEN;
|
||||||
*pLenIn = size;
|
*pLenIn = SQL_NTS; // microsoft example does that, otherwise no null indicator is returned
|
||||||
|
|
||||||
_lengthIndicator.push_back(pLenIn);
|
_lengthIndicator.push_back(pLenIn);
|
||||||
|
if (isOutBound(dir) && nullCb.defined())
|
||||||
|
_nullCbMap.insert(NullCbMap::value_type(pLenIn, nullCb));
|
||||||
SQL_DATE_STRUCT* pDS = new SQL_DATE_STRUCT;
|
SQL_DATE_STRUCT* pDS = new SQL_DATE_STRUCT;
|
||||||
Utility::dateSync(*pDS, val);
|
Utility::dateSync(*pDS, val);
|
||||||
|
|
||||||
@ -232,11 +310,12 @@ 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)
|
||||||
{
|
{
|
||||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIME_STRUCT);
|
|
||||||
SQLLEN* pLenIn = new SQLLEN;
|
SQLLEN* pLenIn = new SQLLEN;
|
||||||
*pLenIn = size;
|
*pLenIn = SQL_NTS; // microsoft example does that, otherwise no null indicator is returned
|
||||||
|
if (isOutBound(dir) && nullCb.defined())
|
||||||
|
_nullCbMap.insert(NullCbMap::value_type(pLenIn, nullCb));
|
||||||
|
|
||||||
_lengthIndicator.push_back(pLenIn);
|
_lengthIndicator.push_back(pLenIn);
|
||||||
|
|
||||||
@ -265,11 +344,12 @@ void Binder::bind(std::size_t pos, const Time& val, Direction dir)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Binder::bind(std::size_t pos, const Poco::DateTime& val, Direction dir)
|
void Binder::bind(std::size_t pos, const Poco::DateTime& val, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIMESTAMP_STRUCT);
|
|
||||||
SQLLEN* pLenIn = new SQLLEN;
|
SQLLEN* pLenIn = new SQLLEN;
|
||||||
*pLenIn = size;
|
*pLenIn = SQL_NTS; // microsoft example does that, otherwise no null indicator is returned
|
||||||
|
if (isOutBound(dir) && nullCb.defined())
|
||||||
|
_nullCbMap.insert(NullCbMap::value_type(pLenIn, nullCb));
|
||||||
|
|
||||||
_lengthIndicator.push_back(pLenIn);
|
_lengthIndicator.push_back(pLenIn);
|
||||||
|
|
||||||
@ -298,7 +378,7 @@ void Binder::bind(std::size_t pos, const Poco::DateTime& val, Direction dir)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Binder::bind(std::size_t pos, const NullData& val, Direction dir)
|
void Binder::bind(std::size_t pos, const NullData& val, Direction dir, const std::type_info& bindType)
|
||||||
{
|
{
|
||||||
if (isOutBound(dir) || !isInBound(dir))
|
if (isOutBound(dir) || !isInBound(dir))
|
||||||
throw NotImplementedException("NULL parameter type can only be inbound.");
|
throw NotImplementedException("NULL parameter type can only be inbound.");
|
||||||
@ -312,13 +392,16 @@ void Binder::bind(std::size_t pos, const NullData& val, Direction dir)
|
|||||||
|
|
||||||
SQLINTEGER colSize = 0;
|
SQLINTEGER colSize = 0;
|
||||||
SQLSMALLINT decDigits = 0;
|
SQLSMALLINT decDigits = 0;
|
||||||
getColSizeAndPrecision(pos, SQL_C_STINYINT, colSize, decDigits);
|
|
||||||
|
const SQLSMALLINT colType = (bindType == typeid(void) || bindType == typeid(NullData) || bindType == typeid(NullType)) ?
|
||||||
|
_pTypeInfo->nullDataType(val) : _pTypeInfo->tryTypeidToCType(bindType, SQL_C_TINYINT);
|
||||||
|
getColSizeAndPrecision(pos, colType, colSize, decDigits);
|
||||||
|
|
||||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||||
(SQLUSMALLINT) pos + 1,
|
(SQLUSMALLINT) pos + 1,
|
||||||
SQL_PARAM_INPUT,
|
SQL_PARAM_INPUT,
|
||||||
SQL_C_STINYINT,
|
colType,
|
||||||
Utility::sqlDataType(SQL_C_STINYINT),
|
Utility::sqlDataType(colType),
|
||||||
colSize,
|
colSize,
|
||||||
decDigits,
|
decDigits,
|
||||||
0,
|
0,
|
||||||
@ -342,7 +425,7 @@ std::size_t Binder::parameterSize(SQLPOINTER pAddr) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Binder::bind(std::size_t pos, const char* const &pVal, Direction dir)
|
void Binder::bind(std::size_t pos, const char* const &pVal, Direction dir, const WhenNullCb& nullCb)
|
||||||
{
|
{
|
||||||
throw NotImplementedException("char* binding not implemented, Use std::string instead.");
|
throw NotImplementedException("char* binding not implemented, Use std::string instead.");
|
||||||
}
|
}
|
||||||
@ -364,6 +447,7 @@ SQLSMALLINT Binder::toODBCDirection(Direction dir) const
|
|||||||
|
|
||||||
void Binder::synchronize()
|
void Binder::synchronize()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (_dates.size())
|
if (_dates.size())
|
||||||
{
|
{
|
||||||
DateMap::iterator it = _dates.begin();
|
DateMap::iterator it = _dates.begin();
|
||||||
@ -395,26 +479,52 @@ void Binder::synchronize()
|
|||||||
for(; it != end; ++it)
|
for(; it != end; ++it)
|
||||||
it->second->assign(it->first, std::strlen(it->first));
|
it->second->assign(it->first, std::strlen(it->first));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_nullCbMap.size())
|
||||||
|
{
|
||||||
|
NullCbMap::iterator it = _nullCbMap.begin();
|
||||||
|
NullCbMap::iterator end = _nullCbMap.end();
|
||||||
|
for (; it != end; ++it)
|
||||||
|
if (*it->first == SQL_NULL_DATA) it->second.onNull();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Binder::reset()
|
void Binder::reset()
|
||||||
{
|
{
|
||||||
freeMemory();
|
freeMemory();
|
||||||
LengthPtrVec().swap(_lengthIndicator);
|
|
||||||
_inParams.clear();
|
if (_lengthIndicator.size() > 0)
|
||||||
_outParams.clear();
|
LengthPtrVec().swap(_lengthIndicator);
|
||||||
_dates.clear();
|
if (_inParams.size() > 0)
|
||||||
_times.clear();
|
_inParams.clear();
|
||||||
_timestamps.clear();
|
if (_outParams.size() > 0)
|
||||||
_strings.clear();
|
_outParams.clear();
|
||||||
_dateVecVec.clear();
|
if (_dates.size() > 0)
|
||||||
_timeVecVec.clear();
|
_dates.clear();
|
||||||
_dateTimeVecVec.clear();
|
if (_times.size() > 0)
|
||||||
_charPtrs.clear();
|
_times.clear();
|
||||||
_boolPtrs.clear();
|
if (_timestamps.size() > 0)
|
||||||
_containers.clear();
|
_timestamps.clear();
|
||||||
|
if (_strings.size() > 0)
|
||||||
|
_strings.clear();
|
||||||
|
if (_dateVecVec.size() > 0)
|
||||||
|
_dateVecVec.clear();
|
||||||
|
if (_timeVecVec.size() > 0)
|
||||||
|
_timeVecVec.clear();
|
||||||
|
if (_dateTimeVecVec.size() > 0)
|
||||||
|
_dateTimeVecVec.clear();
|
||||||
|
if (_charPtrs.size() > 0)
|
||||||
|
_charPtrs.clear();
|
||||||
|
if (_boolPtrs.size() > 0)
|
||||||
|
_boolPtrs.clear();
|
||||||
|
if (_containers.size() > 0)
|
||||||
|
_containers.clear();
|
||||||
|
if (_nullCbMap.size() > 0)
|
||||||
|
_nullCbMap.clear();
|
||||||
_paramSetSize = 0;
|
_paramSetSize = 0;
|
||||||
|
if (!_insertOnly)
|
||||||
|
_parameters.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -425,11 +535,11 @@ void Binder::getColSizeAndPrecision(std::size_t pos,
|
|||||||
{
|
{
|
||||||
// Not all drivers are equally willing to cooperate in this matter.
|
// Not all drivers are equally willing to cooperate in this matter.
|
||||||
// Hence the funky flow control.
|
// Hence the funky flow control.
|
||||||
DynamicAny tmp;
|
|
||||||
bool found(false);
|
|
||||||
if (_pTypeInfo)
|
if (_pTypeInfo)
|
||||||
{
|
{
|
||||||
found = _pTypeInfo->tryGetInfo(cDataType, "COLUMN_SIZE", tmp);
|
DynamicAny tmp;
|
||||||
|
bool found = _pTypeInfo->tryGetInfo(cDataType, "COLUMN_SIZE", tmp);
|
||||||
if (found) colSize = tmp;
|
if (found) colSize = tmp;
|
||||||
found = _pTypeInfo->tryGetInfo(cDataType, "MINIMUM_SCALE", tmp);
|
found = _pTypeInfo->tryGetInfo(cDataType, "MINIMUM_SCALE", tmp);
|
||||||
if (found)
|
if (found)
|
||||||
@ -439,27 +549,34 @@ void Binder::getColSizeAndPrecision(std::size_t pos,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
if (_parameters.size() <= pos || !_parameters[pos].defined())
|
||||||
{
|
{
|
||||||
Parameter p(_rStmt, pos);
|
if (_parameters.size() <= pos)
|
||||||
colSize = (SQLINTEGER) p.columnSize();
|
_parameters.resize(pos + 1);
|
||||||
decDigits = (SQLSMALLINT) p.decimalDigits();
|
_parameters[pos] = ParamDescriptor(0, cDataType, 0);
|
||||||
return;
|
|
||||||
} catch (StatementException&) { }
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ODBCMetaColumn c(_rStmt, pos);
|
{
|
||||||
colSize = (SQLINTEGER) c.length();
|
Parameter p(_rStmt, pos);
|
||||||
decDigits = (SQLSMALLINT) c.precision();
|
_parameters[pos] = ParamDescriptor(static_cast<SQLINTEGER>(p.columnSize()), cDataType, static_cast<SQLSMALLINT>(p.decimalDigits()));
|
||||||
return;
|
}
|
||||||
} catch (StatementException&) { }
|
}
|
||||||
|
catch (StatementException&)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ODBCMetaColumn c(_rStmt, pos, _numericConversion);
|
||||||
|
_parameters[pos] = ParamDescriptor(static_cast<SQLINTEGER>(c.length()), cDataType, static_cast<SQLSMALLINT>(c.precision()));
|
||||||
|
}
|
||||||
|
catch (StatementException&) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// no success, set to zero and hope for the best
|
// we may have no success, so use zeros and hope for the best
|
||||||
// (most drivers do not require these most of the times anyway)
|
// (most drivers do not require these most of the times anyway)
|
||||||
colSize = 0;
|
colSize = _parameters[pos].colSize;
|
||||||
decDigits = 0;
|
decDigits = _parameters[pos].decDigits;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -470,7 +587,7 @@ void Binder::getColumnOrParameterSize(std::size_t pos, SQLINTEGER& size)
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ODBCMetaColumn col(_rStmt, pos);
|
ODBCMetaColumn col(_rStmt, pos, _numericConversion);
|
||||||
colSize = col.length();
|
colSize = col.length();
|
||||||
}
|
}
|
||||||
catch (StatementException&) { }
|
catch (StatementException&) { }
|
||||||
@ -486,10 +603,10 @@ void Binder::getColumnOrParameterSize(std::size_t pos, SQLINTEGER& size)
|
|||||||
//On Linux, PostgreSQL driver segfaults on SQLGetDescField, so this is disabled for now
|
//On Linux, PostgreSQL driver segfaults on SQLGetDescField, so this is disabled for now
|
||||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||||
SQLHDESC hIPD = 0;
|
SQLHDESC hIPD = 0;
|
||||||
if (!Utility::isError(SQLGetStmtAttr(_rStmt, SQL_ATTR_IMP_PARAM_DESC, &hIPD, SQL_IS_POINTER, 0)))
|
if (!Utility::isError(Poco::Data::ODBC::SQLGetStmtAttr(_rStmt, SQL_ATTR_IMP_PARAM_DESC, &hIPD, SQL_IS_POINTER, 0)))
|
||||||
{
|
{
|
||||||
SQLUINTEGER sz = 0;
|
SQLUINTEGER sz = 0;
|
||||||
if (!Utility::isError(SQLGetDescField(hIPD, (SQLSMALLINT) pos + 1, SQL_DESC_LENGTH, &sz, SQL_IS_UINTEGER, 0)) &&
|
if (!Utility::isError(Poco::Data::ODBC::SQLGetDescField(hIPD, (SQLSMALLINT)pos + 1, SQL_DESC_LENGTH, &sz, SQL_IS_UINTEGER, 0)) &&
|
||||||
sz > 0)
|
sz > 0)
|
||||||
{
|
{
|
||||||
size = sz;
|
size = sz;
|
||||||
|
@ -25,12 +25,11 @@ namespace ODBC {
|
|||||||
|
|
||||||
|
|
||||||
ConnectionHandle::ConnectionHandle(EnvironmentHandle* pEnvironment):
|
ConnectionHandle::ConnectionHandle(EnvironmentHandle* pEnvironment):
|
||||||
_pEnvironment(pEnvironment ? pEnvironment : new EnvironmentHandle),
|
_environment(pEnvironment ? &pEnvironment->handle() : 0),
|
||||||
_hdbc(SQL_NULL_HDBC),
|
_hdbc(SQL_NULL_HDBC)
|
||||||
_ownsEnvironment(pEnvironment ? false : true)
|
|
||||||
{
|
{
|
||||||
if (Utility::isError(SQLAllocHandle(SQL_HANDLE_DBC,
|
if (Utility::isError(SQLAllocHandle(SQL_HANDLE_DBC,
|
||||||
_pEnvironment->handle(),
|
_environment.handle(),
|
||||||
&_hdbc)))
|
&_hdbc)))
|
||||||
{
|
{
|
||||||
throw ODBCException("Could not allocate connection handle.");
|
throw ODBCException("Could not allocate connection handle.");
|
||||||
@ -42,12 +41,14 @@ ConnectionHandle::~ConnectionHandle()
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SQLDisconnect(_hdbc);
|
if (_hdbc != SQL_NULL_HDBC)
|
||||||
SQLRETURN rc = SQLFreeHandle(SQL_HANDLE_DBC, _hdbc);
|
{
|
||||||
|
SQLDisconnect(_hdbc);
|
||||||
|
SQLRETURN rc = SQLFreeHandle(SQL_HANDLE_DBC, _hdbc);
|
||||||
|
_hdbc = SQL_NULL_HDBC;
|
||||||
|
|
||||||
if (_ownsEnvironment) delete _pEnvironment;
|
poco_assert(!Utility::isError(rc));
|
||||||
|
}
|
||||||
poco_assert (!Utility::isError(rc));
|
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
@ -24,27 +24,46 @@ namespace Data {
|
|||||||
namespace ODBC {
|
namespace ODBC {
|
||||||
|
|
||||||
|
|
||||||
EnvironmentHandle::EnvironmentHandle(): _henv(SQL_NULL_HENV)
|
EnvironmentHandle::EnvironmentHandle(): _henv(SQL_NULL_HENV),
|
||||||
|
_isOwner(false)
|
||||||
{
|
{
|
||||||
if (Utility::isError(SQLAllocHandle(SQL_HANDLE_ENV,
|
init();
|
||||||
SQL_NULL_HANDLE,
|
}
|
||||||
&_henv)) ||
|
|
||||||
Utility::isError(SQLSetEnvAttr(_henv,
|
EnvironmentHandle::EnvironmentHandle(const SQLHENV* henv) : _henv(SQL_NULL_HENV),
|
||||||
SQL_ATTR_ODBC_VERSION,
|
_isOwner(false)
|
||||||
(SQLPOINTER) SQL_OV_ODBC3,
|
{
|
||||||
0)))
|
if (!henv || *henv == SQL_NULL_HENV)
|
||||||
|
init();
|
||||||
|
else
|
||||||
|
_henv = *henv;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnvironmentHandle::init()
|
||||||
|
{
|
||||||
|
if (Utility::isError(SQLAllocHandle(SQL_HANDLE_ENV,
|
||||||
|
SQL_NULL_HANDLE,
|
||||||
|
&_henv)) ||
|
||||||
|
Utility::isError(SQLSetEnvAttr(_henv,
|
||||||
|
SQL_ATTR_ODBC_VERSION,
|
||||||
|
(SQLPOINTER)SQL_OV_ODBC3,
|
||||||
|
0)))
|
||||||
{
|
{
|
||||||
throw ODBCException("Could not initialize environment.");
|
throw ODBCException("Could not initialize environment.");
|
||||||
}
|
}
|
||||||
|
_isOwner = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EnvironmentHandle::~EnvironmentHandle()
|
EnvironmentHandle::~EnvironmentHandle()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SQLRETURN rc = SQLFreeHandle(SQL_HANDLE_ENV, _henv);
|
if (_isOwner && _henv != SQL_NULL_HENV)
|
||||||
poco_assert (!Utility::isError(rc));
|
{
|
||||||
|
SQLRETURN rc = SQLFreeHandle(SQL_HANDLE_ENV, _henv);
|
||||||
|
_henv = SQL_NULL_HENV;
|
||||||
|
poco_assert(!Utility::isError(rc));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
@ -352,18 +352,37 @@ bool Extractor::extractManualImpl<UTF16String>(std::size_t pos, UTF16String& val
|
|||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
bool Extractor::extractManualImpl<Poco::Data::CLOB>(std::size_t pos,
|
bool Extractor::extractManualImpl<Poco::Data::CLOB>(std::size_t pos,
|
||||||
Poco::Data::CLOB& val,
|
Poco::Data::CLOB& val,
|
||||||
|
SQLSMALLINT cType)
|
||||||
|
{
|
||||||
|
return extractManualLOBImpl(pos, val, cType);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<>
|
||||||
|
bool Extractor::extractManualImpl<Poco::Data::BLOB>(std::size_t pos,
|
||||||
|
Poco::Data::BLOB& val,
|
||||||
|
SQLSMALLINT cType)
|
||||||
|
{
|
||||||
|
return extractManualLOBImpl(pos, val, cType);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
bool Extractor::extractManualLOBImpl(std::size_t pos,
|
||||||
|
Poco::Data::LOB<T>& val,
|
||||||
SQLSMALLINT cType)
|
SQLSMALLINT cType)
|
||||||
{
|
{
|
||||||
std::size_t maxSize = _pPreparator->getMaxFieldSize();
|
std::size_t maxSize = _pPreparator->getMaxFieldSize();
|
||||||
std::size_t fetchedSize = 0;
|
const int bufSize = CHUNK_SIZE;
|
||||||
|
std::size_t fetchedSize = bufSize;
|
||||||
std::size_t totalSize = 0;
|
std::size_t totalSize = 0;
|
||||||
|
|
||||||
SQLLEN len;
|
SQLLEN len;
|
||||||
const int bufSize = CHUNK_SIZE;
|
|
||||||
Poco::Buffer<char> apChar(bufSize);
|
Poco::Buffer<T> apChar(bufSize);
|
||||||
char* pChar = apChar.begin();
|
T* pChar = apChar.begin();
|
||||||
SQLRETURN rc = 0;
|
SQLRETURN rc = 0;
|
||||||
|
|
||||||
val.clear();
|
val.clear();
|
||||||
@ -371,7 +390,9 @@ bool Extractor::extractManualImpl<Poco::Data::CLOB>(std::size_t pos,
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
std::memset(pChar, 0, bufSize);
|
// clear out the latest data in the buffer
|
||||||
|
if (fetchedSize > 0)
|
||||||
|
std::memset(pChar, 0, fetchedSize);
|
||||||
len = 0;
|
len = 0;
|
||||||
rc = SQLGetData(_rStmt,
|
rc = SQLGetData(_rStmt,
|
||||||
(SQLUSMALLINT) pos + 1,
|
(SQLUSMALLINT) pos + 1,
|
||||||
@ -394,7 +415,7 @@ bool Extractor::extractManualImpl<Poco::Data::CLOB>(std::size_t pos,
|
|||||||
if (SQL_NO_DATA == rc || !len)
|
if (SQL_NO_DATA == rc || !len)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
fetchedSize = len > CHUNK_SIZE ? CHUNK_SIZE : len;
|
fetchedSize = len > bufSize ? bufSize : len;
|
||||||
totalSize += fetchedSize;
|
totalSize += fetchedSize;
|
||||||
if (totalSize <= maxSize)
|
if (totalSize <= maxSize)
|
||||||
val.appendRaw(pChar, fetchedSize);
|
val.appendRaw(pChar, fetchedSize);
|
||||||
|
@ -23,9 +23,10 @@ namespace Data {
|
|||||||
namespace ODBC {
|
namespace ODBC {
|
||||||
|
|
||||||
|
|
||||||
ODBCMetaColumn::ODBCMetaColumn(const StatementHandle& rStmt, std::size_t position) :
|
ODBCMetaColumn::ODBCMetaColumn(const StatementHandle& rStmt, std::size_t position, NumericConversion numericConversion) :
|
||||||
MetaColumn(position),
|
MetaColumn(position),
|
||||||
_rStmt(rStmt)
|
_rStmt(rStmt),
|
||||||
|
_numericConversion(numericConversion)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
@ -92,6 +93,7 @@ void ODBCMetaColumn::init()
|
|||||||
case SQL_WCHAR:
|
case SQL_WCHAR:
|
||||||
case SQL_WVARCHAR:
|
case SQL_WVARCHAR:
|
||||||
case SQL_WLONGVARCHAR:
|
case SQL_WLONGVARCHAR:
|
||||||
|
case -350: // IBM DB2 CLOB, which long unicode string
|
||||||
setType(MetaColumn::FDT_WSTRING); break;
|
setType(MetaColumn::FDT_WSTRING); break;
|
||||||
|
|
||||||
case SQL_TINYINT:
|
case SQL_TINYINT:
|
||||||
@ -112,12 +114,46 @@ void ODBCMetaColumn::init()
|
|||||||
|
|
||||||
case SQL_NUMERIC:
|
case SQL_NUMERIC:
|
||||||
case SQL_DECIMAL:
|
case SQL_DECIMAL:
|
||||||
if (0 == _columnDesc.decimalDigits)
|
{
|
||||||
setType(MetaColumn::FDT_INT32);
|
bool toString = false;
|
||||||
else
|
switch (_numericConversion)
|
||||||
setType(MetaColumn::FDT_DOUBLE);
|
{
|
||||||
|
case NC_BEST_FIT:
|
||||||
break;
|
case NC_BEST_FIT_DBL_LIMIT:
|
||||||
|
if (0 == _columnDesc.decimalDigits)
|
||||||
|
{
|
||||||
|
if (_columnDesc.size <= 9)
|
||||||
|
setType(MetaColumn::FDT_INT32);
|
||||||
|
else if (_columnDesc.size <= 18)
|
||||||
|
setType(MetaColumn::FDT_INT64);
|
||||||
|
else if (_numericConversion != NC_BEST_FIT_DBL_LIMIT)
|
||||||
|
toString = true;
|
||||||
|
else
|
||||||
|
setType(MetaColumn::FDT_DOUBLE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// we can't have more than 16 digits in double, but we may be asked to
|
||||||
|
if (_columnDesc.size > 16 && _numericConversion != NC_BEST_FIT_DBL_LIMIT)
|
||||||
|
toString = true;
|
||||||
|
else
|
||||||
|
setType(MetaColumn::FDT_DOUBLE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NC_FORCE_STRING:
|
||||||
|
toString = true;
|
||||||
|
}
|
||||||
|
if (toString)
|
||||||
|
{
|
||||||
|
setLength(_columnDesc.size + 4);
|
||||||
|
#if defined(UNICODE)
|
||||||
|
setType(MetaColumn::FDT_WSTRING);
|
||||||
|
#else
|
||||||
|
setType(MetaColumn::FDT_STRING);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case SQL_REAL:
|
case SQL_REAL:
|
||||||
setType(MetaColumn::FDT_FLOAT); break;
|
setType(MetaColumn::FDT_FLOAT); break;
|
||||||
@ -126,8 +162,12 @@ void ODBCMetaColumn::init()
|
|||||||
case SQL_VARBINARY:
|
case SQL_VARBINARY:
|
||||||
case SQL_LONGVARBINARY:
|
case SQL_LONGVARBINARY:
|
||||||
case -98:// IBM DB2 non-standard type
|
case -98:// IBM DB2 non-standard type
|
||||||
|
case -370: // IBM DB2 XML, documentation advises to bind it as BLOB, not CLOB
|
||||||
setType(MetaColumn::FDT_BLOB); break;
|
setType(MetaColumn::FDT_BLOB); break;
|
||||||
|
|
||||||
|
case -99: // IBM DB2 CLOB
|
||||||
|
setType(MetaColumn::FDT_CLOB); break;
|
||||||
|
|
||||||
case SQL_TYPE_DATE:
|
case SQL_TYPE_DATE:
|
||||||
setType(MetaColumn::FDT_DATE); break;
|
setType(MetaColumn::FDT_DATE); break;
|
||||||
|
|
||||||
|
@ -46,7 +46,10 @@ ODBCStatementImpl::ODBCStatementImpl(SessionImpl& rSession):
|
|||||||
_nextResponse(0),
|
_nextResponse(0),
|
||||||
_prepared(false),
|
_prepared(false),
|
||||||
_affectedRowCount(0),
|
_affectedRowCount(0),
|
||||||
_canCompile(true)
|
_canCompile(true),
|
||||||
|
_numericConversion(rSession.numericConversion()),
|
||||||
|
_isPostgres(false),
|
||||||
|
_insertHint(false)
|
||||||
{
|
{
|
||||||
int queryTimeout = rSession.queryTimeout();
|
int queryTimeout = rSession.queryTimeout();
|
||||||
if (queryTimeout >= 0)
|
if (queryTimeout >= 0)
|
||||||
@ -57,6 +60,15 @@ ODBCStatementImpl::ODBCStatementImpl(SessionImpl& rSession):
|
|||||||
(SQLPOINTER) uqt,
|
(SQLPOINTER) uqt,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
SQLSMALLINT t;
|
||||||
|
SQLRETURN r = Poco::Data::ODBC::SQLGetInfo(_rConnection, SQL_DRIVER_NAME, NULL, 0, &t);
|
||||||
|
if (!Utility::isError(r) && t > 0)
|
||||||
|
{
|
||||||
|
std::string serverString;
|
||||||
|
serverString.resize(static_cast<std::size_t>(t) + 2);
|
||||||
|
r = Poco::Data::ODBC::SQLGetInfo(_rConnection, SQL_DRIVER_NAME, &serverString[0], SQLSMALLINT((serverString.length() - 1) * sizeof(serverString[0])), &t);
|
||||||
|
_isPostgres = (!Utility::isError(r) && Poco::toUpperInPlace(serverString).find("PSQLODBC") == 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,14 +107,15 @@ void ODBCStatementImpl::compileImpl()
|
|||||||
pDT = AnyCast<TypeInfo*>(dti);
|
pDT = AnyCast<TypeInfo*>(dti);
|
||||||
}catch (NotSupportedException&) { }
|
}catch (NotSupportedException&) { }
|
||||||
|
|
||||||
std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize"));
|
const std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize"));
|
||||||
|
const ODBCMetaColumn::NumericConversion numericConversion = dynamic_cast<SessionImpl&>(session()).numericConversion();
|
||||||
|
|
||||||
_pBinder = new Binder(_stmt, maxFieldSize, bind, pDT);
|
_pBinder = new Binder(_stmt, maxFieldSize, bind, pDT, numericConversion, _insertHint);
|
||||||
|
|
||||||
makeInternalExtractors();
|
makeInternalExtractors();
|
||||||
doPrepare();
|
doPrepare();
|
||||||
|
|
||||||
_canCompile = false;
|
_canCompile = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -112,7 +125,7 @@ void ODBCStatementImpl::makeInternalExtractors()
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
fillColumns();
|
fillColumns(currentDataSet());
|
||||||
} catch (DataFormatException&)
|
} catch (DataFormatException&)
|
||||||
{
|
{
|
||||||
if (isStoredProcedure()) return;
|
if (isStoredProcedure()) return;
|
||||||
@ -125,25 +138,34 @@ void ODBCStatementImpl::makeInternalExtractors()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ODBCStatementImpl::addPreparator()
|
bool ODBCStatementImpl::addPreparator(bool addAlways)
|
||||||
{
|
{
|
||||||
|
Preparator* prep = 0;
|
||||||
if (0 == _preparations.size())
|
if (0 == _preparations.size())
|
||||||
{
|
{
|
||||||
std::string statement(toString());
|
std::string statement(toString());
|
||||||
if (statement.empty())
|
if (statement.empty())
|
||||||
throw ODBCException("Empty statements are illegal");
|
throw ODBCException("Empty statements are illegal");
|
||||||
|
|
||||||
Preparator::DataExtraction ext = session().getFeature("autoExtract") ?
|
Preparator::DataExtraction ext = session().getFeature("autoExtract") ?
|
||||||
Preparator::DE_BOUND : Preparator::DE_MANUAL;
|
Preparator::DE_BOUND : Preparator::DE_MANUAL;
|
||||||
|
|
||||||
std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize"));
|
std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize"));
|
||||||
|
|
||||||
_preparations.push_back(new Preparator(_stmt, statement, maxFieldSize, ext));
|
prep = new Preparator(_stmt, statement, maxFieldSize, ext, _numericConversion, _isPostgres);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_preparations.push_back(new Preparator(*_preparations[0]));
|
prep = new Preparator(*_preparations[0]);
|
||||||
|
if (addAlways || prep->columns() > 0)
|
||||||
|
{
|
||||||
|
_preparations.push_back(prep);
|
||||||
|
_extractors.push_back(new Extractor(_stmt, _preparations.back()));
|
||||||
|
|
||||||
_extractors.push_back(new Extractor(_stmt, _preparations.back()));
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete prep;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -214,7 +236,6 @@ void ODBCStatementImpl::doBind()
|
|||||||
void ODBCStatementImpl::bindImpl()
|
void ODBCStatementImpl::bindImpl()
|
||||||
{
|
{
|
||||||
doBind();
|
doBind();
|
||||||
|
|
||||||
SQLRETURN rc = SQLExecute(_stmt);
|
SQLRETURN rc = SQLExecute(_stmt);
|
||||||
|
|
||||||
if (SQL_NEED_DATA == rc) putData();
|
if (SQL_NEED_DATA == rc) putData();
|
||||||
@ -279,6 +300,24 @@ void ODBCStatementImpl::clear()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ODBCStatementImpl::nextResultSet()
|
||||||
|
{
|
||||||
|
SQLRETURN ret = SQLMoreResults(_stmt);
|
||||||
|
|
||||||
|
if (SQL_NO_DATA == ret)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (Utility::isError(ret)) {
|
||||||
|
throw StatementException(_stmt, "SQLMoreResults()");
|
||||||
|
}
|
||||||
|
|
||||||
|
// need to remove old bindings, as Sybase doesn't like old ones
|
||||||
|
if (Utility::isError(SQLFreeStmt(_stmt, SQL_UNBIND))) {
|
||||||
|
throw StatementException(_stmt, "SQLFreeStmt(SQL_UNBIND)");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ODBCStatementImpl::hasNext()
|
bool ODBCStatementImpl::hasNext()
|
||||||
{
|
{
|
||||||
@ -296,17 +335,29 @@ bool ODBCStatementImpl::hasNext()
|
|||||||
|
|
||||||
if (!nextRowReady())
|
if (!nextRowReady())
|
||||||
{
|
{
|
||||||
if (hasMoreDataSets()) activateNextDataSet();
|
// have a loop here, as there could be one or more empty results
|
||||||
else return false;
|
do {
|
||||||
|
if (hasMoreDataSets()) {
|
||||||
if (SQL_NO_DATA == SQLMoreResults(_stmt))
|
activateNextDataSet();
|
||||||
return false;
|
if (!nextResultSet())
|
||||||
|
return false;
|
||||||
addPreparator();
|
addPreparator();
|
||||||
doPrepare();
|
}
|
||||||
fixupExtraction();
|
else {
|
||||||
makeStep();
|
if (nextResultSet()) {
|
||||||
}
|
if (!addPreparator(false)) // skip the result set if it has no columns
|
||||||
|
continue;
|
||||||
|
fillColumns(currentDataSet() + 1);
|
||||||
|
makeExtractors(_preparations.back()->columns(), static_cast<Position::PositionType>(currentDataSet() + 1));
|
||||||
|
activateNextDataSet();
|
||||||
|
}
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
|
doPrepare();
|
||||||
|
fixupExtraction();
|
||||||
|
makeStep();
|
||||||
|
} while (!nextRowReady());
|
||||||
|
}
|
||||||
else if (Utility::isError(_nextResponse))
|
else if (Utility::isError(_nextResponse))
|
||||||
checkError(_nextResponse, "SQLFetch()");
|
checkError(_nextResponse, "SQLFetch()");
|
||||||
|
|
||||||
@ -405,15 +456,16 @@ void ODBCStatementImpl::checkError(SQLRETURN rc, const std::string& msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ODBCStatementImpl::fillColumns()
|
void ODBCStatementImpl::fillColumns(size_t dataSetPos)
|
||||||
{
|
{
|
||||||
std::size_t colCount = columnsReturned();
|
poco_assert_dbg(dataSetPos < _preparations.size());
|
||||||
std::size_t curDataSet = currentDataSet();
|
poco_assert_dbg(_preparations[dataSetPos]);
|
||||||
if (curDataSet >= _columnPtrs.size())
|
std::size_t colCount = static_cast<std::size_t>(_preparations[dataSetPos]->columns());
|
||||||
_columnPtrs.resize(curDataSet + 1);
|
if (dataSetPos >= _columnPtrs.size())
|
||||||
|
_columnPtrs.resize(dataSetPos + 1);
|
||||||
|
|
||||||
for (int i = 0; i < colCount; ++i)
|
for (int i = 0; i < colCount; ++i)
|
||||||
_columnPtrs[curDataSet].push_back(new ODBCMetaColumn(_stmt, i));
|
_columnPtrs[dataSetPos].push_back(new ODBCMetaColumn(_stmt, i, _numericConversion));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -426,17 +478,16 @@ bool ODBCStatementImpl::isStoredProcedure() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const MetaColumn& ODBCStatementImpl::metaColumn(std::size_t pos) const
|
const MetaColumn& ODBCStatementImpl::metaColumn(std::size_t pos, size_t dataSet) const
|
||||||
{
|
{
|
||||||
std::size_t curDataSet = currentDataSet();
|
poco_assert_dbg(dataSet < _columnPtrs.size());
|
||||||
poco_assert_dbg (curDataSet < _columnPtrs.size());
|
|
||||||
|
|
||||||
std::size_t sz = _columnPtrs[curDataSet].size();
|
std::size_t sz = _columnPtrs[dataSet].size();
|
||||||
|
|
||||||
if (0 == sz || pos > sz - 1)
|
if (0 == sz || pos > sz - 1)
|
||||||
throw InvalidAccessException(format("Invalid column number: %u", pos));
|
throw InvalidAccessException(format("Invalid column number: %u", pos));
|
||||||
|
|
||||||
return *_columnPtrs[curDataSet][pos];
|
return *_columnPtrs[dataSet][pos];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -453,4 +504,10 @@ int ODBCStatementImpl::affectedRowCount() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ODBCStatementImpl::insertHint()
|
||||||
|
{
|
||||||
|
_insertHint = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } } // namespace Poco::Data::ODBC
|
} } } // namespace Poco::Data::ODBC
|
||||||
|
@ -30,21 +30,35 @@ namespace ODBC {
|
|||||||
Preparator::Preparator(const StatementHandle& rStmt,
|
Preparator::Preparator(const StatementHandle& rStmt,
|
||||||
const std::string& statement,
|
const std::string& statement,
|
||||||
std::size_t maxFieldSize,
|
std::size_t maxFieldSize,
|
||||||
DataExtraction dataExtraction):
|
DataExtraction dataExtraction,
|
||||||
|
ODBCMetaColumn::NumericConversion numericConversion,
|
||||||
|
bool isPostgres) :
|
||||||
_rStmt(rStmt),
|
_rStmt(rStmt),
|
||||||
_maxFieldSize(maxFieldSize),
|
_maxFieldSize(maxFieldSize),
|
||||||
_dataExtraction(dataExtraction)
|
_dataExtraction(dataExtraction),
|
||||||
|
_numericConversion(numericConversion)
|
||||||
{
|
{
|
||||||
SQLCHAR* pStr = (SQLCHAR*) statement.c_str();
|
SQLCHAR* pStr = (SQLCHAR*) statement.c_str();
|
||||||
if (Utility::isError(Poco::Data::ODBC::SQLPrepare(_rStmt, pStr, (SQLINTEGER) statement.length())))
|
if (Utility::isError(Poco::Data::ODBC::SQLPrepare(_rStmt, pStr, (SQLINTEGER) statement.length())))
|
||||||
throw StatementException(_rStmt);
|
throw StatementException(_rStmt);
|
||||||
|
// PostgreSQL error swallowing workaround:
|
||||||
|
// Postgres may execute a statement with sintax error fine,
|
||||||
|
// but would return error once num of columns requested!
|
||||||
|
if (isPostgres)
|
||||||
|
{
|
||||||
|
SQLSMALLINT t = 0;
|
||||||
|
SQLRETURN r = SQLNumResultCols(rStmt, &t);
|
||||||
|
if (r != SQL_NO_DATA && Utility::isError(r))
|
||||||
|
throw StatementException(rStmt, "Failed to get number of columns");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Preparator::Preparator(const Preparator& other):
|
Preparator::Preparator(const Preparator& other):
|
||||||
_rStmt(other._rStmt),
|
_rStmt(other._rStmt),
|
||||||
_maxFieldSize(other._maxFieldSize),
|
_maxFieldSize(other._maxFieldSize),
|
||||||
_dataExtraction(other._dataExtraction)
|
_dataExtraction(other._dataExtraction),
|
||||||
|
_numericConversion(other._numericConversion)
|
||||||
{
|
{
|
||||||
resize();
|
resize();
|
||||||
}
|
}
|
||||||
@ -155,7 +169,7 @@ std::size_t Preparator::maxDataSize(std::size_t pos) const
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ODBCMetaColumn mc(_rStmt, pos);
|
ODBCMetaColumn mc(_rStmt, pos, _numericConversion);
|
||||||
sz = mc.length();
|
sz = mc.length();
|
||||||
|
|
||||||
// accommodate for terminating zero (non-bulk only!)
|
// accommodate for terminating zero (non-bulk only!)
|
||||||
|
@ -29,6 +29,8 @@ namespace Data {
|
|||||||
namespace ODBC {
|
namespace ODBC {
|
||||||
|
|
||||||
|
|
||||||
|
const char* const SessionImpl::NUMERIC_CONVERSION_PROPERTY= "numericConversion";
|
||||||
|
|
||||||
SessionImpl::SessionImpl(const std::string& connect,
|
SessionImpl::SessionImpl(const std::string& connect,
|
||||||
std::size_t loginTimeout,
|
std::size_t loginTimeout,
|
||||||
std::size_t maxFieldSize,
|
std::size_t maxFieldSize,
|
||||||
@ -39,13 +41,12 @@ SessionImpl::SessionImpl(const std::string& connect,
|
|||||||
_maxFieldSize(maxFieldSize),
|
_maxFieldSize(maxFieldSize),
|
||||||
_autoBind(autoBind),
|
_autoBind(autoBind),
|
||||||
_autoExtract(autoExtract),
|
_autoExtract(autoExtract),
|
||||||
|
_numericConversion(ODBCMetaColumn::NC_BEST_FIT),
|
||||||
_canTransact(ODBC_TXN_CAPABILITY_UNKNOWN),
|
_canTransact(ODBC_TXN_CAPABILITY_UNKNOWN),
|
||||||
_inTransaction(false),
|
_inTransaction(false),
|
||||||
_queryTimeout(-1)
|
_queryTimeout(-1)
|
||||||
{
|
{
|
||||||
setFeature("bulk", true);
|
init();
|
||||||
open();
|
|
||||||
setProperty("handle", _db.handle());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -62,6 +63,15 @@ SessionImpl::SessionImpl(const std::string& connect,
|
|||||||
_inTransaction(false),
|
_inTransaction(false),
|
||||||
_queryTimeout(-1)
|
_queryTimeout(-1)
|
||||||
{
|
{
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SessionImpl::init()
|
||||||
|
{
|
||||||
|
addProperty(NUMERIC_CONVERSION_PROPERTY,
|
||||||
|
&SessionImpl::setNumericConversion,
|
||||||
|
&SessionImpl::numericConversion);
|
||||||
setFeature("bulk", true);
|
setFeature("bulk", true);
|
||||||
open();
|
open();
|
||||||
setProperty("handle", _db.handle());
|
setProperty("handle", _db.handle());
|
||||||
@ -72,7 +82,7 @@ SessionImpl::~SessionImpl()
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (isTransaction() && !getFeature("autoCommit"))
|
if (static_cast<bool>(_db) && isTransaction() && !getFeature("autoCommit"))
|
||||||
{
|
{
|
||||||
try { rollback(); }
|
try { rollback(); }
|
||||||
catch (...) { }
|
catch (...) { }
|
||||||
@ -107,13 +117,13 @@ void SessionImpl::open(const std::string& connect)
|
|||||||
poco_assert_dbg (!connectionString().empty());
|
poco_assert_dbg (!connectionString().empty());
|
||||||
|
|
||||||
SQLULEN tout = static_cast<SQLULEN>(getLoginTimeout());
|
SQLULEN tout = static_cast<SQLULEN>(getLoginTimeout());
|
||||||
if (Utility::isError(SQLSetConnectAttr(_db, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER) tout, 0)))
|
if (Utility::isError(Poco::Data::ODBC::SQLSetConnectAttr(_db, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER)tout, 0)))
|
||||||
{
|
{
|
||||||
if (Utility::isError(SQLGetConnectAttr(_db, SQL_ATTR_LOGIN_TIMEOUT, &tout, 0, 0)) ||
|
if (Utility::isError(Poco::Data::ODBC::SQLGetConnectAttr(_db, SQL_ATTR_LOGIN_TIMEOUT, &tout, 0, 0)) ||
|
||||||
getLoginTimeout() != tout)
|
getLoginTimeout() != tout)
|
||||||
{
|
{
|
||||||
ConnectionError e(_db);
|
ConnectionException e(_db);
|
||||||
throw ConnectionFailedException(e.toString());
|
throw ConnectionFailedException(e.errorString(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,10 +139,9 @@ void SessionImpl::open(const std::string& connect)
|
|||||||
, &result
|
, &result
|
||||||
, SQL_DRIVER_NOPROMPT)))
|
, SQL_DRIVER_NOPROMPT)))
|
||||||
{
|
{
|
||||||
ConnectionError err(_db);
|
ConnectionException e(_db);
|
||||||
std::string errStr = err.toString();
|
|
||||||
close();
|
close();
|
||||||
throw ConnectionFailedException(errStr);
|
throw ConnectionFailedException(e.errorString(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
_dataTypes.fillTypeInfo(_db);
|
_dataTypes.fillTypeInfo(_db);
|
||||||
@ -171,7 +180,7 @@ bool SessionImpl::isConnected()
|
|||||||
{
|
{
|
||||||
SQLULEN value = 0;
|
SQLULEN value = 0;
|
||||||
|
|
||||||
if (Utility::isError(Poco::Data::ODBC::SQLGetConnectAttr(_db,
|
if (!static_cast<bool>(_db) || Utility::isError(Poco::Data::ODBC::SQLGetConnectAttr(_db,
|
||||||
SQL_ATTR_CONNECTION_DEAD,
|
SQL_ATTR_CONNECTION_DEAD,
|
||||||
&value,
|
&value,
|
||||||
0,
|
0,
|
||||||
@ -211,12 +220,18 @@ bool SessionImpl::canTransact()
|
|||||||
if (ODBC_TXN_CAPABILITY_UNKNOWN == _canTransact)
|
if (ODBC_TXN_CAPABILITY_UNKNOWN == _canTransact)
|
||||||
{
|
{
|
||||||
SQLUSMALLINT ret;
|
SQLUSMALLINT ret;
|
||||||
checkError(Poco::Data::ODBC::SQLGetInfo(_db, SQL_TXN_CAPABLE, &ret, 0, 0),
|
SQLRETURN res = Poco::Data::ODBC::SQLGetInfo(_db, SQL_TXN_CAPABLE, &ret, 0, 0);
|
||||||
"Failed to obtain transaction capability info.");
|
if (!Utility::isError(res))
|
||||||
|
{
|
||||||
_canTransact = (SQL_TC_NONE != ret) ?
|
_canTransact = (SQL_TC_NONE != ret) ?
|
||||||
ODBC_TXN_CAPABILITY_TRUE :
|
ODBC_TXN_CAPABILITY_TRUE :
|
||||||
ODBC_TXN_CAPABILITY_FALSE;
|
ODBC_TXN_CAPABILITY_FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Error<SQLHDBC, SQL_HANDLE_DBC> err(_db);
|
||||||
|
_canTransact = ODBC_TXN_CAPABILITY_FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ODBC_TXN_CAPABILITY_TRUE == _canTransact;
|
return ODBC_TXN_CAPABILITY_TRUE == _canTransact;
|
||||||
@ -239,14 +254,14 @@ void SessionImpl::setTransactionIsolation(Poco::UInt32 ti)
|
|||||||
if (ti & Session::TRANSACTION_SERIALIZABLE)
|
if (ti & Session::TRANSACTION_SERIALIZABLE)
|
||||||
isolation |= SQL_TXN_SERIALIZABLE;
|
isolation |= SQL_TXN_SERIALIZABLE;
|
||||||
|
|
||||||
checkError(SQLSetConnectAttr(_db, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER) isolation, 0));
|
checkError(Poco::Data::ODBC::SQLSetConnectAttr(_db, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)isolation, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Poco::UInt32 SessionImpl::getTransactionIsolation()
|
Poco::UInt32 SessionImpl::getTransactionIsolation()
|
||||||
{
|
{
|
||||||
SQLULEN isolation = 0;
|
SQLULEN isolation = 0;
|
||||||
checkError(SQLGetConnectAttr(_db, SQL_ATTR_TXN_ISOLATION,
|
checkError(Poco::Data::ODBC::SQLGetConnectAttr(_db, SQL_ATTR_TXN_ISOLATION,
|
||||||
&isolation,
|
&isolation,
|
||||||
0,
|
0,
|
||||||
0));
|
0));
|
||||||
@ -271,7 +286,7 @@ bool SessionImpl::hasTransactionIsolation(Poco::UInt32 ti)
|
|||||||
Poco::UInt32 SessionImpl::getDefaultTransactionIsolation()
|
Poco::UInt32 SessionImpl::getDefaultTransactionIsolation()
|
||||||
{
|
{
|
||||||
SQLUINTEGER isolation = 0;
|
SQLUINTEGER isolation = 0;
|
||||||
checkError(SQLGetInfo(_db, SQL_DEFAULT_TXN_ISOLATION,
|
checkError(Poco::Data::ODBC::SQLGetInfo(_db, SQL_DEFAULT_TXN_ISOLATION,
|
||||||
&isolation,
|
&isolation,
|
||||||
0,
|
0,
|
||||||
0));
|
0));
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "Poco/Data/ODBC/TypeInfo.h"
|
#include "Poco/Data/ODBC/TypeInfo.h"
|
||||||
#include "Poco/Data/ODBC/ODBCException.h"
|
#include "Poco/Data/ODBC/ODBCException.h"
|
||||||
|
#include "Poco/Data/LOB.h"
|
||||||
#include "Poco/Format.h"
|
#include "Poco/Format.h"
|
||||||
#include "Poco/Exception.h"
|
#include "Poco/Exception.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -30,6 +31,17 @@ TypeInfo::TypeInfo(SQLHDBC* pHDBC): _pHDBC(pHDBC)
|
|||||||
fillCTypes();
|
fillCTypes();
|
||||||
fillSQLTypes();
|
fillSQLTypes();
|
||||||
if (_pHDBC) fillTypeInfo(*_pHDBC);
|
if (_pHDBC) fillTypeInfo(*_pHDBC);
|
||||||
|
|
||||||
|
_cppDataTypes.insert(CppTypeInfoMap::value_type(&typeid(std::string), SQL_C_CHAR));
|
||||||
|
_cppDataTypes.insert(CppTypeInfoMap::value_type(&typeid(std::wstring), SQL_C_WCHAR));
|
||||||
|
_cppDataTypes.insert(CppTypeInfoMap::value_type(&typeid(Poco::UTF16String), SQL_C_WCHAR));
|
||||||
|
_cppDataTypes.insert(CppTypeInfoMap::value_type(&typeid(Date), SQL_TYPE_DATE));
|
||||||
|
_cppDataTypes.insert(CppTypeInfoMap::value_type(&typeid(Time), SQL_TYPE_TIME));
|
||||||
|
_cppDataTypes.insert(CppTypeInfoMap::value_type(&typeid(DateTime), SQL_TYPE_TIMESTAMP));
|
||||||
|
_cppDataTypes.insert(CppTypeInfoMap::value_type(&typeid(BLOB), SQL_BINARY));
|
||||||
|
_cppDataTypes.insert(CppTypeInfoMap::value_type(&typeid(float), SQL_REAL));
|
||||||
|
_cppDataTypes.insert(CppTypeInfoMap::value_type(&typeid(double), SQL_DOUBLE));
|
||||||
|
_cppDataTypes.insert(CppTypeInfoMap::value_type(&typeid(bool), SQL_BIT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -102,7 +114,7 @@ void TypeInfo::fillTypeInfo(SQLHDBC pHDBC)
|
|||||||
if (!SQL_SUCCEEDED(rc))
|
if (!SQL_SUCCEEDED(rc))
|
||||||
throw StatementException(hstmt, "SQLGetData()");
|
throw StatementException(hstmt, "SQLGetData()");
|
||||||
|
|
||||||
rc = SQLGetTypeInfo(hstmt, SQL_ALL_TYPES);
|
rc = Poco::Data::ODBC::SQLGetTypeInfo(hstmt, SQL_ALL_TYPES);
|
||||||
if (SQL_SUCCEEDED(rc))
|
if (SQL_SUCCEEDED(rc))
|
||||||
{
|
{
|
||||||
while (SQLFetch(hstmt) != SQL_NO_DATA_FOUND)
|
while (SQLFetch(hstmt) != SQL_NO_DATA_FOUND)
|
||||||
@ -264,4 +276,43 @@ void TypeInfo::print(std::ostream& ostr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SQLSMALLINT TypeInfo::tryTypeidToCType(const std::type_info& ti, SQLSMALLINT defaultVal) const
|
||||||
|
{
|
||||||
|
CppTypeInfoMap::const_iterator res = _cppDataTypes.find(&ti);
|
||||||
|
if (res == _cppDataTypes.end())
|
||||||
|
return defaultVal;
|
||||||
|
return res->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SQLSMALLINT TypeInfo::nullDataType(const NullData val) const
|
||||||
|
{
|
||||||
|
switch (val)
|
||||||
|
{
|
||||||
|
case NULL_GENERIC:
|
||||||
|
case DATA_NULL_INTEGER:
|
||||||
|
return SQL_C_TINYINT;
|
||||||
|
|
||||||
|
case DATA_NULL_STRING:
|
||||||
|
return SQL_C_CHAR;
|
||||||
|
|
||||||
|
case DATA_NULL_DATE:
|
||||||
|
return SQL_C_TYPE_DATE;
|
||||||
|
|
||||||
|
case DATA_NULL_TIME:
|
||||||
|
return SQL_C_TYPE_TIME;
|
||||||
|
|
||||||
|
case DATA_NULL_DATETIME:
|
||||||
|
return SQL_C_TYPE_TIMESTAMP;
|
||||||
|
|
||||||
|
case DATA_NULL_BLOB:
|
||||||
|
return SQL_C_BINARY;
|
||||||
|
|
||||||
|
case DATA_NULL_FLOAT:
|
||||||
|
return SQL_C_FLOAT;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SQL_C_TINYINT;
|
||||||
|
}
|
||||||
|
|
||||||
} } } // namespace Poco::Data::ODBC
|
} } } // namespace Poco::Data::ODBC
|
||||||
|
@ -31,6 +31,7 @@ using Poco::TextConverter;
|
|||||||
using Poco::InvalidArgumentException;
|
using Poco::InvalidArgumentException;
|
||||||
using Poco::NotImplementedException;
|
using Poco::NotImplementedException;
|
||||||
|
|
||||||
|
#ifdef POCO_ODBC_UNICODE
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
namespace Data {
|
namespace Data {
|
||||||
@ -775,3 +776,4 @@ SQLRETURN SQLDrivers(SQLHENV henv,
|
|||||||
|
|
||||||
|
|
||||||
} } } // namespace Poco::Data::ODBC
|
} } } // namespace Poco::Data::ODBC
|
||||||
|
#endif
|
||||||
|
@ -43,7 +43,7 @@ Utility::DriverMap& Utility::drivers(Utility::DriverMap& driverMap)
|
|||||||
SQLSMALLINT len2 = length;
|
SQLSMALLINT len2 = length;
|
||||||
RETCODE rc = 0;
|
RETCODE rc = 0;
|
||||||
|
|
||||||
if (!Utility::isError(rc = SQLDrivers(henv,
|
if (!Utility::isError(rc = Poco::Data::ODBC::SQLDrivers(henv,
|
||||||
SQL_FETCH_FIRST,
|
SQL_FETCH_FIRST,
|
||||||
desc,
|
desc,
|
||||||
length,
|
length,
|
||||||
@ -59,7 +59,7 @@ Utility::DriverMap& Utility::drivers(Utility::DriverMap& driverMap)
|
|||||||
std::memset(desc, 0, length);
|
std::memset(desc, 0, length);
|
||||||
std::memset(attr, 0, length);
|
std::memset(attr, 0, length);
|
||||||
len2 = length;
|
len2 = length;
|
||||||
}while (!Utility::isError(rc = SQLDrivers(henv,
|
}while (!Utility::isError(rc = Poco::Data::ODBC::SQLDrivers(henv,
|
||||||
SQL_FETCH_NEXT,
|
SQL_FETCH_NEXT,
|
||||||
desc,
|
desc,
|
||||||
length,
|
length,
|
||||||
|
@ -29,7 +29,7 @@ endif
|
|||||||
|
|
||||||
objects = ODBCTestSuite Driver \
|
objects = ODBCTestSuite Driver \
|
||||||
ODBCDB2Test ODBCMySQLTest ODBCOracleTest ODBCPostgreSQLTest \
|
ODBCDB2Test ODBCMySQLTest ODBCOracleTest ODBCPostgreSQLTest \
|
||||||
ODBCSQLiteTest ODBCSQLServerTest ODBCTest SQLExecutor
|
ODBCSQLiteTest ODBCSQLServerTest ODBCTest SQLExecutor ODBCSybaseTest
|
||||||
|
|
||||||
ifeq ($(POCO_CONFIG),MinGW)
|
ifeq ($(POCO_CONFIG),MinGW)
|
||||||
objects += ODBCAccessTest
|
objects += ODBCAccessTest
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="debug_shared|Win32">
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
@ -129,7 +129,7 @@
|
|||||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
@ -140,6 +140,7 @@
|
|||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>PocoCppUnitd.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>PocoCppUnitd.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -189,7 +190,7 @@
|
|||||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
@ -200,6 +201,7 @@
|
|||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>PocoCppUnitmtd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>PocoCppUnitmtd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -249,7 +251,7 @@
|
|||||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
@ -260,6 +262,7 @@
|
|||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>PocoCppUnitmdd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>PocoCppUnitmdd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -314,6 +317,7 @@
|
|||||||
<ClInclude Include="src\ODBCTest.h"/>
|
<ClInclude Include="src\ODBCTest.h"/>
|
||||||
<ClInclude Include="src\ODBCTestSuite.h"/>
|
<ClInclude Include="src\ODBCTestSuite.h"/>
|
||||||
<ClInclude Include="src\SQLExecutor.h"/>
|
<ClInclude Include="src\SQLExecutor.h"/>
|
||||||
|
<ClInclude Include="src\ODBCSybaseTest.h"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\Driver.cpp"/>
|
<ClCompile Include="src\Driver.cpp"/>
|
||||||
@ -327,6 +331,7 @@
|
|||||||
<ClCompile Include="src\ODBCTest.cpp"/>
|
<ClCompile Include="src\ODBCTest.cpp"/>
|
||||||
<ClCompile Include="src\ODBCTestSuite.cpp"/>
|
<ClCompile Include="src\ODBCTestSuite.cpp"/>
|
||||||
<ClCompile Include="src\SQLExecutor.cpp"/>
|
<ClCompile Include="src\SQLExecutor.cpp"/>
|
||||||
|
<ClCompile Include="src\ODBCSybaseTest.cpp"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
<ImportGroup Label="ExtensionTargets"/>
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
|
@ -54,8 +54,11 @@
|
|||||||
<ClInclude Include="src\SQLExecutor.h">
|
<ClInclude Include="src\SQLExecutor.h">
|
||||||
<Filter>ODBC\Header Files</Filter>
|
<Filter>ODBC\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\ODBCSybaseTest.h">
|
||||||
|
<Filter>ODBC\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="src\ODBCTestSuite.h">
|
<ClInclude Include="src\ODBCTestSuite.h">
|
||||||
<Filter>_Suite\Header Files</Filter>
|
<Filter>ODBC\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -92,5 +95,8 @@
|
|||||||
<ClCompile Include="src\Driver.cpp">
|
<ClCompile Include="src\Driver.cpp">
|
||||||
<Filter>_Driver\Source Files</Filter>
|
<Filter>_Driver\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\ODBCSybaseTest.cpp">
|
||||||
|
<Filter>ODBC\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -322,6 +322,7 @@
|
|||||||
<ClInclude Include="src\ODBCTest.h"/>
|
<ClInclude Include="src\ODBCTest.h"/>
|
||||||
<ClInclude Include="src\SQLExecutor.h"/>
|
<ClInclude Include="src\SQLExecutor.h"/>
|
||||||
<ClInclude Include="src\ODBCTestSuite.h"/>
|
<ClInclude Include="src\ODBCTestSuite.h"/>
|
||||||
|
<ClInclude Include="src\ODBCSybaseTest.h"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\ODBCAccessTest.cpp"/>
|
<ClCompile Include="src\ODBCAccessTest.cpp"/>
|
||||||
@ -334,6 +335,7 @@
|
|||||||
<ClCompile Include="src\ODBCTest.cpp"/>
|
<ClCompile Include="src\ODBCTest.cpp"/>
|
||||||
<ClCompile Include="src\SQLExecutor.cpp"/>
|
<ClCompile Include="src\SQLExecutor.cpp"/>
|
||||||
<ClCompile Include="src\ODBCTestSuite.cpp"/>
|
<ClCompile Include="src\ODBCTestSuite.cpp"/>
|
||||||
|
<ClCompile Include="src\/ODBCSybaseTest.cpp"/>
|
||||||
<ClCompile Include="src\WinDriver.cpp"/>
|
<ClCompile Include="src\WinDriver.cpp"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="debug_shared|x64">
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<RootNamespace>TestSuite</RootNamespace>
|
<RootNamespace>TestSuite</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@ -63,27 +63,27 @@
|
|||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings"/>
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros"/>
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
||||||
@ -129,17 +129,18 @@
|
|||||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>PocoCppUnitd.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>PocoCppUnitd.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -167,10 +168,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>PocoCppUnit.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>PocoCppUnit.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -189,17 +191,18 @@
|
|||||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>PocoCppUnitmtd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>PocoCppUnitmtd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -227,10 +230,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>PocoCppUnitmt.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>PocoCppUnitmt.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -249,17 +253,18 @@
|
|||||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>PocoCppUnitmdd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>PocoCppUnitmdd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -287,10 +292,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>PocoCppUnitmd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>PocoCppUnitmd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
@ -304,30 +310,32 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="src\ODBCAccessTest.h"/>
|
<ClInclude Include="src\ODBCAccessTest.h" />
|
||||||
<ClInclude Include="src\ODBCDB2Test.h"/>
|
<ClInclude Include="src\ODBCDB2Test.h" />
|
||||||
<ClInclude Include="src\ODBCMySQLTest.h"/>
|
<ClInclude Include="src\ODBCMySQLTest.h" />
|
||||||
<ClInclude Include="src\ODBCOracleTest.h"/>
|
<ClInclude Include="src\ODBCOracleTest.h" />
|
||||||
<ClInclude Include="src\ODBCPostgreSQLTest.h"/>
|
<ClInclude Include="src\ODBCPostgreSQLTest.h" />
|
||||||
<ClInclude Include="src\ODBCSQLiteTest.h"/>
|
<ClInclude Include="src\ODBCSQLiteTest.h" />
|
||||||
<ClInclude Include="src\ODBCSQLServerTest.h"/>
|
<ClInclude Include="src\ODBCSQLServerTest.h" />
|
||||||
<ClInclude Include="src\ODBCTest.h"/>
|
<ClInclude Include="src\ODBCTest.h" />
|
||||||
<ClInclude Include="src\ODBCTestSuite.h"/>
|
<ClInclude Include="src\ODBCTestSuite.h" />
|
||||||
<ClInclude Include="src\SQLExecutor.h"/>
|
<ClInclude Include="src\SQLExecutor.h" />
|
||||||
|
<ClInclude Include="src\ODBCSybaseTest.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\Driver.cpp"/>
|
<ClCompile Include="src\Driver.cpp" />
|
||||||
<ClCompile Include="src\ODBCAccessTest.cpp"/>
|
<ClCompile Include="src\ODBCAccessTest.cpp" />
|
||||||
<ClCompile Include="src\ODBCDB2Test.cpp"/>
|
<ClCompile Include="src\ODBCDB2Test.cpp" />
|
||||||
<ClCompile Include="src\ODBCMySQLTest.cpp"/>
|
<ClCompile Include="src\ODBCMySQLTest.cpp" />
|
||||||
<ClCompile Include="src\ODBCOracleTest.cpp"/>
|
<ClCompile Include="src\ODBCOracleTest.cpp" />
|
||||||
<ClCompile Include="src\ODBCPostgreSQLTest.cpp"/>
|
<ClCompile Include="src\ODBCPostgreSQLTest.cpp" />
|
||||||
<ClCompile Include="src\ODBCSQLiteTest.cpp"/>
|
<ClCompile Include="src\ODBCSQLiteTest.cpp" />
|
||||||
<ClCompile Include="src\ODBCSQLServerTest.cpp"/>
|
<ClCompile Include="src\ODBCSQLServerTest.cpp" />
|
||||||
<ClCompile Include="src\ODBCTest.cpp"/>
|
<ClCompile Include="src\ODBCTest.cpp" />
|
||||||
<ClCompile Include="src\ODBCTestSuite.cpp"/>
|
<ClCompile Include="src\ODBCTestSuite.cpp" />
|
||||||
<ClCompile Include="src\SQLExecutor.cpp"/>
|
<ClCompile Include="src\SQLExecutor.cpp" />
|
||||||
|
<ClCompile Include="src\ODBCSybaseTest.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets"/>
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -57,6 +57,9 @@
|
|||||||
<ClInclude Include="src\ODBCTestSuite.h">
|
<ClInclude Include="src\ODBCTestSuite.h">
|
||||||
<Filter>_Suite\Header Files</Filter>
|
<Filter>_Suite\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\ODBCSybaseTest.h">
|
||||||
|
<Filter>ODBC\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\ODBCAccessTest.cpp">
|
<ClCompile Include="src\ODBCAccessTest.cpp">
|
||||||
@ -89,8 +92,14 @@
|
|||||||
<ClCompile Include="src\ODBCTestSuite.cpp">
|
<ClCompile Include="src\ODBCTestSuite.cpp">
|
||||||
<Filter>_Suite\Source Files</Filter>
|
<Filter>_Suite\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\ODBCSybaseTest.cpp">
|
||||||
|
<Filter>_Suite\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="src\Driver.cpp">
|
<ClCompile Include="src\Driver.cpp">
|
||||||
<Filter>_Driver\Source Files</Filter>
|
<Filter>_Driver\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\ODBCSybaseTest.cpp">
|
||||||
|
<Filter>ODBC\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -114,8 +114,8 @@ void ODBCAccessTest::dropTable(const std::string& tableName)
|
|||||||
|
|
||||||
void ODBCAccessTest::recreatePersonTable()
|
void ODBCAccessTest::recreatePersonTable()
|
||||||
{
|
{
|
||||||
dropTable("Person");
|
dropTable(ExecUtil::person());
|
||||||
*_pSession << "CREATE TABLE Person (LastName TEXT(30), FirstName TEXT(30), Address TEXT(30), Age INTEGER)", now;
|
*_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName TEXT(30), FirstName TEXT(30), Address TEXT(30), Age INTEGER)", now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ void ODBCAccessTest::setUp()
|
|||||||
|
|
||||||
void ODBCAccessTest::tearDown()
|
void ODBCAccessTest::tearDown()
|
||||||
{
|
{
|
||||||
dropTable("Person");
|
dropTable(ExecUtil::person());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,11 +21,13 @@
|
|||||||
#include "Poco/Exception.h"
|
#include "Poco/Exception.h"
|
||||||
#include "Poco/Data/LOB.h"
|
#include "Poco/Data/LOB.h"
|
||||||
#include "Poco/Data/StatementImpl.h"
|
#include "Poco/Data/StatementImpl.h"
|
||||||
|
#include "Poco/Data/RecordSet.h"
|
||||||
#include "Poco/Data/ODBC/Connector.h"
|
#include "Poco/Data/ODBC/Connector.h"
|
||||||
#include "Poco/Data/ODBC/Utility.h"
|
#include "Poco/Data/ODBC/Utility.h"
|
||||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||||
#include "Poco/Data/ODBC/ODBCException.h"
|
#include "Poco/Data/ODBC/ODBCException.h"
|
||||||
#include "Poco/Data/ODBC/ODBCStatementImpl.h"
|
#include "Poco/Data/ODBC/ODBCStatementImpl.h"
|
||||||
|
#include "Poco/Environment.h"
|
||||||
#include <sqltypes.h>
|
#include <sqltypes.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -43,29 +45,58 @@ using Poco::AnyCast;
|
|||||||
using Poco::DynamicAny;
|
using Poco::DynamicAny;
|
||||||
using Poco::NotFoundException;
|
using Poco::NotFoundException;
|
||||||
|
|
||||||
|
static std::string db2Driver()
|
||||||
|
{
|
||||||
|
return Poco::Environment::get("POCO_TEST_DB2_DRIVER",
|
||||||
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
"IBM DB2 ODBC DRIVER - DB2COPY1"
|
||||||
|
#else
|
||||||
|
"libdb2o.so"
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string db2Uid()
|
||||||
|
{
|
||||||
|
return Poco::Environment::get("POCO_TEST_DB2_UID", "db2admin");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string db2Db()
|
||||||
|
{
|
||||||
|
return Poco::Environment::get("POCO_TEST_DB2_DB", "POCOTEST");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string db2Pwd()
|
||||||
|
{
|
||||||
|
return Poco::Environment::get("POCO_TEST_DB2_PWD", "db2admin");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string db2Extra()
|
||||||
|
{
|
||||||
|
std::string e = Poco::Environment::get("POCO_TEST_DB2_EXTRA", "");
|
||||||
|
return (e.empty() ? "" : e + ";");
|
||||||
|
}
|
||||||
|
|
||||||
#define DB2_ODBC_DRIVER "IBM DB2 ODBC DRIVER - DB2COPY1"
|
|
||||||
#define DB2_DSN "PocoDataDB2Test"
|
#define DB2_DSN "PocoDataDB2Test"
|
||||||
#define DB2_SERVER POCO_ODBC_TEST_DATABASE_SERVER
|
#define DB2_SERVER POCO_ODBC_TEST_DATABASE_SERVER
|
||||||
#define DB2_PORT "50000"
|
#define DB2_PORT "50000"
|
||||||
#define DB2_DB "POCOTEST"
|
|
||||||
#define DB2_UID "db2admin"
|
|
||||||
#define DB2_PWD "db2admin"
|
|
||||||
|
|
||||||
|
|
||||||
ODBCTest::SessionPtr ODBCDB2Test::_pSession;
|
ODBCTest::SessionPtr ODBCDB2Test::_pSession;
|
||||||
ODBCTest::ExecPtr ODBCDB2Test::_pExecutor;
|
ODBCTest::ExecPtr ODBCDB2Test::_pExecutor;
|
||||||
std::string ODBCDB2Test::_driver = DB2_ODBC_DRIVER;
|
std::string ODBCDB2Test::_driver = db2Driver();
|
||||||
std::string ODBCDB2Test::_dsn = DB2_DSN;
|
std::string ODBCDB2Test::_dsn = DB2_DSN;
|
||||||
std::string ODBCDB2Test::_uid = DB2_UID;
|
std::string ODBCDB2Test::_uid = db2Uid();
|
||||||
std::string ODBCDB2Test::_pwd = DB2_PWD;
|
std::string ODBCDB2Test::_pwd = db2Pwd();
|
||||||
std::string ODBCDB2Test::_connectString = "Driver=" DB2_ODBC_DRIVER ";"
|
std::string ODBCDB2Test::_connectString = "Driver=" + db2Driver() + ";"
|
||||||
"Database=" DB2_DB ";"
|
+ db2Extra() +
|
||||||
|
"Database=" + db2Db() + ";"
|
||||||
"Hostname=" DB2_SERVER ";"
|
"Hostname=" DB2_SERVER ";"
|
||||||
"Port=" DB2_PORT ";"
|
"Port=" DB2_PORT ";"
|
||||||
"Protocol=TCPIP;"
|
"Protocol=TCPIP;"
|
||||||
"Uid=" DB2_UID ";"
|
"Uid=" + db2Uid() + ";"
|
||||||
"Pwd=" DB2_PWD ";";
|
"Pwd=" + db2Pwd() + ";"
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
ODBCDB2Test::ODBCDB2Test(const std::string& name):
|
ODBCDB2Test::ODBCDB2Test(const std::string& name):
|
||||||
@ -81,9 +112,9 @@ ODBCDB2Test::~ODBCDB2Test()
|
|||||||
|
|
||||||
void ODBCDB2Test::testBareboneODBC()
|
void ODBCDB2Test::testBareboneODBC()
|
||||||
{
|
{
|
||||||
if (!_pSession) fail ("Test not available.");
|
if (! &session()) fail ("Test not available.");
|
||||||
|
|
||||||
std::string tableCreateString = "CREATE TABLE Test "
|
std::string tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARCHAR(30),"
|
"Second VARCHAR(30),"
|
||||||
"Third BLOB,"
|
"Third BLOB,"
|
||||||
@ -91,55 +122,55 @@ void ODBCDB2Test::testBareboneODBC()
|
|||||||
"Fifth FLOAT,"
|
"Fifth FLOAT,"
|
||||||
"Sixth TIMESTAMP)";
|
"Sixth TIMESTAMP)";
|
||||||
|
|
||||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||||
|
|
||||||
|
|
||||||
tableCreateString = "CREATE TABLE Test "
|
tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second INTEGER,"
|
"Second INTEGER,"
|
||||||
"Third FLOAT)";
|
"Third FLOAT)";
|
||||||
|
|
||||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
executor().bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
executor().bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
executor().bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
executor().bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ODBCDB2Test::testBLOB()
|
void ODBCDB2Test::testBLOB()
|
||||||
{
|
{
|
||||||
if (!_pSession) fail ("Test not available.");
|
if (! &session()) fail ("Test not available.");
|
||||||
|
|
||||||
const std::size_t maxFldSize = 1000000;
|
const std::size_t maxFldSize = 1000000;
|
||||||
_pSession->setProperty("maxFieldSize", Poco::Any(maxFldSize-1));
|
session().setProperty("maxFieldSize", Poco::Any(maxFldSize-1));
|
||||||
recreatePersonBLOBTable();
|
recreatePersonBLOBTable();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_pExecutor->blob(maxFldSize);
|
executor().blob(maxFldSize);
|
||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
}
|
}
|
||||||
catch (DataException&)
|
catch (DataException&)
|
||||||
{
|
{
|
||||||
_pSession->setProperty("maxFieldSize", Poco::Any(maxFldSize));
|
session().setProperty("maxFieldSize", Poco::Any(maxFldSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 8;)
|
for (int i = 0; i < 8;)
|
||||||
{
|
{
|
||||||
recreatePersonBLOBTable();
|
recreatePersonBLOBTable();
|
||||||
_pSession->setFeature("autoBind", bindValue(i));
|
session().setFeature("autoBind", bindValue(i));
|
||||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
session().setFeature("autoExtract", bindValue(i+1));
|
||||||
_pExecutor->blob(maxFldSize);
|
executor().blob(maxFldSize);
|
||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
recreatePersonBLOBTable();
|
recreatePersonBLOBTable();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_pExecutor->blob(maxFldSize+1);
|
executor().blob(maxFldSize+1);
|
||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
}
|
}
|
||||||
catch (DataException&) { }
|
catch (DataException&) { }
|
||||||
@ -148,14 +179,14 @@ void ODBCDB2Test::testBLOB()
|
|||||||
|
|
||||||
void ODBCDB2Test::testFilter()
|
void ODBCDB2Test::testFilter()
|
||||||
{
|
{
|
||||||
if (!_pSession) fail ("Test not available.");
|
if (! &session()) fail ("Test not available.");
|
||||||
|
|
||||||
for (int i = 0; i < 8;)
|
for (int i = 0; i < 8;)
|
||||||
{
|
{
|
||||||
recreateVectorsTable();
|
recreateVectorsTable();
|
||||||
_pSession->setFeature("autoBind", bindValue(i));
|
session().setFeature("autoBind", bindValue(i));
|
||||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
session().setFeature("autoExtract", bindValue(i+1));
|
||||||
_pExecutor->filter("SELECT * FROM Vectors ORDER BY i0 ASC", "i0");
|
executor().filter("SELECT * FROM " + ExecUtil::vectors() + " ORDER BY i0 ASC", "i0");
|
||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -163,50 +194,54 @@ void ODBCDB2Test::testFilter()
|
|||||||
|
|
||||||
void ODBCDB2Test::testStoredProcedure()
|
void ODBCDB2Test::testStoredProcedure()
|
||||||
{
|
{
|
||||||
if (!_pSession) fail ("Test not available.");
|
if (! &session()) fail ("Test not available.");
|
||||||
|
|
||||||
|
const std::string nm = ExecUtil::stored_proc();
|
||||||
|
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER)");
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER, INTEGER)");
|
||||||
|
dropObject("PROCEDURE", nm + "(VARCHAR(1000), VARCHAR(1000))");
|
||||||
|
|
||||||
for (int k = 0; k < 8;)
|
for (int k = 0; k < 8;)
|
||||||
{
|
{
|
||||||
_pSession->setFeature("autoBind", bindValue(k));
|
session().setFeature("autoBind", bindValue(k));
|
||||||
_pSession->setFeature("autoExtract", bindValue(k+1));
|
session().setFeature("autoExtract", bindValue(k+1));
|
||||||
|
|
||||||
dropObject("PROCEDURE", "storedProcedure");
|
session() << "CREATE PROCEDURE " << nm << "(OUT outParam INTEGER) "
|
||||||
*_pSession << "CREATE PROCEDURE storedProcedure(OUT outParam INTEGER) "
|
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SET outParam = -1; "
|
" SET outParam = -1; "
|
||||||
"END" , now;
|
"END" , now;
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
*_pSession << "{call storedProcedure(?)}", out(i), now;
|
session() << "{call " + db2Db() + "." << nm << "(?)}", out(i), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER)");
|
||||||
assert(-1 == i);
|
assert(-1 == i);
|
||||||
dropObject("PROCEDURE", "storedProcedure");
|
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedProcedure(inParam INTEGER, OUT outParam INTEGER) "
|
session() << "CREATE PROCEDURE " << nm << "(inParam INTEGER, OUT outParam INTEGER) "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SET outParam = inParam*inParam; "
|
" SET outParam = inParam*inParam; "
|
||||||
"END" , now;
|
"END" , now;
|
||||||
|
|
||||||
|
|
||||||
i = 2;
|
i = 2;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
*_pSession << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
session() << "{call " + db2Db() + "." << nm << "(?, ?)}", in(i), out(j), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER, INTEGER)");
|
||||||
assert(4 == j);
|
assert(4 == j);
|
||||||
dropObject("PROCEDURE", "storedProcedure");
|
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedProcedure(INOUT ioParam INTEGER) "
|
session() << "CREATE PROCEDURE " << nm << "(INOUT ioParam INTEGER) "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SET ioParam = ioParam*ioParam; "
|
" SET ioParam = ioParam*ioParam; "
|
||||||
"END" , now;
|
"END" , now;
|
||||||
|
|
||||||
i = 2;
|
i = 2;
|
||||||
*_pSession << "{call storedProcedure(?)}", io(i), now;
|
session() << "{call " + db2Db() + "." << nm << "(?)}", io(i), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER)");
|
||||||
assert(4 == i);
|
assert(4 == i);
|
||||||
dropObject("PROCEDURE", "storedProcedure");
|
|
||||||
|
|
||||||
//TIMESTAMP is not supported as stored procedure parameter in DB2
|
//TIMESTAMP is not supported as stored procedure parameter in DB2
|
||||||
//(SQL0182N An expression with a datetime value or a labeled duration is not valid.)
|
//(SQL0182N An expression with a datetime value or a labeled duration is not valid.)
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedProcedure(inParam VARCHAR(1000), OUT outParam VARCHAR(1000)) "
|
session() << "CREATE PROCEDURE " << nm << "(inParam VARCHAR(1000), OUT outParam VARCHAR(1000)) "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SET outParam = inParam; "
|
" SET outParam = inParam; "
|
||||||
"END" , now;
|
"END" , now;
|
||||||
@ -222,9 +257,9 @@ void ODBCDB2Test::testStoredProcedure()
|
|||||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
|
||||||
std::string outParam;
|
std::string outParam;
|
||||||
*_pSession << "{call storedProcedure(?,?)}", in(inParam), out(outParam), now;
|
session() << "{call " + db2Db() + "." << nm << "(?,?)}", in(inParam), out(outParam), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(VARCHAR(1000), VARCHAR(1000))");
|
||||||
assert(inParam == outParam);
|
assert(inParam == outParam);
|
||||||
dropObject("PROCEDURE", "storedProcedure");
|
|
||||||
|
|
||||||
k += 2;
|
k += 2;
|
||||||
}
|
}
|
||||||
@ -233,35 +268,39 @@ void ODBCDB2Test::testStoredProcedure()
|
|||||||
|
|
||||||
void ODBCDB2Test::testStoredProcedureAny()
|
void ODBCDB2Test::testStoredProcedureAny()
|
||||||
{
|
{
|
||||||
if (!_pSession) fail ("Test not available.");
|
if (! &session()) fail ("Test not available.");
|
||||||
|
|
||||||
|
const std::string nm = ExecUtil::stored_proc();
|
||||||
|
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER)");
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER, INTEGER)");
|
||||||
for (int k = 0; k < 8;)
|
for (int k = 0; k < 8;)
|
||||||
{
|
{
|
||||||
_pSession->setFeature("autoBind", bindValue(k));
|
session().setFeature("autoBind", bindValue(k));
|
||||||
_pSession->setFeature("autoExtract", bindValue(k+1));
|
session().setFeature("autoExtract", bindValue(k+1));
|
||||||
|
|
||||||
Any i = 2;
|
Any i = 2;
|
||||||
Any j = 0;
|
Any j = 0;
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedProcedure(inParam INTEGER, OUT outParam INTEGER) "
|
session() << "CREATE PROCEDURE " << nm << "(inParam INTEGER, OUT outParam INTEGER) "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SET outParam = inParam*inParam; "
|
" SET outParam = inParam*inParam; "
|
||||||
"END" , now;
|
"END" , now;
|
||||||
|
|
||||||
*_pSession << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
session() << "{call " + db2Db() + "." << nm << "(?, ?)}", in(i), out(j), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER, INTEGER)");
|
||||||
assert(4 == AnyCast<int>(j));
|
assert(4 == AnyCast<int>(j));
|
||||||
*_pSession << "DROP PROCEDURE storedProcedure;", now;
|
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedProcedure(INOUT ioParam INTEGER) "
|
session() << "CREATE PROCEDURE " << nm << "(INOUT ioParam INTEGER) "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SET ioParam = ioParam*ioParam; "
|
" SET ioParam = ioParam*ioParam; "
|
||||||
"END" , now;
|
"END" , now;
|
||||||
|
|
||||||
i = 2;
|
i = 2;
|
||||||
*_pSession << "{call storedProcedure(?)}", io(i), now;
|
session() << "{call " + db2Db() + "." << nm << "(?)}", io(i), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER)");
|
||||||
assert(4 == AnyCast<int>(i));
|
assert(4 == AnyCast<int>(i));
|
||||||
dropObject("PROCEDURE", "storedProcedure");
|
|
||||||
|
|
||||||
k += 2;
|
k += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -269,33 +308,37 @@ void ODBCDB2Test::testStoredProcedureAny()
|
|||||||
|
|
||||||
void ODBCDB2Test::testStoredProcedureDynamicAny()
|
void ODBCDB2Test::testStoredProcedureDynamicAny()
|
||||||
{
|
{
|
||||||
if (!_pSession) fail ("Test not available.");
|
if (! &session()) fail ("Test not available.");
|
||||||
|
|
||||||
|
const std::string nm = ExecUtil::stored_proc();
|
||||||
|
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER)");
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER, INTEGER)");
|
||||||
for (int k = 0; k < 8;)
|
for (int k = 0; k < 8;)
|
||||||
{
|
{
|
||||||
_pSession->setFeature("autoBind", bindValue(k));
|
session().setFeature("autoBind", bindValue(k));
|
||||||
|
|
||||||
DynamicAny i = 2;
|
DynamicAny i = 2;
|
||||||
DynamicAny j = 0;
|
DynamicAny j = 0;
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedProcedure(inParam INTEGER, OUT outParam INTEGER) "
|
session() << "CREATE PROCEDURE " << nm << "(inParam INTEGER, OUT outParam INTEGER) "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SET outParam = inParam*inParam; "
|
" SET outParam = inParam*inParam; "
|
||||||
"END" , now;
|
"END" , now;
|
||||||
|
|
||||||
*_pSession << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
session() << "{call " + db2Db() + "." << nm << "(?, ?)}", in(i), out(j), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER, INTEGER)");
|
||||||
assert(4 == j);
|
assert(4 == j);
|
||||||
*_pSession << "DROP PROCEDURE storedProcedure;", now;
|
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedProcedure(INOUT ioParam INTEGER) "
|
session() << "CREATE PROCEDURE " << nm << "(INOUT ioParam INTEGER) "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SET ioParam = ioParam*ioParam; "
|
" SET ioParam = ioParam*ioParam; "
|
||||||
"END" , now;
|
"END" , now;
|
||||||
|
|
||||||
i = 2;
|
i = 2;
|
||||||
*_pSession << "{call storedProcedure(?)}", io(i), now;
|
session() << "{call " + db2Db() + "." << nm << "(?)}", io(i), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER)");
|
||||||
assert(4 == i);
|
assert(4 == i);
|
||||||
dropObject("PROCEDURE", "storedProcedure");
|
|
||||||
|
|
||||||
k += 2;
|
k += 2;
|
||||||
}
|
}
|
||||||
@ -304,36 +347,89 @@ void ODBCDB2Test::testStoredProcedureDynamicAny()
|
|||||||
|
|
||||||
void ODBCDB2Test::testStoredFunction()
|
void ODBCDB2Test::testStoredFunction()
|
||||||
{
|
{
|
||||||
if (!_pSession) fail ("Test not available.");
|
const std::string nm = ExecUtil::stored_func();
|
||||||
|
if (! &session()) fail ("Test not available.");
|
||||||
|
|
||||||
|
dropObject("PROCEDURE", nm + "()");
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER)");
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER, INTEGER)");
|
||||||
|
dropObject("PROCEDURE", nm + "(VARCHAR(10), DATE, TIME, TIMESTAMP, INTEGER, SMALLINT, REAL, DOUBLE, VARCHAR(10), INTEGER)");
|
||||||
|
dropObject("PROCEDURE", nm + "(VARCHAR(10), VARCHAR(10))");
|
||||||
|
|
||||||
for (int k = 0; k < 8;)
|
for (int k = 0; k < 8;)
|
||||||
{
|
{
|
||||||
_pSession->setFeature("autoBind", bindValue(k));
|
session().setFeature("autoBind", bindValue(k));
|
||||||
_pSession->setFeature("autoExtract", bindValue(k+1));
|
session().setFeature("autoExtract", bindValue(k + 1));
|
||||||
|
|
||||||
dropObject("PROCEDURE", "storedFunction");
|
{
|
||||||
*_pSession << "CREATE PROCEDURE storedFunction() "
|
session() << "CREATE PROCEDURE " << nm << "() "
|
||||||
|
"BEGIN "
|
||||||
|
" DECLARE C1 CURSOR FOR select * from sysibm.sysdummy1 where 1=2;"
|
||||||
|
" OPEN C1;"
|
||||||
|
" RETURN;"
|
||||||
|
"END", now;
|
||||||
|
|
||||||
|
Poco::Data::Statement stat(session());
|
||||||
|
stat << "{ call " + db2Db() + "." << nm << "()}", now;
|
||||||
|
Poco::Data::RecordSet rs(stat);
|
||||||
|
|
||||||
|
assert(0 == rs.rowCount());
|
||||||
|
dropObject("PROCEDURE", nm + "()");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
session() << "CREATE PROCEDURE " << nm << "(inp VARCHAR(10), out dt DATE, out tm TIME, out tms TIMESTAMP, out int32 INTEGER, "
|
||||||
|
"out si SMALLINT, out fl REAL, out dbl DOUBLE, out s2 VARCHAR(10), out an INTEGER)"
|
||||||
|
"BEGIN "
|
||||||
|
"set dt =null; set tm =null; set tms =null; set int32 =null; set si =null; set fl =null; set dbl =null; set s2 = inp; set an = inp;"
|
||||||
|
"END", now;
|
||||||
|
|
||||||
|
Poco::Data::Statement stat(session());
|
||||||
|
Poco::Nullable<std::string> ns;
|
||||||
|
Poco::Nullable<Poco::Data::Date> nd = Poco::Nullable<Poco::Data::Date>(Poco::Data::Date());
|
||||||
|
Poco::Nullable<int> n_i(1);
|
||||||
|
Poco::Nullable<Poco::Data::Time> tm = Poco::Nullable<Poco::Data::Time>(Poco::Data::Time());
|
||||||
|
Poco::Nullable<Poco::DateTime> tms = Poco::Nullable<Poco::DateTime>(Poco::DateTime());
|
||||||
|
Poco::Nullable<Poco::Int16> i16(1);
|
||||||
|
Poco::Nullable<float> flt(1);
|
||||||
|
Poco::Nullable<double> dbl(1);
|
||||||
|
Poco::Nullable<std::string> s2("ddd");
|
||||||
|
Poco::Nullable<Any> an(Any(2));
|
||||||
|
stat << "{call " + db2Db() + "." << nm << "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}", useRef(ns), out(nd), out(tm), out(tms), out(n_i), out(i16), out(flt), out(dbl), out(s2), out(an), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(VARCHAR(10), DATE, TIME, TIMESTAMP, INTEGER, SMALLINT, REAL, DOUBLE, VARCHAR(10), INTEGER)");
|
||||||
|
assert(nd.isNull());
|
||||||
|
assert(n_i.isNull());
|
||||||
|
assert(tm.isNull());
|
||||||
|
assert(tms.isNull());
|
||||||
|
assert(i16.isNull());
|
||||||
|
assert(flt.isNull());
|
||||||
|
assert(dbl.isNull());
|
||||||
|
assert(s2.isNull());
|
||||||
|
assert(an.isNull());
|
||||||
|
}
|
||||||
|
|
||||||
|
session() << "CREATE PROCEDURE " << nm << "() "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" RETURN -1; "
|
" RETURN -1; "
|
||||||
"END" , now;
|
"END" , now;
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
*_pSession << "{? = call storedFunction()}", out(i), now;
|
session() << "{? = call " + db2Db() + "." << nm << "()}", out(i), now;
|
||||||
|
dropObject("PROCEDURE", nm + "()");
|
||||||
assert(-1 == i);
|
assert(-1 == i);
|
||||||
dropObject("PROCEDURE", "storedFunction");
|
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedFunction(inParam INTEGER) "
|
session() << "CREATE PROCEDURE " << nm << "(inParam INTEGER) "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" RETURN inParam*inParam; "
|
" RETURN inParam*inParam; "
|
||||||
"END" , now;
|
"END" , now;
|
||||||
|
|
||||||
i = 2;
|
i = 2;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
*_pSession << "{? = call storedFunction(?)}", out(result), in(i), now;
|
session() << "{? = call " + db2Db() + "." << nm << "(?)}", out(result), in(i), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER)");
|
||||||
assert(4 == result);
|
assert(4 == result);
|
||||||
dropObject("PROCEDURE", "storedFunction");
|
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedFunction(inParam INTEGER, OUT outParam INTEGER) "
|
session() << "CREATE PROCEDURE " << nm << "(inParam INTEGER, OUT outParam INTEGER) "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SET outParam = inParam*inParam; "
|
" SET outParam = inParam*inParam; "
|
||||||
" RETURN outParam; "
|
" RETURN outParam; "
|
||||||
@ -342,12 +438,12 @@ void ODBCDB2Test::testStoredFunction()
|
|||||||
i = 2;
|
i = 2;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
result = 0;
|
result = 0;
|
||||||
*_pSession << "{? = call storedFunction(?, ?)}", out(result), in(i), out(j), now;
|
session() << "{? = call " + db2Db() + "." << nm << "(?, ?)}", out(result), in(i), out(j), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER, INTEGER)");
|
||||||
assert(4 == j);
|
assert(4 == j);
|
||||||
assert(j == result);
|
assert(j == result);
|
||||||
dropObject("PROCEDURE", "storedFunction");
|
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedFunction(INOUT param1 INTEGER, INOUT param2 INTEGER) "
|
session() << "CREATE PROCEDURE " << nm << "(INOUT param1 INTEGER, INOUT param2 INTEGER) "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" DECLARE temp INTEGER;"
|
" DECLARE temp INTEGER;"
|
||||||
" SET temp = param1; "
|
" SET temp = param1; "
|
||||||
@ -359,7 +455,7 @@ void ODBCDB2Test::testStoredFunction()
|
|||||||
i = 1;
|
i = 1;
|
||||||
j = 2;
|
j = 2;
|
||||||
result = 0;
|
result = 0;
|
||||||
*_pSession << "{? = call storedFunction(?, ?)}", out(result), io(i), io(j), now;
|
session() << "{? = call " + db2Db() + "." << nm << "(?, ?)}", out(result), io(i), io(j), now;
|
||||||
assert(1 == j);
|
assert(1 == j);
|
||||||
assert(2 == i);
|
assert(2 == i);
|
||||||
assert(3 == result);
|
assert(3 == result);
|
||||||
@ -368,16 +464,15 @@ void ODBCDB2Test::testStoredFunction()
|
|||||||
assert(1 == params.get<0>());
|
assert(1 == params.get<0>());
|
||||||
assert(2 == params.get<1>());
|
assert(2 == params.get<1>());
|
||||||
result = 0;
|
result = 0;
|
||||||
*_pSession << "{? = call storedFunction(?, ?)}", out(result), io(params), now;
|
session() << "{? = call " + db2Db() + "." << nm << "(?, ?)}", out(result), io(params), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(INTEGER, INTEGER)");
|
||||||
assert(1 == params.get<1>());
|
assert(1 == params.get<1>());
|
||||||
assert(2 == params.get<0>());
|
assert(2 == params.get<0>());
|
||||||
assert(3 == result);
|
assert(3 == result);
|
||||||
|
|
||||||
dropObject("PROCEDURE", "storedFunction");
|
session().setFeature("autoBind", true);
|
||||||
|
|
||||||
_pSession->setFeature("autoBind", true);
|
session() << "CREATE PROCEDURE " << nm << "(inParam VARCHAR(10), OUT outParam VARCHAR(10)) "
|
||||||
|
|
||||||
*_pSession << "CREATE PROCEDURE storedFunction(inParam VARCHAR(10), OUT outParam VARCHAR(10)) "
|
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SET outParam = inParam; "
|
" SET outParam = inParam; "
|
||||||
" RETURN LENGTH(outParam);"//DB2 allows only integer as return type
|
" RETURN LENGTH(outParam);"//DB2 allows only integer as return type
|
||||||
@ -386,21 +481,74 @@ void ODBCDB2Test::testStoredFunction()
|
|||||||
std::string inParam = "123456789";
|
std::string inParam = "123456789";
|
||||||
std::string outParam;
|
std::string outParam;
|
||||||
int ret;
|
int ret;
|
||||||
*_pSession << "{? = call storedFunction(?,?)}", out(ret), in(inParam), out(outParam), now;
|
session() << "{? = call " + db2Db() + "." << nm << "(?,?)}", out(ret), in(inParam), out(outParam), now;
|
||||||
|
dropObject("PROCEDURE", nm + "(VARCHAR(10), VARCHAR(10))");
|
||||||
assert(inParam == outParam);
|
assert(inParam == outParam);
|
||||||
assert(ret == inParam.size());
|
assert(ret == inParam.size());
|
||||||
dropObject("PROCEDURE", "storedFunction");
|
|
||||||
|
|
||||||
k += 2;
|
k += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ODBCDB2Test::testXMLColumn()
|
||||||
|
{
|
||||||
|
const std::string tbl = ExecUtil::mangleTable("xmlColumn");
|
||||||
|
dropObject("TABLE", tbl);
|
||||||
|
try {
|
||||||
|
const std::string xmlStr = "<a> xml text </a>";
|
||||||
|
Poco::UTF16String uStr;
|
||||||
|
for (unsigned c = 0x400; c < 0x409; ++c) uStr.append(3, Poco::UTF16Char(c) );
|
||||||
|
session() << "CREATE TABLE " << tbl << " (id integer, x XML, cl CLOB, dbcl DBCLOB)", now;
|
||||||
|
session() << "INSERT INTO " << tbl << " (id , x, cl, dbcl) VALUES(1, '" << xmlStr << "', ?, ?)", bind(xmlStr), bind(uStr), now;
|
||||||
|
Poco::Data::Statement stat(session());
|
||||||
|
stat << "SELECT id, x,cl, dbcl FROM " << tbl, now;
|
||||||
|
|
||||||
|
Poco::Data::RecordSet rs(stat);
|
||||||
|
assert(1 == rs.rowCount());
|
||||||
|
assert(4 == rs.columnCount());
|
||||||
|
int id = rs.value<int>(0);
|
||||||
|
assert(1 == id);
|
||||||
|
|
||||||
|
Poco::Data::BLOB xml = rs.value<Poco::Data::BLOB>(1);
|
||||||
|
std::string readStr(reinterpret_cast<const char*>(xml.rawContent()), xml.size());
|
||||||
|
assert(readStr.find(xmlStr) < readStr.length());
|
||||||
|
|
||||||
|
Poco::Data::CLOB cl = rs.value<Poco::Data::CLOB>(2);
|
||||||
|
assert(xmlStr == std::string(cl.rawContent(), cl.size()));
|
||||||
|
|
||||||
|
const Poco::UTF16String us = rs.value<Poco::UTF16String>(3);
|
||||||
|
assert(uStr == us);
|
||||||
|
// check nullables
|
||||||
|
Poco::Nullable<Poco::Data::CLOB> ncl = Poco::Nullable<Poco::Data::CLOB>(Poco::Data::CLOB());
|
||||||
|
assert(false == ncl.isNull());
|
||||||
|
Poco::Nullable<Poco::Data::BLOB> nbl = Poco::Nullable<Poco::Data::BLOB>(Poco::Data::BLOB());
|
||||||
|
assert(false == nbl.isNull());
|
||||||
|
Poco::Nullable<Poco::UTF16String> usn(Poco::UTF16String(2, Poco::UTF16Char('a')));
|
||||||
|
assert(false == usn.isNull());
|
||||||
|
session() << "INSERT INTO " << tbl << " (id) VALUES (99) ", now;
|
||||||
|
session() << "SELECT x,cl, dbcl FROM " << tbl << " WHERE id > 1", into(nbl), into(ncl), into(usn), now;
|
||||||
|
|
||||||
|
assert(true == ncl.isNull());
|
||||||
|
assert(true == nbl.isNull());
|
||||||
|
assert(true == usn.isNull());
|
||||||
|
}
|
||||||
|
catch (const Poco::Exception& e)
|
||||||
|
{
|
||||||
|
dropObject("TABLE", tbl);
|
||||||
|
|
||||||
|
std::cerr << e.message() << std::endl;
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
dropObject("TABLE", tbl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ODBCDB2Test::dropObject(const std::string& type, const std::string& name)
|
void ODBCDB2Test::dropObject(const std::string& type, const std::string& name)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
*_pSession << format("DROP %s %s", type, name), now;
|
session() << format("DROP %s %s", type, name), now;
|
||||||
}
|
}
|
||||||
catch (StatementException& ex)
|
catch (StatementException& ex)
|
||||||
{
|
{
|
||||||
@ -408,8 +556,9 @@ void ODBCDB2Test::dropObject(const std::string& type, const std::string& name)
|
|||||||
const StatementDiagnostics::FieldVec& flds = ex.diagnostics().fields();
|
const StatementDiagnostics::FieldVec& flds = ex.diagnostics().fields();
|
||||||
StatementDiagnostics::Iterator it = flds.begin();
|
StatementDiagnostics::Iterator it = flds.begin();
|
||||||
for (; it != flds.end(); ++it)
|
for (; it != flds.end(); ++it)
|
||||||
{
|
{
|
||||||
if (-204 == it->_nativeError)//(table does not exist)
|
//(table does not exist) // procedure not found
|
||||||
|
if (-204 == it->_nativeError || (-458 == it->_nativeError) )
|
||||||
{
|
{
|
||||||
ignoreError = true;
|
ignoreError = true;
|
||||||
break;
|
break;
|
||||||
@ -423,17 +572,28 @@ void ODBCDB2Test::dropObject(const std::string& type, const std::string& name)
|
|||||||
|
|
||||||
void ODBCDB2Test::recreateNullableTable()
|
void ODBCDB2Test::recreateNullableTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullableTest");
|
dropObject("TABLE", ExecUtil::nullabletest());
|
||||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::nullabletest() << " (EmptyString VARCHAR(30), EmptyInteger INTEGER , EmptyFloat FLOAT , EmptyDateTime TIMESTAMP)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ODBCDB2Test::recreateNumericTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::numeric_tbl());
|
||||||
|
try {
|
||||||
|
session() << "CREATE TABLE " << ExecUtil::numeric_tbl() <<
|
||||||
|
" (id integer, num8 NUMERIC(8), num16_3 NUMERIC(16,3), num18 NUMERIC(18), num18_8 NUMERIC(18,8), num22 NUMERIC(22))", now;
|
||||||
|
}
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateNumericTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateNumericTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ODBCDB2Test::recreatePersonTable()
|
void ODBCDB2Test::recreatePersonTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() <<" (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -441,8 +601,8 @@ void ODBCDB2Test::recreatePersonTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreatePersonBLOBTable()
|
void ODBCDB2Test::recreatePersonBLOBTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() <<" (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
}
|
}
|
||||||
@ -450,8 +610,8 @@ void ODBCDB2Test::recreatePersonBLOBTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreatePersonDateTable()
|
void ODBCDB2Test::recreatePersonDateTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() <<" (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||||
}
|
}
|
||||||
@ -459,8 +619,8 @@ void ODBCDB2Test::recreatePersonDateTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreatePersonTimeTable()
|
void ODBCDB2Test::recreatePersonTimeTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornTime TIME)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() <<" (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornTime TIME)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||||
}
|
}
|
||||||
@ -468,8 +628,8 @@ void ODBCDB2Test::recreatePersonTimeTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreatePersonDateTimeTable()
|
void ODBCDB2Test::recreatePersonDateTimeTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() <<" (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
}
|
}
|
||||||
@ -477,8 +637,8 @@ void ODBCDB2Test::recreatePersonDateTimeTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreateIntsTable()
|
void ODBCDB2Test::recreateIntsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { *_pSession << "CREATE TABLE Strings (str INTEGER)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() << " (str INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
}
|
}
|
||||||
@ -486,8 +646,8 @@ void ODBCDB2Test::recreateIntsTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreateStringsTable()
|
void ODBCDB2Test::recreateStringsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { *_pSession << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() << " (str VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
}
|
}
|
||||||
@ -495,8 +655,8 @@ void ODBCDB2Test::recreateStringsTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreateFloatsTable()
|
void ODBCDB2Test::recreateFloatsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { *_pSession << "CREATE TABLE Strings (str FLOAT)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() << " (str FLOAT)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
}
|
}
|
||||||
@ -504,8 +664,8 @@ void ODBCDB2Test::recreateFloatsTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreateTuplesTable()
|
void ODBCDB2Test::recreateTuplesTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Tuples");
|
dropObject("TABLE", ExecUtil::tuples());
|
||||||
try { *_pSession << "CREATE TABLE Tuples "
|
try { session() << "CREATE TABLE " << ExecUtil::tuples() <<
|
||||||
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||||
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||||
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
||||||
@ -516,8 +676,8 @@ void ODBCDB2Test::recreateTuplesTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreateVectorsTable()
|
void ODBCDB2Test::recreateVectorsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Vectors");
|
dropObject("TABLE", ExecUtil::vectors());
|
||||||
try { *_pSession << "CREATE TABLE Vectors (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::vectors() << " (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
}
|
}
|
||||||
@ -525,8 +685,8 @@ void ODBCDB2Test::recreateVectorsTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreateAnysTable()
|
void ODBCDB2Test::recreateAnysTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Anys");
|
dropObject("TABLE", ExecUtil::anys() );
|
||||||
try { *_pSession << "CREATE TABLE Anys (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::anys() << " (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
}
|
}
|
||||||
@ -534,8 +694,8 @@ void ODBCDB2Test::recreateAnysTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreateNullsTable(const std::string& notNull)
|
void ODBCDB2Test::recreateNullsTable(const std::string& notNull)
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullTest");
|
dropObject("TABLE", ExecUtil::nulltest());
|
||||||
try { *_pSession << format("CREATE TABLE NullTest (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)",
|
try { session() << format("CREATE TABLE %s (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)", ExecUtil::nulltest(),
|
||||||
notNull,
|
notNull,
|
||||||
notNull,
|
notNull,
|
||||||
notNull), now; }
|
notNull), now; }
|
||||||
@ -546,10 +706,10 @@ void ODBCDB2Test::recreateNullsTable(const std::string& notNull)
|
|||||||
|
|
||||||
void ODBCDB2Test::recreateMiscTable()
|
void ODBCDB2Test::recreateMiscTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "MiscTest");
|
dropObject("TABLE", ExecUtil::misctest());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "CREATE TABLE MiscTest "
|
session() << "CREATE TABLE " << ExecUtil::misctest() <<
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second BLOB,"
|
"Second BLOB,"
|
||||||
"Third INTEGER,"
|
"Third INTEGER,"
|
||||||
@ -562,8 +722,8 @@ void ODBCDB2Test::recreateMiscTable()
|
|||||||
|
|
||||||
void ODBCDB2Test::recreateLogTable()
|
void ODBCDB2Test::recreateLogTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "T_POCO_LOG");
|
dropObject("TABLE", ExecUtil::pocolog());;
|
||||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
dropObject("TABLE", ExecUtil::pocolog_a());;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -577,8 +737,8 @@ void ODBCDB2Test::recreateLogTable()
|
|||||||
"Text VARCHAR(100),"
|
"Text VARCHAR(100),"
|
||||||
"DateTime TIMESTAMP)";
|
"DateTime TIMESTAMP)";
|
||||||
|
|
||||||
session() << sql, "T_POCO_LOG", now;
|
session() << sql, ExecUtil::pocolog(), now;
|
||||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
session() << sql, ExecUtil::pocolog_a(), now;
|
||||||
|
|
||||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
@ -597,6 +757,7 @@ CppUnit::Test* ODBCDB2Test::suite()
|
|||||||
|
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testBareboneODBC);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testBareboneODBC);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testZeroRows);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testZeroRows);
|
||||||
|
CppUnit_addTest(pSuite, ODBCDB2Test, testSyntaxError);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSimpleAccess);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testSimpleAccess);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testComplexType);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testComplexType);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSimpleAccessVector);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testSimpleAccessVector);
|
||||||
@ -666,13 +827,20 @@ CppUnit::Test* ODBCDB2Test::suite()
|
|||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testAny);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testAny);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testDynamicAny);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testDynamicAny);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testMultipleResults);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testMultipleResults);
|
||||||
|
CppUnit_addTest(pSuite, ODBCDB2Test, testMultipleResultsNoProj);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSQLChannel);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testSQLChannel);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSQLLogger);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testSQLLogger);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSessionTransaction);
|
//CppUnit_addTest(pSuite, ODBCDB2Test, testSessionTransaction); // this test fails when connection is fast
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testTransaction);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testTransaction);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testTransactor);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testTransactor);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testNullable);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testNullable);
|
||||||
CppUnit_addTest(pSuite, ODBCDB2Test, testReconnect);
|
CppUnit_addTest(pSuite, ODBCDB2Test, testReconnect);
|
||||||
|
CppUnit_addTest(pSuite, ODBCDB2Test, testNumeric);
|
||||||
|
CppUnit_addTest(pSuite, ODBCDB2Test, testXMLColumn);
|
||||||
|
CppUnit_addTest(pSuite, ODBCDB2Test, testInsertStatReuse);
|
||||||
|
|
||||||
|
ODBCDB2Test::_pExecutor = 0;
|
||||||
|
ODBCDB2Test::_pSession = 0;
|
||||||
|
|
||||||
return pSuite;
|
return pSuite;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ public:
|
|||||||
void testStoredProcedureAny();
|
void testStoredProcedureAny();
|
||||||
void testStoredProcedureDynamicAny();
|
void testStoredProcedureDynamicAny();
|
||||||
void testStoredFunction();
|
void testStoredFunction();
|
||||||
|
void testXMLColumn();
|
||||||
|
|
||||||
static CppUnit::Test* suite();
|
static CppUnit::Test* suite();
|
||||||
|
|
||||||
@ -61,6 +62,7 @@ private:
|
|||||||
void recreateNullsTable(const std::string& notNull = "");
|
void recreateNullsTable(const std::string& notNull = "");
|
||||||
void recreateMiscTable();
|
void recreateMiscTable();
|
||||||
void recreateLogTable();
|
void recreateLogTable();
|
||||||
|
void recreateNumericTable();
|
||||||
|
|
||||||
static ODBCTest::SessionPtr _pSession;
|
static ODBCTest::SessionPtr _pSession;
|
||||||
static ODBCTest::ExecPtr _pExecutor;
|
static ODBCTest::ExecPtr _pExecutor;
|
||||||
|
@ -77,7 +77,7 @@ void ODBCMySQLTest::testBareboneODBC()
|
|||||||
{
|
{
|
||||||
if (!_pSession) fail ("Test not available.");
|
if (!_pSession) fail ("Test not available.");
|
||||||
|
|
||||||
std::string tableCreateString = "CREATE TABLE Test "
|
std::string tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARCHAR(30),"
|
"Second VARCHAR(30),"
|
||||||
"Third VARBINARY(30),"
|
"Third VARBINARY(30),"
|
||||||
@ -97,7 +97,7 @@ has different SQL syntax for it and behaves differently
|
|||||||
compared to other DBMS systems in regards to SQLMoreResults.
|
compared to other DBMS systems in regards to SQLMoreResults.
|
||||||
So, we skip this test.
|
So, we skip this test.
|
||||||
|
|
||||||
tableCreateString = "CREATE TABLE Test "
|
tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second INTEGER,"
|
"Second INTEGER,"
|
||||||
"Third FLOAT)";
|
"Third FLOAT)";
|
||||||
@ -236,7 +236,7 @@ void ODBCMySQLTest::testFilter()
|
|||||||
recreateVectorsTable();
|
recreateVectorsTable();
|
||||||
_pSession->setFeature("autoBind", bindValue(i));
|
_pSession->setFeature("autoBind", bindValue(i));
|
||||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
_pSession->setFeature("autoExtract", bindValue(i+1));
|
||||||
_pExecutor->filter("SELECT * FROM Vectors ORDER BY i0 ASC", "i0");
|
_pExecutor->filter("SELECT * FROM " + ExecUtil::vectors() + " ORDER BY i0 ASC", "i0");
|
||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -250,8 +250,8 @@ void ODBCMySQLTest::dropObject(const std::string& type, const std::string& name)
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreateNullableTable()
|
void ODBCMySQLTest::recreateNullableTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullableTest");
|
dropObject("TABLE", ExecUtil::nullabletest());
|
||||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::nullabletest() << " (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -259,8 +259,8 @@ void ODBCMySQLTest::recreateNullableTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreatePersonTable()
|
void ODBCMySQLTest::recreatePersonTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -268,8 +268,8 @@ void ODBCMySQLTest::recreatePersonTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreatePersonBLOBTable()
|
void ODBCMySQLTest::recreatePersonBLOBTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
}
|
}
|
||||||
@ -277,8 +277,8 @@ void ODBCMySQLTest::recreatePersonBLOBTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreatePersonDateTable()
|
void ODBCMySQLTest::recreatePersonDateTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||||
}
|
}
|
||||||
@ -286,8 +286,8 @@ void ODBCMySQLTest::recreatePersonDateTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreatePersonTimeTable()
|
void ODBCMySQLTest::recreatePersonTimeTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornTime TIME)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornTime TIME)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||||
}
|
}
|
||||||
@ -295,8 +295,8 @@ void ODBCMySQLTest::recreatePersonTimeTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreatePersonDateTimeTable()
|
void ODBCMySQLTest::recreatePersonDateTimeTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born DATETIME)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born DATETIME)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
}
|
}
|
||||||
@ -304,8 +304,8 @@ void ODBCMySQLTest::recreatePersonDateTimeTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreateIntsTable()
|
void ODBCMySQLTest::recreateIntsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { *_pSession << "CREATE TABLE Strings (str INTEGER)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::strings() << " (str INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
}
|
}
|
||||||
@ -313,8 +313,8 @@ void ODBCMySQLTest::recreateIntsTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreateStringsTable()
|
void ODBCMySQLTest::recreateStringsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { *_pSession << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::strings() << " (str VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
}
|
}
|
||||||
@ -322,8 +322,8 @@ void ODBCMySQLTest::recreateStringsTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreateFloatsTable()
|
void ODBCMySQLTest::recreateFloatsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { *_pSession << "CREATE TABLE Strings (str FLOAT)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (str FLOAT)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
}
|
}
|
||||||
@ -331,8 +331,8 @@ void ODBCMySQLTest::recreateFloatsTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreateTuplesTable()
|
void ODBCMySQLTest::recreateTuplesTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Tuples");
|
dropObject("TABLE", ExecUtil::tuples());
|
||||||
try { *_pSession << "CREATE TABLE Tuples "
|
try { *_pSession << "CREATE TABLE " << ExecUtil::tuples() <<
|
||||||
"(i0 INTEGER, i1 INTEGER, i2 INTEGER, i3 INTEGER, i4 INTEGER, i5 INTEGER, i6 INTEGER, "
|
"(i0 INTEGER, i1 INTEGER, i2 INTEGER, i3 INTEGER, i4 INTEGER, i5 INTEGER, i6 INTEGER, "
|
||||||
"i7 INTEGER, i8 INTEGER, i9 INTEGER, i10 INTEGER, i11 INTEGER, i12 INTEGER, i13 INTEGER,"
|
"i7 INTEGER, i8 INTEGER, i9 INTEGER, i10 INTEGER, i11 INTEGER, i12 INTEGER, i13 INTEGER,"
|
||||||
"i14 INTEGER, i15 INTEGER, i16 INTEGER, i17 INTEGER, i18 INTEGER, i19 INTEGER)", now; }
|
"i14 INTEGER, i15 INTEGER, i16 INTEGER, i17 INTEGER, i18 INTEGER, i19 INTEGER)", now; }
|
||||||
@ -343,8 +343,8 @@ void ODBCMySQLTest::recreateTuplesTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreateVectorsTable()
|
void ODBCMySQLTest::recreateVectorsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Vectors");
|
dropObject("TABLE", ExecUtil::vectors() );
|
||||||
try { *_pSession << "CREATE TABLE Vectors (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::vectors() << " (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
}
|
}
|
||||||
@ -352,8 +352,8 @@ void ODBCMySQLTest::recreateVectorsTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreateAnysTable()
|
void ODBCMySQLTest::recreateAnysTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Anys");
|
dropObject("TABLE", ExecUtil::anys() );
|
||||||
try { *_pSession << "CREATE TABLE Anys (i0 INTEGER, flt0 DOUBLE, str0 VARCHAR(30))", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::anys() << " (i0 INTEGER, flt0 DOUBLE, str0 VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
}
|
}
|
||||||
@ -361,8 +361,8 @@ void ODBCMySQLTest::recreateAnysTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreateNullsTable(const std::string& notNull)
|
void ODBCMySQLTest::recreateNullsTable(const std::string& notNull)
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullTest");
|
dropObject("TABLE", ExecUtil::nulltest());
|
||||||
try { *_pSession << format("CREATE TABLE NullTest (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)",
|
try { *_pSession << format("CREATE TABLE %s (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)", ExecUtil::nulltest(),
|
||||||
notNull,
|
notNull,
|
||||||
notNull,
|
notNull,
|
||||||
notNull), now; }
|
notNull), now; }
|
||||||
@ -373,8 +373,8 @@ void ODBCMySQLTest::recreateNullsTable(const std::string& notNull)
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreateMiscTable()
|
void ODBCMySQLTest::recreateMiscTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "MiscTest");
|
dropObject("TABLE", ExecUtil::misctest());
|
||||||
try { *_pSession << "CREATE TABLE MiscTest "
|
try { *_pSession << "CREATE TABLE "<< ExecUtil::misctest() <<
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARBINARY(30),"
|
"Second VARBINARY(30),"
|
||||||
"Third INTEGER,"
|
"Third INTEGER,"
|
||||||
@ -387,8 +387,8 @@ void ODBCMySQLTest::recreateMiscTable()
|
|||||||
|
|
||||||
void ODBCMySQLTest::recreateLogTable()
|
void ODBCMySQLTest::recreateLogTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "T_POCO_LOG");
|
dropObject("TABLE", ExecUtil::pocolog());;
|
||||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
dropObject("TABLE", ExecUtil::pocolog_a());;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -402,8 +402,8 @@ void ODBCMySQLTest::recreateLogTable()
|
|||||||
"Text VARCHAR(100),"
|
"Text VARCHAR(100),"
|
||||||
"DateTime DATETIME)";
|
"DateTime DATETIME)";
|
||||||
|
|
||||||
session() << sql, "T_POCO_LOG", now;
|
session() << sql, ExecUtil::pocolog(), now;
|
||||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
session() << sql, ExecUtil::pocolog_a(), now;
|
||||||
|
|
||||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
@ -422,6 +422,7 @@ CppUnit::Test* ODBCMySQLTest::suite()
|
|||||||
|
|
||||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testBareboneODBC);
|
CppUnit_addTest(pSuite, ODBCMySQLTest, testBareboneODBC);
|
||||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testZeroRows);
|
CppUnit_addTest(pSuite, ODBCMySQLTest, testZeroRows);
|
||||||
|
CppUnit_addTest(pSuite, ODBCMySQLTest, testSyntaxError);
|
||||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSimpleAccess);
|
CppUnit_addTest(pSuite, ODBCMySQLTest, testSimpleAccess);
|
||||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testComplexType);
|
CppUnit_addTest(pSuite, ODBCMySQLTest, testComplexType);
|
||||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSimpleAccessVector);
|
CppUnit_addTest(pSuite, ODBCMySQLTest, testSimpleAccessVector);
|
||||||
|
@ -85,11 +85,11 @@ std::string ODBCOracleTest::_connectString = "DRIVER={" ORACLE_ODBC_DRI
|
|||||||
|
|
||||||
const std::string ODBCOracleTest::MULTI_INSERT =
|
const std::string ODBCOracleTest::MULTI_INSERT =
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
"INSERT INTO Test VALUES ('1', 2, 3.5);"
|
"INSERT INTO " + ExecUtil::test_tbl() + " VALUES ('1', 2, 3.5);"
|
||||||
"INSERT INTO Test VALUES ('2', 3, 4.5);"
|
"INSERT INTO " + ExecUtil::test_tbl() + " VALUES ('2', 3, 4.5);"
|
||||||
"INSERT INTO Test VALUES ('3', 4, 5.5);"
|
"INSERT INTO " + ExecUtil::test_tbl() + " VALUES ('3', 4, 5.5);"
|
||||||
"INSERT INTO Test VALUES ('4', 5, 6.5);"
|
"INSERT INTO " + ExecUtil::test_tbl() + " VALUES ('4', 5, 6.5);"
|
||||||
"INSERT INTO Test VALUES ('5', 6, 7.5);"
|
"INSERT INTO " + ExecUtil::test_tbl() + " VALUES ('5', 6, 7.5);"
|
||||||
"END;";
|
"END;";
|
||||||
|
|
||||||
const std::string ODBCOracleTest::MULTI_SELECT =
|
const std::string ODBCOracleTest::MULTI_SELECT =
|
||||||
@ -109,7 +109,7 @@ ODBCOracleTest::~ODBCOracleTest()
|
|||||||
|
|
||||||
void ODBCOracleTest::testBarebone()
|
void ODBCOracleTest::testBarebone()
|
||||||
{
|
{
|
||||||
std::string tableCreateString = "CREATE TABLE Test "
|
std::string tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARCHAR(30),"
|
"Second VARCHAR(30),"
|
||||||
"Third BLOB,"
|
"Third BLOB,"
|
||||||
@ -122,7 +122,7 @@ void ODBCOracleTest::testBarebone()
|
|||||||
_pExecutor->bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
_pExecutor->bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||||
_pExecutor->bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
_pExecutor->bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||||
|
|
||||||
tableCreateString = "CREATE TABLE Test "
|
tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second INTEGER,"
|
"Second INTEGER,"
|
||||||
"Third NUMBER)";
|
"Third NUMBER)";
|
||||||
@ -134,11 +134,11 @@ void ODBCOracleTest::testBarebone()
|
|||||||
"ret4 OUT SYS_REFCURSOR,"
|
"ret4 OUT SYS_REFCURSOR,"
|
||||||
"ret5 OUT SYS_REFCURSOR) IS "
|
"ret5 OUT SYS_REFCURSOR) IS "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
"OPEN ret1 FOR SELECT * FROM Test WHERE First = '1';"
|
"OPEN ret1 FOR SELECT * FROM " + ExecUtil::test_tbl() + " WHERE First = '1';"
|
||||||
"OPEN ret2 FOR SELECT * FROM Test WHERE First = '2';"
|
"OPEN ret2 FOR SELECT * FROM " + ExecUtil::test_tbl() + " WHERE First = '2';"
|
||||||
"OPEN ret3 FOR SELECT * FROM Test WHERE First = '3';"
|
"OPEN ret3 FOR SELECT * FROM " + ExecUtil::test_tbl() + " WHERE First = '3';"
|
||||||
"OPEN ret4 FOR SELECT * FROM Test WHERE First = '4';"
|
"OPEN ret4 FOR SELECT * FROM " + ExecUtil::test_tbl() + " WHERE First = '4';"
|
||||||
"OPEN ret5 FOR SELECT * FROM Test WHERE First = '5';"
|
"OPEN ret5 FOR SELECT * FROM " + ExecUtil::test_tbl() + " WHERE First = '5';"
|
||||||
"END multiResultsProcedure;" , now;
|
"END multiResultsProcedure;" , now;
|
||||||
|
|
||||||
_pExecutor->bareboneODBCMultiResultTest(_connectString,
|
_pExecutor->bareboneODBCMultiResultTest(_connectString,
|
||||||
@ -385,14 +385,14 @@ void ODBCOracleTest::testCursorStoredProcedure()
|
|||||||
people.push_back(Person("Simpson", "Homer", "Springfield", 42));
|
people.push_back(Person("Simpson", "Homer", "Springfield", 42));
|
||||||
people.push_back(Person("Simpson", "Bart", "Springfield", 12));
|
people.push_back(Person("Simpson", "Bart", "Springfield", 12));
|
||||||
people.push_back(Person("Simpson", "Lisa", "Springfield", 10));
|
people.push_back(Person("Simpson", "Lisa", "Springfield", 10));
|
||||||
*_pSession << "INSERT INTO Person VALUES (?, ?, ?, ?)", use(people), now;
|
*_pSession << "INSERT INTO " << ExecUtil::person() << " VALUES (?, ?, ?, ?)", use(people), now;
|
||||||
|
|
||||||
*_pSession << "CREATE OR REPLACE "
|
*_pSession << "CREATE OR REPLACE "
|
||||||
"PROCEDURE storedCursorProcedure(ret OUT SYS_REFCURSOR, ageLimit IN NUMBER) IS "
|
"PROCEDURE storedCursorProcedure(ret OUT SYS_REFCURSOR, ageLimit IN NUMBER) IS "
|
||||||
" BEGIN "
|
" BEGIN "
|
||||||
" OPEN ret FOR "
|
" OPEN ret FOR "
|
||||||
" SELECT * "
|
" SELECT * "
|
||||||
" FROM Person "
|
" FROM " << ExecUtil::person() <<
|
||||||
" WHERE Age < ageLimit "
|
" WHERE Age < ageLimit "
|
||||||
" ORDER BY Age DESC; "
|
" ORDER BY Age DESC; "
|
||||||
" END storedCursorProcedure;" , now;
|
" END storedCursorProcedure;" , now;
|
||||||
@ -413,7 +413,7 @@ void ODBCOracleTest::testCursorStoredProcedure()
|
|||||||
assert (rs["Address"] == "Springfield");
|
assert (rs["Address"] == "Springfield");
|
||||||
assert (rs["Age"] == 12);
|
assert (rs["Age"] == 12);
|
||||||
|
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
dropObject("PROCEDURE", "storedCursorProcedure");
|
dropObject("PROCEDURE", "storedCursorProcedure");
|
||||||
|
|
||||||
k += 2;
|
k += 2;
|
||||||
@ -523,7 +523,7 @@ void ODBCOracleTest::testCursorStoredFunction()
|
|||||||
people.push_back(Person("Simpson", "Homer", "Springfield", 42));
|
people.push_back(Person("Simpson", "Homer", "Springfield", 42));
|
||||||
people.push_back(Person("Simpson", "Bart", "Springfield", 12));
|
people.push_back(Person("Simpson", "Bart", "Springfield", 12));
|
||||||
people.push_back(Person("Simpson", "Lisa", "Springfield", 10));
|
people.push_back(Person("Simpson", "Lisa", "Springfield", 10));
|
||||||
*_pSession << "INSERT INTO Person VALUES (?, ?, ?, ?)", use(people), now;
|
*_pSession << "INSERT INTO " << ExecUtil::person() << " VALUES (?, ?, ?, ?)", use(people), now;
|
||||||
|
|
||||||
*_pSession << "CREATE OR REPLACE "
|
*_pSession << "CREATE OR REPLACE "
|
||||||
"FUNCTION storedCursorFunction(ageLimit IN NUMBER) RETURN SYS_REFCURSOR IS "
|
"FUNCTION storedCursorFunction(ageLimit IN NUMBER) RETURN SYS_REFCURSOR IS "
|
||||||
@ -531,7 +531,7 @@ void ODBCOracleTest::testCursorStoredFunction()
|
|||||||
" BEGIN "
|
" BEGIN "
|
||||||
" OPEN ret FOR "
|
" OPEN ret FOR "
|
||||||
" SELECT * "
|
" SELECT * "
|
||||||
" FROM Person "
|
" FROM " << ExecUtil::person() <<
|
||||||
" WHERE Age < ageLimit "
|
" WHERE Age < ageLimit "
|
||||||
" ORDER BY Age DESC; "
|
" ORDER BY Age DESC; "
|
||||||
" RETURN ret; "
|
" RETURN ret; "
|
||||||
@ -553,7 +553,7 @@ void ODBCOracleTest::testCursorStoredFunction()
|
|||||||
assert (rs["Address"] == "Springfield");
|
assert (rs["Address"] == "Springfield");
|
||||||
assert (rs["Age"] == 12);
|
assert (rs["Age"] == 12);
|
||||||
|
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
dropObject("FUNCTION", "storedCursorFunction");
|
dropObject("FUNCTION", "storedCursorFunction");
|
||||||
|
|
||||||
k += 2;
|
k += 2;
|
||||||
@ -571,9 +571,9 @@ void ODBCOracleTest::testMultipleResults()
|
|||||||
" ret2 OUT SYS_REFCURSOR,"
|
" ret2 OUT SYS_REFCURSOR,"
|
||||||
" ret3 OUT SYS_REFCURSOR) IS "
|
" ret3 OUT SYS_REFCURSOR) IS "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" OPEN ret1 FOR SELECT * FROM Person WHERE Age = paramAge1;"
|
" OPEN ret1 FOR SELECT * FROM " + ExecUtil::person() + " WHERE Age = paramAge1;"
|
||||||
" OPEN ret2 FOR SELECT Age FROM Person WHERE FirstName = 'Bart';"
|
" OPEN ret2 FOR SELECT Age FROM " + ExecUtil::person() + " WHERE FirstName = 'Bart';"
|
||||||
" OPEN ret3 FOR SELECT * FROM Person WHERE Age = paramAge2 OR Age = paramAge3 ORDER BY Age;"
|
" OPEN ret3 FOR SELECT * FROM " + ExecUtil::person() + " WHERE Age = paramAge2 OR Age = paramAge3 ORDER BY Age;"
|
||||||
"END multiResultsProcedure;";
|
"END multiResultsProcedure;";
|
||||||
|
|
||||||
for (int i = 0; i < 8;)
|
for (int i = 0; i < 8;)
|
||||||
@ -598,18 +598,18 @@ void ODBCOracleTest::testAutoTransaction()
|
|||||||
recreateIntsTable();
|
recreateIntsTable();
|
||||||
|
|
||||||
session().setFeature("autoCommit", true);
|
session().setFeature("autoCommit", true);
|
||||||
session() << "INSERT INTO Strings VALUES (1)", now;
|
session() << "INSERT INTO " << ExecUtil::strings() << " VALUES (1)", now;
|
||||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
localSession << "SELECT count(*) FROM " << ExecUtil::person() , into(count), now;
|
||||||
assert (1 == count);
|
assert (1 == count);
|
||||||
session() << "INSERT INTO Strings VALUES (2)", now;
|
session() << "INSERT INTO " << ExecUtil::strings() << " VALUES (2)", now;
|
||||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
localSession << "SELECT count(*) FROM " << ExecUtil::strings(), into(count), now;
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
session() << "INSERT INTO Strings VALUES (3)", now;
|
session() << "INSERT INTO " << ExecUtil::strings() << " VALUES (3)", now;
|
||||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
localSession << "SELECT count(*) FROM " << ExecUtil::strings(), into(count), now;
|
||||||
assert (3 == count);
|
assert (3 == count);
|
||||||
|
|
||||||
session() << "DELETE FROM Strings", now;
|
session() << "DELETE FROM " << ExecUtil::strings(), now;
|
||||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
localSession << "SELECT count(*) FROM " << ExecUtil::strings(), into(count), now;
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
|
|
||||||
session().setFeature("autoCommit", false);
|
session().setFeature("autoCommit", false);
|
||||||
@ -617,26 +617,26 @@ void ODBCOracleTest::testAutoTransaction()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
AutoTransaction at(session());
|
AutoTransaction at(session());
|
||||||
session() << "INSERT INTO Strings VALUES (1)", now;
|
session() << "INSERT INTO " << ExecUtil::strings() << " VALUES (1)", now;
|
||||||
session() << "INSERT INTO Strings VALUES (2)", now;
|
session() << "INSERT INTO " << ExecUtil::strings() << " VALUES (2)", now;
|
||||||
session() << "BAD QUERY", now;
|
session() << "BAD QUERY", now;
|
||||||
} catch (Poco::Exception&) {}
|
} catch (Poco::Exception&) {}
|
||||||
|
|
||||||
session() << "SELECT count(*) FROM Strings", into(count), now;
|
session() << "SELECT count(*) FROM " << ExecUtil::strings(), into(count), now;
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
|
|
||||||
AutoTransaction at(session());
|
AutoTransaction at(session());
|
||||||
|
|
||||||
session() << "INSERT INTO Strings VALUES (1)", now;
|
session() << "INSERT INTO " << ExecUtil::strings() << " VALUES (1)", now;
|
||||||
session() << "INSERT INTO Strings VALUES (2)", now;
|
session() << "INSERT INTO " << ExecUtil::strings() << " VALUES (2)", now;
|
||||||
session() << "INSERT INTO Strings VALUES (3)", now;
|
session() << "INSERT INTO " << ExecUtil::strings() << " VALUES (3)", now;
|
||||||
|
|
||||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
localSession << "SELECT count(*) FROM " << ExecUtil::strings(), into(count), now;
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
|
|
||||||
at.commit();
|
at.commit();
|
||||||
|
|
||||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
localSession << "SELECT count(*) FROM " << ExecUtil::strings(), into(count), now;
|
||||||
assert (3 == count);
|
assert (3 == count);
|
||||||
|
|
||||||
session().setFeature("autoCommit", ac);
|
session().setFeature("autoCommit", ac);
|
||||||
@ -671,8 +671,8 @@ void ODBCOracleTest::dropObject(const std::string& type, const std::string& name
|
|||||||
|
|
||||||
void ODBCOracleTest::recreateNullableTable()
|
void ODBCOracleTest::recreateNullableTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullableTest");
|
dropObject("TABLE", ExecUtil::nullabletest());
|
||||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR2(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat NUMBER NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::nullabletest() << " (EmptyString VARCHAR2(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat NUMBER NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -680,8 +680,8 @@ void ODBCOracleTest::recreateNullableTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreatePersonTable()
|
void ODBCOracleTest::recreatePersonTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR2(30), FirstName VARCHAR2(30), Address VARCHAR2(30), Age INTEGER)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR2(30), FirstName VARCHAR2(30), Address VARCHAR2(30), Age INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -689,8 +689,8 @@ void ODBCOracleTest::recreatePersonTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreatePersonTupleTable()
|
void ODBCOracleTest::recreatePersonTupleTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName1 VARCHAR2(30), FirstName1 VARCHAR2(30), Address1 VARCHAR2(30), Age1 INTEGER,"
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName1 VARCHAR2(30), FirstName1 VARCHAR2(30), Address1 VARCHAR2(30), Age1 INTEGER,"
|
||||||
"LastName2 VARCHAR2(30), FirstName2 VARCHAR2(30), Address2 VARCHAR2(30), Age2 INTEGER)", now; }
|
"LastName2 VARCHAR2(30), FirstName2 VARCHAR2(30), Address2 VARCHAR2(30), Age2 INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTupleTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTupleTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTupleTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTupleTable()"); }
|
||||||
@ -699,8 +699,8 @@ void ODBCOracleTest::recreatePersonTupleTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreatePersonBLOBTable()
|
void ODBCOracleTest::recreatePersonBLOBTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
}
|
}
|
||||||
@ -708,8 +708,8 @@ void ODBCOracleTest::recreatePersonBLOBTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreatePersonDateTimeTable()
|
void ODBCOracleTest::recreatePersonDateTimeTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
}
|
}
|
||||||
@ -717,8 +717,8 @@ void ODBCOracleTest::recreatePersonDateTimeTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreatePersonDateTable()
|
void ODBCOracleTest::recreatePersonDateTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||||
}
|
}
|
||||||
@ -726,8 +726,8 @@ void ODBCOracleTest::recreatePersonDateTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreateIntsTable()
|
void ODBCOracleTest::recreateIntsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { *_pSession << "CREATE TABLE Strings (str INTEGER)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::strings() <<" (str INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
}
|
}
|
||||||
@ -735,8 +735,8 @@ void ODBCOracleTest::recreateIntsTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreateStringsTable()
|
void ODBCOracleTest::recreateStringsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { *_pSession << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::strings() <<" (str VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
}
|
}
|
||||||
@ -744,8 +744,8 @@ void ODBCOracleTest::recreateStringsTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreateFloatsTable()
|
void ODBCOracleTest::recreateFloatsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { *_pSession << "CREATE TABLE Strings (str NUMBER)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::strings() <<" (str NUMBER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
}
|
}
|
||||||
@ -753,8 +753,8 @@ void ODBCOracleTest::recreateFloatsTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreateTuplesTable()
|
void ODBCOracleTest::recreateTuplesTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Tuples");
|
dropObject("TABLE", ExecUtil::tuples());
|
||||||
try { *_pSession << "CREATE TABLE Tuples "
|
try { *_pSession << "CREATE TABLE " << ExecUtil::tuples() <<
|
||||||
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||||
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||||
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
||||||
@ -765,8 +765,8 @@ void ODBCOracleTest::recreateTuplesTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreateVectorsTable()
|
void ODBCOracleTest::recreateVectorsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Vectors");
|
dropObject("TABLE", ExecUtil::vectors());
|
||||||
try { *_pSession << "CREATE TABLE Vectors (int0 INTEGER, flt0 NUMBER(5,2), str0 VARCHAR(30))", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::vectors() << " (int0 INTEGER, flt0 NUMBER(5,2), str0 VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
}
|
}
|
||||||
@ -774,8 +774,8 @@ void ODBCOracleTest::recreateVectorsTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreateAnysTable()
|
void ODBCOracleTest::recreateAnysTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Anys");
|
dropObject("TABLE", ExecUtil::anys() );
|
||||||
try { *_pSession << "CREATE TABLE Anys (int0 INTEGER, flt0 NUMBER, str0 VARCHAR(30))", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::anys() << " (int0 INTEGER, flt0 NUMBER, str0 VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
}
|
}
|
||||||
@ -783,8 +783,8 @@ void ODBCOracleTest::recreateAnysTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreateNullsTable(const std::string& notNull)
|
void ODBCOracleTest::recreateNullsTable(const std::string& notNull)
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullTest");
|
dropObject("TABLE", ExecUtil::nulltest());
|
||||||
try { *_pSession << format("CREATE TABLE NullTest (i INTEGER %s, r NUMBER %s, v VARCHAR(30) %s)",
|
try { *_pSession << format("CREATE TABLE %s (i INTEGER %s, r NUMBER %s, v VARCHAR(30) %s)",ExecUtil::nulltest(),
|
||||||
notNull,
|
notNull,
|
||||||
notNull,
|
notNull,
|
||||||
notNull), now; }
|
notNull), now; }
|
||||||
@ -795,10 +795,10 @@ void ODBCOracleTest::recreateNullsTable(const std::string& notNull)
|
|||||||
|
|
||||||
void ODBCOracleTest::recreateMiscTable()
|
void ODBCOracleTest::recreateMiscTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "MiscTest");
|
dropObject("TABLE", ExecUtil::misctest());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "CREATE TABLE MiscTest "
|
session() << "CREATE TABLE " << ExecUtil::misctest() <<
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second BLOB,"
|
"Second BLOB,"
|
||||||
"Third INTEGER,"
|
"Third INTEGER,"
|
||||||
@ -811,8 +811,8 @@ void ODBCOracleTest::recreateMiscTable()
|
|||||||
|
|
||||||
void ODBCOracleTest::recreateLogTable()
|
void ODBCOracleTest::recreateLogTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "T_POCO_LOG");
|
dropObject("TABLE", ExecUtil::pocolog());;
|
||||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
dropObject("TABLE", ExecUtil::pocolog_a());;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -826,8 +826,8 @@ void ODBCOracleTest::recreateLogTable()
|
|||||||
"Text VARCHAR(100),"
|
"Text VARCHAR(100),"
|
||||||
"DateTime TIMESTAMP)";
|
"DateTime TIMESTAMP)";
|
||||||
|
|
||||||
session() << sql, "T_POCO_LOG", now;
|
session() << sql, ExecUtil::pocolog(), now;
|
||||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
session() << sql, ExecUtil::pocolog_a(), now;
|
||||||
|
|
||||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
@ -857,6 +857,7 @@ CppUnit::Test* ODBCOracleTest::suite()
|
|||||||
|
|
||||||
CppUnit_addTest(pSuite, ODBCOracleTest, testBareboneODBC);
|
CppUnit_addTest(pSuite, ODBCOracleTest, testBareboneODBC);
|
||||||
CppUnit_addTest(pSuite, ODBCOracleTest, testZeroRows);
|
CppUnit_addTest(pSuite, ODBCOracleTest, testZeroRows);
|
||||||
|
CppUnit_addTest(pSuite, ODBCOracleTest, testSyntaxError);
|
||||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSimpleAccess);
|
CppUnit_addTest(pSuite, ODBCOracleTest, testSimpleAccess);
|
||||||
CppUnit_addTest(pSuite, ODBCOracleTest, testComplexType);
|
CppUnit_addTest(pSuite, ODBCOracleTest, testComplexType);
|
||||||
CppUnit_addTest(pSuite, ODBCOracleTest, testComplexTypeTuple);
|
CppUnit_addTest(pSuite, ODBCOracleTest, testComplexTypeTuple);
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||||
#include "Poco/Data/ODBC/ODBCException.h"
|
#include "Poco/Data/ODBC/ODBCException.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include "Poco/Environment.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace Poco::Data::Keywords;
|
using namespace Poco::Data::Keywords;
|
||||||
@ -58,12 +59,42 @@ using Poco::DateTime;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define POSTGRESQL_SERVER POCO_ODBC_TEST_DATABASE_SERVER
|
#define POSTGRESQL_SERVER POCO_ODBC_TEST_DATABASE_SERVER
|
||||||
#define POSTGRESQL_PORT "5432"
|
|
||||||
#define POSTGRESQL_DB "postgres"
|
static std::string postgreSchema()
|
||||||
#define POSTGRESQL_UID "postgres"
|
{
|
||||||
#define POSTGRESQL_PWD "postgres"
|
return Poco::Environment::get("POCO_TEST_POSTGRES_SCHEMA", "public");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static std::string postgreDriver()
|
||||||
|
{
|
||||||
|
return Poco::Environment::get("POCO_TEST_POSTGRES_DRIVER", POSTGRESQL_ODBC_DRIVER);
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string postgreSettings()
|
||||||
|
{
|
||||||
|
return Poco::Environment::get("POCO_TEST_POSTGRES_SETTINGS", "");
|
||||||
|
}
|
||||||
|
|
||||||
#define POSTGRESQL_VERSION "9.3"
|
#define POSTGRESQL_VERSION "9.3"
|
||||||
|
|
||||||
|
static std::string postgreConnParams()
|
||||||
|
{
|
||||||
|
return Poco::Environment::get("POCO_TEST_POSTGRES_CONN", "DATABASE=postgres;"
|
||||||
|
"SERVER=postgres;"
|
||||||
|
"PORT=5432;");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string postgreUid()
|
||||||
|
{
|
||||||
|
return Poco::Environment::get("POCO_TEST_POSTGRES_UID", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string postgrePwd()
|
||||||
|
{
|
||||||
|
return Poco::Environment::get("POCO_TEST_POSTGRES_PWD", "");
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||||
const std::string ODBCPostgreSQLTest::_libDir = "C:\\\\Program Files\\\\PostgreSQL\\\\" POSTGRESQL_VERSION "\\\\lib\\\\";
|
const std::string ODBCPostgreSQLTest::_libDir = "C:\\\\Program Files\\\\PostgreSQL\\\\" POSTGRESQL_VERSION "\\\\lib\\\\";
|
||||||
#else
|
#else
|
||||||
@ -73,17 +104,15 @@ const std::string ODBCPostgreSQLTest::_libDir = "/usr/local/pgsql/lib/";
|
|||||||
|
|
||||||
ODBCTest::SessionPtr ODBCPostgreSQLTest::_pSession;
|
ODBCTest::SessionPtr ODBCPostgreSQLTest::_pSession;
|
||||||
ODBCTest::ExecPtr ODBCPostgreSQLTest::_pExecutor;
|
ODBCTest::ExecPtr ODBCPostgreSQLTest::_pExecutor;
|
||||||
std::string ODBCPostgreSQLTest::_driver = POSTGRESQL_ODBC_DRIVER;
|
std::string ODBCPostgreSQLTest::_driver = postgreDriver();
|
||||||
std::string ODBCPostgreSQLTest::_dsn = POSTGRESQL_DSN;
|
std::string ODBCPostgreSQLTest::_dsn = POSTGRESQL_DSN;
|
||||||
std::string ODBCPostgreSQLTest::_uid = POSTGRESQL_UID;
|
std::string ODBCPostgreSQLTest::_uid = postgreUid();
|
||||||
std::string ODBCPostgreSQLTest::_pwd = POSTGRESQL_PWD;
|
std::string ODBCPostgreSQLTest::_pwd = postgrePwd();
|
||||||
std::string ODBCPostgreSQLTest::_connectString =
|
std::string ODBCPostgreSQLTest::_connectString =
|
||||||
"DRIVER=" POSTGRESQL_ODBC_DRIVER ";"
|
"DRIVER=" + postgreDriver() + ";"
|
||||||
"DATABASE=" POSTGRESQL_DB ";"
|
+ postgreConnParams() + ";" +
|
||||||
"SERVER=" POSTGRESQL_SERVER ";"
|
"UID=" + postgreUid() + ";"
|
||||||
"PORT=" POSTGRESQL_PORT ";"
|
"PWD=" + postgrePwd() + ";"
|
||||||
"UID=" POSTGRESQL_UID ";"
|
|
||||||
"PWD=" POSTGRESQL_PWD ";"
|
|
||||||
"SSLMODE=prefer;"
|
"SSLMODE=prefer;"
|
||||||
"LowerCaseIdentifier=0;"
|
"LowerCaseIdentifier=0;"
|
||||||
"UseServerSidePrepare=0;"
|
"UseServerSidePrepare=0;"
|
||||||
@ -108,7 +137,7 @@ std::string ODBCPostgreSQLTest::_connectString =
|
|||||||
"UnknownSizes=0;"
|
"UnknownSizes=0;"
|
||||||
"Socket=8192;"
|
"Socket=8192;"
|
||||||
"Fetch=100;"
|
"Fetch=100;"
|
||||||
"ConnSettings=;"
|
"ConnSettings=" + postgreSettings() + ";"
|
||||||
"ShowSystemTables=0;"
|
"ShowSystemTables=0;"
|
||||||
"RowVersioning=0;"
|
"RowVersioning=0;"
|
||||||
"ShowOidColumn=0;"
|
"ShowOidColumn=0;"
|
||||||
@ -129,7 +158,7 @@ ODBCPostgreSQLTest::~ODBCPostgreSQLTest()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::testBareboneODBC()
|
void ODBCPostgreSQLTest::testBareboneODBC()
|
||||||
{
|
{
|
||||||
std::string tableCreateString = "CREATE TABLE Test "
|
std::string tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARCHAR(30),"
|
"Second VARCHAR(30),"
|
||||||
"Third BYTEA,"
|
"Third BYTEA,"
|
||||||
@ -142,7 +171,7 @@ void ODBCPostgreSQLTest::testBareboneODBC()
|
|||||||
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||||
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||||
|
|
||||||
tableCreateString = "CREATE TABLE Test "
|
tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARCHAR(30),"
|
"Second VARCHAR(30),"
|
||||||
"Third BYTEA,"
|
"Third BYTEA,"
|
||||||
@ -157,7 +186,7 @@ void ODBCPostgreSQLTest::testBareboneODBC()
|
|||||||
|
|
||||||
//neither pSQL ODBC nor Mammoth drivers support multiple results properly
|
//neither pSQL ODBC nor Mammoth drivers support multiple results properly
|
||||||
/*
|
/*
|
||||||
tableCreateString = "CREATE TABLE Test "
|
tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second INTEGER,"
|
"Second INTEGER,"
|
||||||
"Third FLOAT)";
|
"Third FLOAT)";
|
||||||
@ -201,17 +230,18 @@ void ODBCPostgreSQLTest::testStoredFunction()
|
|||||||
{
|
{
|
||||||
configurePLPgSQL();
|
configurePLPgSQL();
|
||||||
|
|
||||||
std::string func("testStoredFunction()");
|
const std::string func("testStoredFunction()");
|
||||||
|
const std::string nm = ExecUtil::stored_func();
|
||||||
|
|
||||||
for (int k = 0; k < 8;)
|
for (int k = 0; k < 8;)
|
||||||
{
|
{
|
||||||
session().setFeature("autoBind", bindValue(k));
|
session().setFeature("autoBind", bindValue(k));
|
||||||
session().setFeature("autoExtract", bindValue(k+1));
|
session().setFeature("autoExtract", bindValue(k+1));
|
||||||
|
|
||||||
dropObject("FUNCTION", "storedFunction()");
|
dropObject("FUNCTION", nm + "()");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "CREATE FUNCTION storedFunction() RETURNS INTEGER AS '"
|
session() << "CREATE FUNCTION " << nm << "() RETURNS INTEGER AS '"
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" return -1; "
|
" return -1; "
|
||||||
"END;'"
|
"END;'"
|
||||||
@ -221,13 +251,13 @@ void ODBCPostgreSQLTest::testStoredFunction()
|
|||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (func); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (func); }
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
session() << "{? = call storedFunction()}", out(i), now;
|
session() << "{? = call "<< nm << "()}", out(i), now;
|
||||||
assert(-1 == i);
|
assert(-1 == i);
|
||||||
dropObject("FUNCTION", "storedFunction()");
|
dropObject("FUNCTION", nm + "(INTEGER)");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "CREATE FUNCTION storedFunction(INTEGER) RETURNS INTEGER AS '"
|
session() << "CREATE FUNCTION " << nm << "(INTEGER) RETURNS INTEGER AS '"
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" RETURN $1 * $1; "
|
" RETURN $1 * $1; "
|
||||||
"END;'"
|
"END;'"
|
||||||
@ -238,14 +268,14 @@ void ODBCPostgreSQLTest::testStoredFunction()
|
|||||||
|
|
||||||
i = 2;
|
i = 2;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
session() << "{? = call storedFunction(?)}", out(result), in(i), now;
|
session() << "{? = call " << nm << "(?)}", out(result), in(i), now;
|
||||||
assert(4 == result);
|
assert(4 == result);
|
||||||
dropObject("FUNCTION", "storedFunction(INTEGER)");
|
dropObject("FUNCTION", nm + "(INTEGER)");
|
||||||
|
|
||||||
dropObject("FUNCTION", "storedFunction(TIMESTAMP)");
|
dropObject("FUNCTION", nm + "(TIMESTAMP)");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "CREATE FUNCTION storedFunction(TIMESTAMP) RETURNS TIMESTAMP AS '"
|
session() << "CREATE FUNCTION " << nm << "(TIMESTAMP) RETURNS TIMESTAMP AS '"
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" RETURN $1; "
|
" RETURN $1; "
|
||||||
"END;'"
|
"END;'"
|
||||||
@ -256,14 +286,14 @@ void ODBCPostgreSQLTest::testStoredFunction()
|
|||||||
|
|
||||||
DateTime dtIn(1965, 6, 18, 5, 35, 1);
|
DateTime dtIn(1965, 6, 18, 5, 35, 1);
|
||||||
DateTime dtOut;
|
DateTime dtOut;
|
||||||
session() << "{? = call storedFunction(?)}", out(dtOut), in(dtIn), now;
|
session() << "{? = call " << nm << "(?)}", out(dtOut), in(dtIn), now;
|
||||||
assert(dtOut == dtIn);
|
assert(dtOut == dtIn);
|
||||||
dropObject("FUNCTION", "storedFunction(TIMESTAMP)");
|
dropObject("FUNCTION", nm + "(TIMESTAMP)");
|
||||||
|
|
||||||
dropObject("FUNCTION", "storedFunction(TEXT, TEXT)");
|
dropObject("FUNCTION", nm + "(TEXT, TEXT)");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "CREATE FUNCTION storedFunction(TEXT,TEXT) RETURNS TEXT AS '"
|
session() << "CREATE FUNCTION " << nm << "(TEXT,TEXT) RETURNS TEXT AS '"
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" RETURN $1 || '', '' || $2 || ''!'';"
|
" RETURN $1 || '', '' || $2 || ''!'';"
|
||||||
"END;'"
|
"END;'"
|
||||||
@ -277,13 +307,13 @@ void ODBCPostgreSQLTest::testStoredFunction()
|
|||||||
std::string ret;
|
std::string ret;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "{? = call storedFunction(?,?)}", out(ret), in(param1), in(param2), now;
|
session() << "{? = call " << nm << "(?,?)}", out(ret), in(param1), in(param2), now;
|
||||||
}
|
}
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (func); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (func); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (func); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (func); }
|
||||||
|
|
||||||
assert(ret == "Hello, world!");
|
assert(ret == "Hello, world!");
|
||||||
dropObject("FUNCTION", "storedFunction(TEXT, TEXT)");
|
dropObject("FUNCTION", nm + "(TEXT, TEXT)");
|
||||||
|
|
||||||
k += 2;
|
k += 2;
|
||||||
}
|
}
|
||||||
@ -292,7 +322,10 @@ void ODBCPostgreSQLTest::testStoredFunction()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::testStoredFunctionAny()
|
void ODBCPostgreSQLTest::testStoredFunctionAny()
|
||||||
{
|
{
|
||||||
session() << "CREATE FUNCTION storedFunction(INTEGER) RETURNS INTEGER AS '"
|
const std::string nm = ExecUtil::stored_func();
|
||||||
|
|
||||||
|
dropObject("FUNCTION", nm + "(INTEGER)");
|
||||||
|
session() << "CREATE FUNCTION "<< nm << "(INTEGER) RETURNS INTEGER AS '"
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" RETURN $1 * $1; "
|
" RETURN $1 * $1; "
|
||||||
"END;'"
|
"END;'"
|
||||||
@ -305,19 +338,23 @@ void ODBCPostgreSQLTest::testStoredFunctionAny()
|
|||||||
|
|
||||||
Any i = 2;
|
Any i = 2;
|
||||||
Any result = 0;
|
Any result = 0;
|
||||||
session() << "{? = call storedFunction(?)}", out(result), in(i), now;
|
session() << "{? = call " << nm << "(?)}", out(result), in(i), now;
|
||||||
assert(4 == AnyCast<int>(result));
|
assert(4 == AnyCast<int>(result));
|
||||||
|
|
||||||
k += 2;
|
k += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
dropObject("FUNCTION", "storedFunction(INTEGER)");
|
dropObject("FUNCTION", nm + "(INTEGER)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ODBCPostgreSQLTest::testStoredFunctionDynamicAny()
|
void ODBCPostgreSQLTest::testStoredFunctionDynamicAny()
|
||||||
{
|
{
|
||||||
session() << "CREATE FUNCTION storedFunction(INTEGER) RETURNS INTEGER AS '"
|
const std::string nm = ExecUtil::stored_func();
|
||||||
|
|
||||||
|
dropObject("FUNCTION", nm + "(INTEGER)");
|
||||||
|
|
||||||
|
session() << "CREATE FUNCTION " << nm << "(INTEGER) RETURNS INTEGER AS '"
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" RETURN $1 * $1; "
|
" RETURN $1 * $1; "
|
||||||
"END;'"
|
"END;'"
|
||||||
@ -330,13 +367,13 @@ void ODBCPostgreSQLTest::testStoredFunctionDynamicAny()
|
|||||||
|
|
||||||
DynamicAny i = 2;
|
DynamicAny i = 2;
|
||||||
DynamicAny result = 0;
|
DynamicAny result = 0;
|
||||||
session() << "{? = call storedFunction(?)}", out(result), in(i), now;
|
session() << "{? = call " << nm << "(?)}", out(result), in(i), now;
|
||||||
assert(4 == result);
|
assert(4 == result);
|
||||||
|
|
||||||
k += 2;
|
k += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
dropObject("FUNCTION", "storedFunction(INTEGER)");
|
dropObject("FUNCTION", nm + "(INTEGER)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -390,8 +427,8 @@ void ODBCPostgreSQLTest::dropObject(const std::string& type, const std::string&
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreateNullableTable()
|
void ODBCPostgreSQLTest::recreateNullableTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullableTest");
|
dropObject("TABLE", ExecUtil::nullabletest());
|
||||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
try { *_pSession << "CREATE TABLE "<< ExecUtil::nullabletest() << " (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -399,8 +436,8 @@ void ODBCPostgreSQLTest::recreateNullableTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreatePersonTable()
|
void ODBCPostgreSQLTest::recreatePersonTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -408,8 +445,8 @@ void ODBCPostgreSQLTest::recreatePersonTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreatePersonBLOBTable()
|
void ODBCPostgreSQLTest::recreatePersonBLOBTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BYTEA)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BYTEA)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
}
|
}
|
||||||
@ -418,8 +455,8 @@ void ODBCPostgreSQLTest::recreatePersonBLOBTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreatePersonDateTimeTable()
|
void ODBCPostgreSQLTest::recreatePersonDateTimeTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
}
|
}
|
||||||
@ -427,8 +464,8 @@ void ODBCPostgreSQLTest::recreatePersonDateTimeTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreatePersonDateTable()
|
void ODBCPostgreSQLTest::recreatePersonDateTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||||
}
|
}
|
||||||
@ -436,8 +473,8 @@ void ODBCPostgreSQLTest::recreatePersonDateTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreatePersonTimeTable()
|
void ODBCPostgreSQLTest::recreatePersonTimeTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornTime TIME)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornTime TIME)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||||
}
|
}
|
||||||
@ -445,8 +482,8 @@ void ODBCPostgreSQLTest::recreatePersonTimeTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreateIntsTable()
|
void ODBCPostgreSQLTest::recreateIntsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { session() << "CREATE TABLE Strings (str INTEGER)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() <<" (str INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
}
|
}
|
||||||
@ -454,8 +491,8 @@ void ODBCPostgreSQLTest::recreateIntsTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreateStringsTable()
|
void ODBCPostgreSQLTest::recreateStringsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { session() << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() <<" (str VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
}
|
}
|
||||||
@ -463,8 +500,8 @@ void ODBCPostgreSQLTest::recreateStringsTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreateFloatsTable()
|
void ODBCPostgreSQLTest::recreateFloatsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { session() << "CREATE TABLE Strings (str FLOAT)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() <<" (str FLOAT)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
}
|
}
|
||||||
@ -472,8 +509,8 @@ void ODBCPostgreSQLTest::recreateFloatsTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreateTuplesTable()
|
void ODBCPostgreSQLTest::recreateTuplesTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Tuples");
|
dropObject("TABLE", ExecUtil::tuples());
|
||||||
try { session() << "CREATE TABLE Tuples "
|
try { session() << "CREATE TABLE " << ExecUtil::tuples() <<
|
||||||
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||||
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||||
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
||||||
@ -484,8 +521,8 @@ void ODBCPostgreSQLTest::recreateTuplesTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreateVectorsTable()
|
void ODBCPostgreSQLTest::recreateVectorsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Vectors");
|
dropObject("TABLE", ExecUtil::vectors());
|
||||||
try { session() << "CREATE TABLE Vectors (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::vectors() << " (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
}
|
}
|
||||||
@ -493,8 +530,8 @@ void ODBCPostgreSQLTest::recreateVectorsTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreateAnysTable()
|
void ODBCPostgreSQLTest::recreateAnysTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Anys");
|
dropObject("TABLE", ExecUtil::anys() );
|
||||||
try { session() << "CREATE TABLE Anys (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::anys() << " (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
}
|
}
|
||||||
@ -502,8 +539,8 @@ void ODBCPostgreSQLTest::recreateAnysTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreateNullsTable(const std::string& notNull)
|
void ODBCPostgreSQLTest::recreateNullsTable(const std::string& notNull)
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullTest");
|
dropObject("TABLE", ExecUtil::nulltest());
|
||||||
try { session() << format("CREATE TABLE NullTest (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)",
|
try { session() << format("CREATE TABLE %s (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)",ExecUtil::nulltest(),
|
||||||
notNull,
|
notNull,
|
||||||
notNull,
|
notNull,
|
||||||
notNull), now; }
|
notNull), now; }
|
||||||
@ -523,11 +560,11 @@ void ODBCPostgreSQLTest::recreateBoolTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreateMiscTable()
|
void ODBCPostgreSQLTest::recreateMiscTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "MiscTest");
|
dropObject("TABLE", ExecUtil::misctest());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Mammoth does not bind columns properly
|
// Mammoth does not bind columns properly
|
||||||
session() << "CREATE TABLE MiscTest "
|
session() << "CREATE TABLE "<< ExecUtil::misctest() <<
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second BYTEA,"
|
"Second BYTEA,"
|
||||||
"Third INTEGER,"
|
"Third INTEGER,"
|
||||||
@ -540,8 +577,8 @@ void ODBCPostgreSQLTest::recreateMiscTable()
|
|||||||
|
|
||||||
void ODBCPostgreSQLTest::recreateLogTable()
|
void ODBCPostgreSQLTest::recreateLogTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "T_POCO_LOG");
|
dropObject("TABLE", ExecUtil::pocolog());;
|
||||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
dropObject("TABLE", ExecUtil::pocolog_a());;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -555,8 +592,8 @@ void ODBCPostgreSQLTest::recreateLogTable()
|
|||||||
"Text VARCHAR,"
|
"Text VARCHAR,"
|
||||||
"DateTime TIMESTAMP)";
|
"DateTime TIMESTAMP)";
|
||||||
|
|
||||||
session() << sql, "T_POCO_LOG", now;
|
session() << sql, ExecUtil::pocolog(), now;
|
||||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
session() << sql, ExecUtil::pocolog_a(), now;
|
||||||
|
|
||||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
@ -580,12 +617,20 @@ CppUnit::Test* ODBCPostgreSQLTest::suite()
|
|||||||
{
|
{
|
||||||
std::cout << "*** Connected to [" << _driver << "] test database." << std::endl;
|
std::cout << "*** Connected to [" << _driver << "] test database." << std::endl;
|
||||||
|
|
||||||
_pExecutor = new SQLExecutor(_driver + " SQL Executor", _pSession);
|
std::string initSql;
|
||||||
|
if (!postgreSchema().empty())
|
||||||
|
{
|
||||||
|
initSql = "SET search_path TO " + postgreSchema() + (postgreSchema() != std::string("public") ? ", public;" : ";");
|
||||||
|
(*_pSession) << initSql, now;
|
||||||
|
}
|
||||||
|
|
||||||
|
_pExecutor = new SQLExecutor(_driver + " SQL Executor", _pSession, initSql, postgreSchema());
|
||||||
|
|
||||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ODBCPostgreSQLTest");
|
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ODBCPostgreSQLTest");
|
||||||
|
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testBareboneODBC);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testBareboneODBC);
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testZeroRows);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testZeroRows);
|
||||||
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSyntaxError);
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSimpleAccess);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSimpleAccess);
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testComplexType);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testComplexType);
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSimpleAccessVector);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSimpleAccessVector);
|
||||||
@ -668,7 +713,8 @@ CppUnit::Test* ODBCPostgreSQLTest::suite()
|
|||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testAny);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testAny);
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testDynamicAny);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testDynamicAny);
|
||||||
//neither pSQL ODBC nor Mammoth drivers support multiple results properly
|
//neither pSQL ODBC nor Mammoth drivers support multiple results properly
|
||||||
//CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testMultipleResults);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testMultipleResults);
|
||||||
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testMultipleResultsNoProj);
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSQLChannel);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSQLChannel);
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSQLLogger);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSQLLogger);
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSessionTransaction);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSessionTransaction);
|
||||||
@ -677,6 +723,7 @@ CppUnit::Test* ODBCPostgreSQLTest::suite()
|
|||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testNullable);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testNullable);
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testUnicode);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testUnicode);
|
||||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testReconnect);
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testReconnect);
|
||||||
|
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInsertStatReuse);
|
||||||
|
|
||||||
return pSuite;
|
return pSuite;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ ODBCSQLServerTest::~ODBCSQLServerTest()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::testBareboneODBC()
|
void ODBCSQLServerTest::testBareboneODBC()
|
||||||
{
|
{
|
||||||
std::string tableCreateString = "CREATE TABLE Test "
|
std::string tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARCHAR(30),"
|
"Second VARCHAR(30),"
|
||||||
"Third VARBINARY(30),"
|
"Third VARBINARY(30),"
|
||||||
@ -138,7 +138,7 @@ void ODBCSQLServerTest::testBareboneODBC()
|
|||||||
executor().bareboneODBCTest(dbConnString(), tableCreateString,
|
executor().bareboneODBCTest(dbConnString(), tableCreateString,
|
||||||
SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND, true, "CONVERT(VARBINARY(30),?)");
|
SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND, true, "CONVERT(VARBINARY(30),?)");
|
||||||
|
|
||||||
tableCreateString = "CREATE TABLE Test "
|
tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second INTEGER,"
|
"Second INTEGER,"
|
||||||
"Third FLOAT)";
|
"Third FLOAT)";
|
||||||
@ -334,13 +334,13 @@ void ODBCSQLServerTest::testCursorStoredProcedure()
|
|||||||
people.push_back(Person("Simpson", "Homer", "Springfield", 42));
|
people.push_back(Person("Simpson", "Homer", "Springfield", 42));
|
||||||
people.push_back(Person("Simpson", "Bart", "Springfield", 12));
|
people.push_back(Person("Simpson", "Bart", "Springfield", 12));
|
||||||
people.push_back(Person("Simpson", "Lisa", "Springfield", 10));
|
people.push_back(Person("Simpson", "Lisa", "Springfield", 10));
|
||||||
session() << "INSERT INTO Person VALUES (?, ?, ?, ?)", use(people), now;
|
session() << "INSERT INTO " << ExecUtil::person() << " VALUES (?, ?, ?, ?)", use(people), now;
|
||||||
|
|
||||||
dropObject("PROCEDURE", "storedCursorProcedure");
|
dropObject("PROCEDURE", "storedCursorProcedure");
|
||||||
session() << "CREATE PROCEDURE storedCursorProcedure(@ageLimit int) AS "
|
session() << "CREATE PROCEDURE storedCursorProcedure(@ageLimit int) AS "
|
||||||
"BEGIN "
|
"BEGIN "
|
||||||
" SELECT * "
|
" SELECT * "
|
||||||
" FROM Person "
|
" FROM " << ExecUtil::person() <<
|
||||||
" WHERE Age < @ageLimit "
|
" WHERE Age < @ageLimit "
|
||||||
" ORDER BY Age DESC; "
|
" ORDER BY Age DESC; "
|
||||||
"END;"
|
"END;"
|
||||||
@ -362,7 +362,7 @@ void ODBCSQLServerTest::testCursorStoredProcedure()
|
|||||||
assert (rs["Address"] == "Springfield");
|
assert (rs["Address"] == "Springfield");
|
||||||
assert (rs["Age"] == 12);
|
assert (rs["Age"] == 12);
|
||||||
|
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
dropObject("PROCEDURE", "storedCursorProcedure");
|
dropObject("PROCEDURE", "storedCursorProcedure");
|
||||||
|
|
||||||
k += 2;
|
k += 2;
|
||||||
@ -553,8 +553,8 @@ void ODBCSQLServerTest::dropObject(const std::string& type, const std::string& n
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreateNullableTable()
|
void ODBCSQLServerTest::recreateNullableTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullableTest");
|
dropObject("TABLE", ExecUtil::nullabletest());
|
||||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime DATETIME NULL)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::nullabletest() << " (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime DATETIME NULL)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -562,8 +562,8 @@ void ODBCSQLServerTest::recreateNullableTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreatePersonTable()
|
void ODBCSQLServerTest::recreatePersonTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -571,8 +571,8 @@ void ODBCSQLServerTest::recreatePersonTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreatePersonBLOBTable()
|
void ODBCSQLServerTest::recreatePersonBLOBTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image VARBINARY(MAX))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image VARBINARY(MAX))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
}
|
}
|
||||||
@ -580,8 +580,8 @@ void ODBCSQLServerTest::recreatePersonBLOBTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreatePersonDateTimeTable()
|
void ODBCSQLServerTest::recreatePersonDateTimeTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born DATETIME)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born DATETIME)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
}
|
}
|
||||||
@ -589,8 +589,8 @@ void ODBCSQLServerTest::recreatePersonDateTimeTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreateIntsTable()
|
void ODBCSQLServerTest::recreateIntsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { session() << "CREATE TABLE Strings (str INTEGER)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() <<" (str INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
}
|
}
|
||||||
@ -598,8 +598,8 @@ void ODBCSQLServerTest::recreateIntsTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreateStringsTable()
|
void ODBCSQLServerTest::recreateStringsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { session() << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() <<" (str VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
}
|
}
|
||||||
@ -607,8 +607,8 @@ void ODBCSQLServerTest::recreateStringsTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreateFloatsTable()
|
void ODBCSQLServerTest::recreateFloatsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { session() << "CREATE TABLE Strings (str FLOAT)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() <<" (str FLOAT)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
}
|
}
|
||||||
@ -616,8 +616,8 @@ void ODBCSQLServerTest::recreateFloatsTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreateTuplesTable()
|
void ODBCSQLServerTest::recreateTuplesTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Tuples");
|
dropObject("TABLE", ExecUtil::tuples());
|
||||||
try { session() << "CREATE TABLE Tuples "
|
try { session() << "CREATE TABLE " << ExecUtil::tuples() <<
|
||||||
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||||
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||||
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
||||||
@ -637,8 +637,8 @@ void ODBCSQLServerTest::recreateVectorTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreateVectorsTable()
|
void ODBCSQLServerTest::recreateVectorsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Vectors");
|
dropObject("TABLE", ExecUtil::vectors());
|
||||||
try { session() << "CREATE TABLE Vectors (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::vectors() << " (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
}
|
}
|
||||||
@ -646,8 +646,8 @@ void ODBCSQLServerTest::recreateVectorsTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreateAnysTable()
|
void ODBCSQLServerTest::recreateAnysTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Anys");
|
dropObject("TABLE", ExecUtil::anys() );
|
||||||
try { session() << "CREATE TABLE Anys (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::anys() << " (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
}
|
}
|
||||||
@ -655,8 +655,8 @@ void ODBCSQLServerTest::recreateAnysTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreateNullsTable(const std::string& notNull)
|
void ODBCSQLServerTest::recreateNullsTable(const std::string& notNull)
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullTest");
|
dropObject("TABLE", ExecUtil::nulltest());
|
||||||
try { session() << format("CREATE TABLE NullTest (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)",
|
try { session() << format("CREATE TABLE %s (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)", ExecUtil::nulltest(),
|
||||||
notNull,
|
notNull,
|
||||||
notNull,
|
notNull,
|
||||||
notNull), now; }
|
notNull), now; }
|
||||||
@ -675,10 +675,10 @@ void ODBCSQLServerTest::recreateBoolTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreateMiscTable()
|
void ODBCSQLServerTest::recreateMiscTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "MiscTest");
|
dropObject("TABLE", ExecUtil::misctest());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "CREATE TABLE MiscTest "
|
session() << "CREATE TABLE "<< ExecUtil::misctest() <<
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARBINARY(30),"
|
"Second VARBINARY(30),"
|
||||||
"Third INTEGER,"
|
"Third INTEGER,"
|
||||||
@ -692,8 +692,8 @@ void ODBCSQLServerTest::recreateMiscTable()
|
|||||||
|
|
||||||
void ODBCSQLServerTest::recreateLogTable()
|
void ODBCSQLServerTest::recreateLogTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "T_POCO_LOG");
|
dropObject("TABLE", ExecUtil::pocolog());;
|
||||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
dropObject("TABLE", ExecUtil::pocolog_a());;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -707,8 +707,8 @@ void ODBCSQLServerTest::recreateLogTable()
|
|||||||
"Text VARCHAR(max),"
|
"Text VARCHAR(max),"
|
||||||
"DateTime DATETIME)";
|
"DateTime DATETIME)";
|
||||||
|
|
||||||
session() << sql, "T_POCO_LOG", now;
|
session() << sql, ExecUtil::pocolog(), now;
|
||||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
session() << sql, ExecUtil::pocolog_a(), now;
|
||||||
|
|
||||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
@ -738,6 +738,7 @@ CppUnit::Test* ODBCSQLServerTest::suite()
|
|||||||
|
|
||||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testBareboneODBC);
|
CppUnit_addTest(pSuite, ODBCSQLServerTest, testBareboneODBC);
|
||||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testZeroRows);
|
CppUnit_addTest(pSuite, ODBCSQLServerTest, testZeroRows);
|
||||||
|
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSyntaxError);
|
||||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSimpleAccess);
|
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSimpleAccess);
|
||||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testComplexType);
|
CppUnit_addTest(pSuite, ODBCSQLServerTest, testComplexType);
|
||||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSimpleAccessVector);
|
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSimpleAccessVector);
|
||||||
|
@ -64,7 +64,7 @@ ODBCSQLiteTest::~ODBCSQLiteTest()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::testBareboneODBC()
|
void ODBCSQLiteTest::testBareboneODBC()
|
||||||
{
|
{
|
||||||
std::string tableCreateString = "CREATE TABLE Test "
|
std::string tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARCHAR(30),"
|
"Second VARCHAR(30),"
|
||||||
"Third BLOB,"
|
"Third BLOB,"
|
||||||
@ -77,7 +77,7 @@ void ODBCSQLiteTest::testBareboneODBC()
|
|||||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||||
|
|
||||||
tableCreateString = "CREATE TABLE Test "
|
tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARCHAR(30),"
|
"Second VARCHAR(30),"
|
||||||
"Third BLOB,"
|
"Third BLOB,"
|
||||||
@ -90,7 +90,7 @@ void ODBCSQLiteTest::testBareboneODBC()
|
|||||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||||
|
|
||||||
tableCreateString = "CREATE TABLE Test "
|
tableCreateString = "CREATE TABLE " + ExecUtil::test_tbl() +
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
"Second VARCHAR(30),"
|
"Second VARCHAR(30),"
|
||||||
"Third BLOB,"
|
"Third BLOB,"
|
||||||
@ -169,8 +169,8 @@ void ODBCSQLiteTest::dropObject(const std::string& type, const std::string& name
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreateNullableTable()
|
void ODBCSQLiteTest::recreateNullableTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullableTest");
|
dropObject("TABLE", ExecUtil::nullabletest());
|
||||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat REAL NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
try { *_pSession << "CREATE TABLE " << ExecUtil::nullabletest() << " (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat REAL NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -178,8 +178,8 @@ void ODBCSQLiteTest::recreateNullableTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreatePersonTable()
|
void ODBCSQLiteTest::recreatePersonTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||||
}
|
}
|
||||||
@ -187,8 +187,8 @@ void ODBCSQLiteTest::recreatePersonTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreatePersonBLOBTable()
|
void ODBCSQLiteTest::recreatePersonBLOBTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||||
}
|
}
|
||||||
@ -196,8 +196,8 @@ void ODBCSQLiteTest::recreatePersonBLOBTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreatePersonDateTimeTable()
|
void ODBCSQLiteTest::recreatePersonDateTimeTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Person");
|
dropObject("TABLE", ExecUtil::person());
|
||||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
}
|
}
|
||||||
@ -205,8 +205,8 @@ void ODBCSQLiteTest::recreatePersonDateTimeTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreateIntsTable()
|
void ODBCSQLiteTest::recreateIntsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { session() << "CREATE TABLE Strings (str INTEGER)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() <<" (str INTEGER)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||||
}
|
}
|
||||||
@ -214,8 +214,8 @@ void ODBCSQLiteTest::recreateIntsTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreateStringsTable()
|
void ODBCSQLiteTest::recreateStringsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { session() << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() <<" (str VARCHAR(30))", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||||
}
|
}
|
||||||
@ -223,8 +223,8 @@ void ODBCSQLiteTest::recreateStringsTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreateFloatsTable()
|
void ODBCSQLiteTest::recreateFloatsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Strings");
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
try { session() << "CREATE TABLE Strings (str REAL)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::strings() <<" (str REAL)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||||
}
|
}
|
||||||
@ -232,8 +232,8 @@ void ODBCSQLiteTest::recreateFloatsTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreateTuplesTable()
|
void ODBCSQLiteTest::recreateTuplesTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Tuples");
|
dropObject("TABLE", ExecUtil::tuples());
|
||||||
try { session() << "CREATE TABLE Tuples "
|
try { session() << "CREATE TABLE " << ExecUtil::tuples() <<
|
||||||
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||||
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||||
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
||||||
@ -244,8 +244,8 @@ void ODBCSQLiteTest::recreateTuplesTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreateVectorsTable()
|
void ODBCSQLiteTest::recreateVectorsTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Vectors");
|
dropObject("TABLE", ExecUtil::vectors() );
|
||||||
try { session() << "CREATE TABLE Vectors (int0 INTEGER, flt0 REAL, str0 VARCHAR)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::vectors() << " (int0 INTEGER, flt0 REAL, str0 VARCHAR)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||||
}
|
}
|
||||||
@ -253,8 +253,8 @@ void ODBCSQLiteTest::recreateVectorsTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreateAnysTable()
|
void ODBCSQLiteTest::recreateAnysTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "Anys");
|
dropObject("TABLE", ExecUtil::anys() );
|
||||||
try { session() << "CREATE TABLE Anys (int0 INTEGER, flt0 REAL, str0 VARCHAR)", now; }
|
try { session() << "CREATE TABLE " << ExecUtil::anys() << " (int0 INTEGER, flt0 REAL, str0 VARCHAR)", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||||
}
|
}
|
||||||
@ -262,8 +262,8 @@ void ODBCSQLiteTest::recreateAnysTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreateNullsTable(const std::string& notNull)
|
void ODBCSQLiteTest::recreateNullsTable(const std::string& notNull)
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "NullTest");
|
dropObject("TABLE", ExecUtil::nulltest());
|
||||||
try { session() << format("CREATE TABLE NullTest (i INTEGER %s, r REAL %s, v VARCHAR(30) %s)",
|
try { session() << format("CREATE TABLE %s (i INTEGER %s, r REAL %s, v VARCHAR(30) %s)",ExecUtil::nulltest(),
|
||||||
notNull,
|
notNull,
|
||||||
notNull,
|
notNull,
|
||||||
notNull), now; }
|
notNull), now; }
|
||||||
@ -274,11 +274,11 @@ void ODBCSQLiteTest::recreateNullsTable(const std::string& notNull)
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreateMiscTable()
|
void ODBCSQLiteTest::recreateMiscTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "MiscTest");
|
dropObject("TABLE", ExecUtil::misctest());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// SQLite fails with BLOB bulk operations
|
// SQLite fails with BLOB bulk operations
|
||||||
session() << "CREATE TABLE MiscTest "
|
session() << "CREATE TABLE "<< ExecUtil::misctest() <<
|
||||||
"(First VARCHAR(30),"
|
"(First VARCHAR(30),"
|
||||||
//"Second BLOB,"
|
//"Second BLOB,"
|
||||||
"Third INTEGER,"
|
"Third INTEGER,"
|
||||||
@ -291,8 +291,8 @@ void ODBCSQLiteTest::recreateMiscTable()
|
|||||||
|
|
||||||
void ODBCSQLiteTest::recreateLogTable()
|
void ODBCSQLiteTest::recreateLogTable()
|
||||||
{
|
{
|
||||||
dropObject("TABLE", "T_POCO_LOG");
|
dropObject("TABLE", ExecUtil::pocolog());;
|
||||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
dropObject("TABLE", ExecUtil::pocolog_a());;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -306,8 +306,8 @@ void ODBCSQLiteTest::recreateLogTable()
|
|||||||
"Text VARCHAR,"
|
"Text VARCHAR,"
|
||||||
"DateTime DATETIME)";
|
"DateTime DATETIME)";
|
||||||
|
|
||||||
session() << sql, "T_POCO_LOG", now;
|
session() << sql, ExecUtil::pocolog(), now;
|
||||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
session() << sql, ExecUtil::pocolog_a(), now;
|
||||||
|
|
||||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||||
@ -326,6 +326,7 @@ CppUnit::Test* ODBCSQLiteTest::suite()
|
|||||||
|
|
||||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testBareboneODBC);
|
CppUnit_addTest(pSuite, ODBCSQLiteTest, testBareboneODBC);
|
||||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testZeroRows);
|
CppUnit_addTest(pSuite, ODBCSQLiteTest, testZeroRows);
|
||||||
|
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSyntaxError);
|
||||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSimpleAccess);
|
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSimpleAccess);
|
||||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testComplexType);
|
CppUnit_addTest(pSuite, ODBCSQLiteTest, testComplexType);
|
||||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSimpleAccessVector);
|
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSimpleAccessVector);
|
||||||
|
678
Data/ODBC/testsuite/src/ODBCSybaseTest.cpp
Normal file
678
Data/ODBC/testsuite/src/ODBCSybaseTest.cpp
Normal file
@ -0,0 +1,678 @@
|
|||||||
|
/*
|
||||||
|
Boost Software License - Version 1.0 - August 17th, 2003
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
do so, all subject to the following:
|
||||||
|
|
||||||
|
The copyright notices in the Software and this entire statement, including
|
||||||
|
the above license grant, this restriction and the following disclaimer,
|
||||||
|
must be included in all copies of the Software, in whole or in part, and
|
||||||
|
all derivative works of the Software, unless such copies or derivative
|
||||||
|
works are solely in the form of machine-executable object code generated by
|
||||||
|
a source language processor.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
#include "ODBCSybaseTest.h"
|
||||||
|
#include "CppUnit/TestCaller.h"
|
||||||
|
#include "CppUnit/TestSuite.h"
|
||||||
|
#include "Poco/String.h"
|
||||||
|
#include "Poco/Format.h"
|
||||||
|
#include "Poco/Any.h"
|
||||||
|
#include "Poco/DynamicAny.h"
|
||||||
|
#include "Poco/Tuple.h"
|
||||||
|
#include "Poco/Exception.h"
|
||||||
|
#include "Poco/Data/LOB.h"
|
||||||
|
#include "Poco/Data/RecordSet.h"
|
||||||
|
#include "Poco/Data/StatementImpl.h"
|
||||||
|
#include "Poco/Data/ODBC/Connector.h"
|
||||||
|
#include "Poco/Data/ODBC/Utility.h"
|
||||||
|
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||||
|
#include "Poco/Data/ODBC/ODBCException.h"
|
||||||
|
#include "Poco/Data/ODBC/ODBCStatementImpl.h"
|
||||||
|
#include <sqltypes.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
|
using namespace Poco::Data::Keywords;
|
||||||
|
using Poco::Data::DataException;
|
||||||
|
using Poco::Data::ODBC::Utility;
|
||||||
|
using Poco::Data::ODBC::ConnectionException;
|
||||||
|
using Poco::Data::ODBC::StatementException;
|
||||||
|
using Poco::Data::ODBC::StatementDiagnostics;
|
||||||
|
using Poco::format;
|
||||||
|
using Poco::Tuple;
|
||||||
|
using Poco::Any;
|
||||||
|
using Poco::AnyCast;
|
||||||
|
using Poco::DynamicAny;
|
||||||
|
using Poco::NotFoundException;
|
||||||
|
|
||||||
|
#include "CppUnit/TestCaller.h"
|
||||||
|
#include "CppUnit/TestSuite.h"
|
||||||
|
|
||||||
|
#define SYBASE_DSN ""
|
||||||
|
#define SYBASE_UID ""
|
||||||
|
#define SYBASE_PWD ""
|
||||||
|
#define SYBASE_DB "mstk"
|
||||||
|
|
||||||
|
|
||||||
|
static std::string sybaseDriver()
|
||||||
|
{
|
||||||
|
return Poco::Environment::get("POCO_TEST_SYBASE_DRIVER",
|
||||||
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
"{Adaptive Server Enterprise}"
|
||||||
|
#else
|
||||||
|
"libsybdrvodb-sqllen8.so"
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static std::string sybaseExtra()
|
||||||
|
{
|
||||||
|
std::string e = Poco::Environment::get("POCO_TEST_SYBASE_EXTRA", "");
|
||||||
|
return (e.empty() ? "" : e + ";");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string SybaseODBC::_connectString =
|
||||||
|
"driver=" + sybaseDriver() + ";" +
|
||||||
|
sybaseExtra() +
|
||||||
|
"db=" SYBASE_DB ";"
|
||||||
|
"uid=" SYBASE_UID ";"
|
||||||
|
"pwd=" SYBASE_PWD ";"
|
||||||
|
"DynamicPrepare=1;"
|
||||||
|
#if !defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
"CS=iso_1;"
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ODBCTest::SessionPtr SybaseODBC::_pSession;
|
||||||
|
ODBCTest::ExecPtr SybaseODBC::_pExecutor;
|
||||||
|
std::string SybaseODBC::_driver = "";
|
||||||
|
std::string SybaseODBC::_dsn = SYBASE_DSN;
|
||||||
|
std::string SybaseODBC::_uid = SYBASE_UID;
|
||||||
|
std::string SybaseODBC::_pwd = SYBASE_PWD;
|
||||||
|
|
||||||
|
|
||||||
|
SybaseODBC::SybaseODBC(const std::string& name) :
|
||||||
|
ODBCTest(name, _pSession, _pExecutor, _dsn, _uid, _pwd, _connectString)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SybaseODBC::testBareboneODBC()
|
||||||
|
{
|
||||||
|
if (!&session()) fail("Test not available.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::dropObject(const std::string& type, const std::string& name)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
session() << format("DROP %s %s", type, name), now;
|
||||||
|
}
|
||||||
|
catch (StatementException& ex)
|
||||||
|
{
|
||||||
|
bool ignoreError = false;
|
||||||
|
const StatementDiagnostics::FieldVec& flds = ex.diagnostics().fields();
|
||||||
|
StatementDiagnostics::Iterator it = flds.begin();
|
||||||
|
for (; it != flds.end(); ++it)
|
||||||
|
{
|
||||||
|
if ((-204 == it->_nativeError) || (3701 /* Sybase */ == it->_nativeError))//(table does not exist)
|
||||||
|
{
|
||||||
|
ignoreError = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ignoreError) throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreateNullableTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::nullabletest());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::nullabletest() << " (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime DATETIME NULL)", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateNullableTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateNullableTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreateNumericTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::numeric_tbl());
|
||||||
|
try {
|
||||||
|
session() << "CREATE TABLE " << ExecUtil::numeric_tbl() <<
|
||||||
|
" (id integer, num8 NUMERIC(8), num16_3 NUMERIC(16,3), num18 NUMERIC(18), num18_8 NUMERIC(18,8), num22 NUMERIC(22))", now;
|
||||||
|
}
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateNumericTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateNumericTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
void SybaseODBC::recreatePersonTable()
|
||||||
|
{
|
||||||
|
doPersonTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SybaseODBC::doPersonTable(const std::string& lnAttr)
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::person());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30)" << lnAttr << ", FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreatePersonTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreatePersonTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreatePersonBLOBTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::person());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image VARBINARY(10240))", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreatePersonBLOBTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreatePersonBLOBTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreatePersonDateTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::person());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreatePersonDateTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreatePersonDateTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreatePersonTimeTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::person());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornTime TIME)", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreatePersonTimeTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreatePersonTimeTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreatePersonDateTimeTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::person());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::person() << " (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born DATETIME)", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreatePersonDateTimeTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreatePersonDateTimeTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreateIntsTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::strings() << " (str INTEGER)", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateIntsTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateIntsTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreateStringsTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::strings() << " (str VARCHAR(30))", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateStringsTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateStringsTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreateFloatsTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::strings());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::strings() << " (str FLOAT)", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateFloatsTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateFloatsTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreateTuplesTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::tuples());
|
||||||
|
try {
|
||||||
|
session() << "CREATE TABLE " << ExecUtil::tuples() <<
|
||||||
|
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||||
|
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||||
|
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now;
|
||||||
|
}
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateTuplesTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateTuplesTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreateVectorsTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::vectors());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::vectors() << " (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateVectorsTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateVectorsTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreateAnysTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::anys());
|
||||||
|
try { session() << "CREATE TABLE " << ExecUtil::anys() << " (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateAnysTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateAnysTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreateNullsTable(const std::string& notNull)
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::nulltest());
|
||||||
|
std::string nl = (notNull.empty() ? " NULL " : notNull);
|
||||||
|
try {
|
||||||
|
session() << format("CREATE TABLE %s (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)", ExecUtil::nulltest(),
|
||||||
|
nl,
|
||||||
|
nl,
|
||||||
|
nl), now;
|
||||||
|
}
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateNullsTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateNullsTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
void SybaseODBC::doMiscTable(bool haveSecCol)
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::misctest());
|
||||||
|
try
|
||||||
|
{
|
||||||
|
session() << "CREATE TABLE " << ExecUtil::misctest() <<
|
||||||
|
"(First VARCHAR(30),"
|
||||||
|
<< (haveSecCol ? "Second VARBINARY(10240)," : "") <<
|
||||||
|
"Third INTEGER,"
|
||||||
|
"Fourth FLOAT,"
|
||||||
|
"Fifth DATETIME)", now;
|
||||||
|
}
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateMiscTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateMiscTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
void SybaseODBC::testBulkPerformance()
|
||||||
|
{
|
||||||
|
session().setFeature("autoBind", true);
|
||||||
|
session().setFeature("autoExtract", true);
|
||||||
|
|
||||||
|
doMiscTable(false);
|
||||||
|
executor().doBulkPerformance(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::recreateMiscTable()
|
||||||
|
{
|
||||||
|
doMiscTable(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SybaseODBC::recreateLogTable()
|
||||||
|
{
|
||||||
|
dropObject("TABLE", ExecUtil::pocolog());
|
||||||
|
dropObject("TABLE", ExecUtil::pocolog_a());;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
std::string sql = "CREATE TABLE %s "
|
||||||
|
"(Source VARCHAR(100),"
|
||||||
|
"Name VARCHAR(100),"
|
||||||
|
"ProcessId INTEGER,"
|
||||||
|
"Thread VARCHAR(100), "
|
||||||
|
"ThreadId INTEGER,"
|
||||||
|
"Priority INTEGER,"
|
||||||
|
"Text VARCHAR(100),"
|
||||||
|
"DateTime DATETIME)";
|
||||||
|
|
||||||
|
session() << sql, ExecUtil::pocolog(), now;
|
||||||
|
session() << sql, ExecUtil::pocolog_a(), now;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateLogTable()"); }
|
||||||
|
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateLogTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
void SybaseODBC::testStoredProcedure()
|
||||||
|
{
|
||||||
|
const std::string nm(ExecUtil::stored_proc());
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
|
||||||
|
for (int k = 0; k < 8;)
|
||||||
|
{
|
||||||
|
session().setFeature("autoBind", bindValue(k));
|
||||||
|
session().setFeature("autoExtract", bindValue(k + 1));
|
||||||
|
|
||||||
|
{
|
||||||
|
session() << "create procedure " + nm + " "
|
||||||
|
"as "
|
||||||
|
"select -1 where 1 = 2 ", now;
|
||||||
|
Poco::Data::Statement stat(session());
|
||||||
|
stat << "{ call " << nm << "() }", now;
|
||||||
|
Poco::Data::RecordSet rs(stat);
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(0 == rs.rowCount());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Poco::Nullable<std::string> ins;
|
||||||
|
Poco::Nullable<std::string> os = Poco::Nullable<std::string>("ab");
|
||||||
|
Poco::Nullable<int> oi(12);
|
||||||
|
Poco::Nullable<Poco::Data::Date> od = Poco::Nullable<Poco::Data::Date>(Poco::Data::Date());
|
||||||
|
Poco::Nullable<Poco::DateTime> odtm = Poco::Nullable<Poco::DateTime>(Poco::DateTime());
|
||||||
|
session() << "create procedure " + nm + " @ins varchar(40), @oi integer output, @os varchar(10) output, @od date output, @dtm datetime output "
|
||||||
|
"as "
|
||||||
|
"begin "
|
||||||
|
"select @oi = null;"
|
||||||
|
"select @os = @ins;"
|
||||||
|
"select @od = null;"
|
||||||
|
"select @dtm = null;"
|
||||||
|
" end"
|
||||||
|
, now;
|
||||||
|
session() << "{ call " << nm << "(?, ?, ?, ?, ?) }", in(ins), out(oi), out(os), out(od), out(odtm), now;
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(oi.isNull());
|
||||||
|
assert(os.isNull());
|
||||||
|
assert(od.isNull());
|
||||||
|
assert(odtm.isNull());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
session() << "create procedure " << nm << " @c char(8) AS select @c", now;
|
||||||
|
Poco::Nullable<std::string> ns;
|
||||||
|
Poco::Data::Statement stat(session());
|
||||||
|
stat << "{ call " << nm << "(?) }", use(ns), now;
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
Poco::Data::RecordSet rs(stat);
|
||||||
|
assert(1 == rs.rowCount());
|
||||||
|
bool nl = rs.isNull(size_t(0), 0);
|
||||||
|
assert( nl );
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Poco::Data::Statement stat(session());
|
||||||
|
stat << "{ exec -- @exType='mdExch', @exList='TRAD' }", Poco::Data::Keywords::limit(1);
|
||||||
|
while (!stat.done())
|
||||||
|
{
|
||||||
|
stat.execute();
|
||||||
|
Poco::Data::RecordSet rs(stat);
|
||||||
|
assert(0 == rs.rowCount());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
session() << "create procedure " + nm + " "
|
||||||
|
"@outParam int output "
|
||||||
|
"as "
|
||||||
|
"select @outParam = -1", now;
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
session() << "{ call " << nm << "(?) }", out(i), now;
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(-1 == i);
|
||||||
|
|
||||||
|
session() << "create procedure " + nm + " "
|
||||||
|
"@inParam int, @outParam int output "
|
||||||
|
"as "
|
||||||
|
"select @outParam = @inParam * @inParam"
|
||||||
|
, now;
|
||||||
|
|
||||||
|
i = 2;
|
||||||
|
int j = 0;
|
||||||
|
session() << "{ call " << nm << "(?, ?)} ", in(i), out(j), now;
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(4 == j);
|
||||||
|
|
||||||
|
session() << "create procedure " + nm + " "
|
||||||
|
"@ioParam int output "
|
||||||
|
"as "
|
||||||
|
"select @ioParam = @ioParam * @ioParam"
|
||||||
|
, now;
|
||||||
|
|
||||||
|
i = 2;
|
||||||
|
session() << "{ call " << nm << "(?) }", io(i), now;
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(4 == i);
|
||||||
|
|
||||||
|
session() << "create procedure " + nm + " "
|
||||||
|
"@inParam varchar(1000), @outParam varchar(1000) output "
|
||||||
|
"as "
|
||||||
|
"select @outParam = @inParam"
|
||||||
|
, now;
|
||||||
|
|
||||||
|
std::string inParam =
|
||||||
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||||
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||||
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||||
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||||
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||||
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||||
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||||
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||||
|
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
|
||||||
|
std::string outParam;
|
||||||
|
session() << "{ call " << nm << "(?,?) }", in(inParam), out(outParam), now;
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(inParam == outParam);
|
||||||
|
|
||||||
|
k += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SybaseODBC::testStoredProcedureDynamicAny()
|
||||||
|
{
|
||||||
|
const std::string nm(ExecUtil::stored_proc());
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
|
||||||
|
for (int k = 0; k < 8;)
|
||||||
|
{
|
||||||
|
session().setFeature("autoBind", bindValue(k));
|
||||||
|
|
||||||
|
DynamicAny i = 2;
|
||||||
|
DynamicAny j = 0;
|
||||||
|
|
||||||
|
session() << "create procedure " << nm << " "
|
||||||
|
"@inParam int, @outParam int output "
|
||||||
|
"as "
|
||||||
|
"select @outParam = @inParam * @inParam"
|
||||||
|
, now;
|
||||||
|
|
||||||
|
session() << "{ call " << nm << "(?, ?) }", in(i), out(j), now;
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(4 == j);
|
||||||
|
|
||||||
|
session() << "create procedure " << nm << " @outParam int output "
|
||||||
|
"as "
|
||||||
|
"select @outParam = @outParam * @outParam"
|
||||||
|
, now;
|
||||||
|
|
||||||
|
i = 2;
|
||||||
|
session() << "{ call " << nm << "(?) }", io(i), now;
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(4 == i);
|
||||||
|
|
||||||
|
k += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SybaseODBC::testStoredProcedureAny()
|
||||||
|
{
|
||||||
|
const std::string nm(ExecUtil::stored_proc());
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
|
||||||
|
for (int k = 0; k < 8;)
|
||||||
|
{
|
||||||
|
session().setFeature("autoBind", bindValue(k));
|
||||||
|
session().setFeature("autoExtract", bindValue(k + 1));
|
||||||
|
|
||||||
|
Any i = 2;
|
||||||
|
Any j = 0;
|
||||||
|
|
||||||
|
session() << "create procedure " << nm << " "
|
||||||
|
"@inParam int, @outParam int output "
|
||||||
|
"as "
|
||||||
|
"select @outParam = @inParam * @inParam"
|
||||||
|
, now;
|
||||||
|
|
||||||
|
session() << "{ call " << nm << "(?, ?) }", in(i), out(j), now;
|
||||||
|
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(4 == AnyCast<int>(j));
|
||||||
|
|
||||||
|
session() << "create procedure " << nm << " @outParam int output "
|
||||||
|
"as "
|
||||||
|
"select @outParam = @outParam * @outParam"
|
||||||
|
, now;
|
||||||
|
|
||||||
|
i = 2;
|
||||||
|
session() << "{ call " << nm << "(?) }", io(i), now;
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(4 == AnyCast<int>(i));
|
||||||
|
|
||||||
|
session() << "create procedure " << nm << " "
|
||||||
|
"@i int , @f float , @s1 varchar(10) , @d date , @t time , @dt datetime , @bin binary , @res int output"
|
||||||
|
" as "
|
||||||
|
"select @res = 11 where (@i is null) and (@f is null) and (@s1 is null) and (@d is null) and (@t is null) and (@dt is null) and (@bin is null)"
|
||||||
|
, now;
|
||||||
|
Poco::Dynamic::Var res(0);
|
||||||
|
Poco::Dynamic::Var null;
|
||||||
|
Poco::Data::Statement stat(session());
|
||||||
|
stat << "{ call " << nm << "(?,?,?,?,?,?,? ?) }";
|
||||||
|
stat.addBind(Poco::Data::Keywords::bind(Poco::Data::DATA_NULL_INTEGER));
|
||||||
|
stat.addBind(Poco::Data::Keywords::bind(Poco::Data::DATA_NULL_FLOAT));
|
||||||
|
stat.addBind(Poco::Data::Keywords::bind(Poco::Data::DATA_NULL_STRING));
|
||||||
|
stat.addBind(Poco::Data::Keywords::bind(Poco::Data::DATA_NULL_DATE));
|
||||||
|
stat.addBind(Poco::Data::Keywords::bind(Poco::Dynamic::Var(Poco::Data::DATA_NULL_TIME)));
|
||||||
|
stat.addBind(Poco::Data::Keywords::bind(Poco::Data::DATA_NULL_DATETIME));
|
||||||
|
stat.addBind(Poco::Data::Keywords::bind(Poco::Dynamic::Var(Poco::Data::DATA_NULL_BLOB)));
|
||||||
|
|
||||||
|
stat.addBind(Poco::Data::Keywords::out(res));
|
||||||
|
stat.execute();
|
||||||
|
dropObject("procedure", nm);
|
||||||
|
assert(11 == res.extract<int>());
|
||||||
|
|
||||||
|
k += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SybaseODBC::testTransaction()
|
||||||
|
{
|
||||||
|
if (!&session())fail("Test not available.");
|
||||||
|
|
||||||
|
for (int i = 0; i < 8;)
|
||||||
|
{
|
||||||
|
doPersonTable(" UNIQUE ");
|
||||||
|
session().setFeature("autoBind", bindValue(i));
|
||||||
|
session().setFeature("autoExtract", bindValue(i + 1));
|
||||||
|
executor().transaction(dbConnString());
|
||||||
|
i += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*static*/
|
||||||
|
CppUnit::Test* SybaseODBC::suite()
|
||||||
|
{
|
||||||
|
if ((_pSession = init(_driver, _dsn, _uid, _pwd, _connectString)))
|
||||||
|
{
|
||||||
|
std::cout << "*** Connected to [" << _driver << "] test database." << std::endl;
|
||||||
|
|
||||||
|
_pExecutor = new SQLExecutor(_driver + " SQL Executor", _pSession);
|
||||||
|
|
||||||
|
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SybaseODBC");
|
||||||
|
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testBareboneODBC);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSyntaxError);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSimpleAccess);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testComplexType);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSimpleAccessVector);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testComplexTypeVector);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSharedPtrComplexTypeVector);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testAutoPtrComplexTypeVector);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInsertVector);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInsertEmptyVector);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSimpleAccessList);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testComplexTypeList);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInsertList);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInsertEmptyList);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSimpleAccessDeque);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testComplexTypeDeque);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInsertDeque);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInsertEmptyDeque);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testAffectedRows);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInsertSingleBulk);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInsertSingleBulkVec);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testLimit);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testLimitOnce);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testLimitPrepare);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testLimitZero);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testPrepare);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testBulk);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testBulkPerformance);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSetSimple);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSetComplex);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSetComplexUnique);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testMultiSetSimple);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testMultiSetComplex);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testMapComplex);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testMapComplexUnique);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testMultiMapComplex);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSelectIntoSingle);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSelectIntoSingleStep);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSelectIntoSingleFail);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testLowerLimitOk);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testLowerLimitFail);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testCombinedLimits);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testCombinedIllegalLimits);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testRange);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testIllegalRange);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSingleSelect);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testEmptyDB);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testBLOB);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testBLOBContainer);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testBLOBStmt);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testDate);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testTime);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testDateTime);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testFloat);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testDouble);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testTuple);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testTupleVector);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInternalExtraction);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testFilter);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInternalBulkExtraction);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInternalStorageType);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testStoredProcedure);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testStoredProcedureAny);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testStoredProcedureDynamicAny);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testNull);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testRowIterator);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testAsync);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testAny);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testDynamicAny);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testMultipleResults);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testMultipleResultsNoProj);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSQLChannel); // this test may suffer from race conditions
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testSQLLogger);
|
||||||
|
//CppUnit_addTest(pSuite, SybaseODBC, testSessionTransaction); // this test fails when connection is fast
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testTransaction);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testTransactor);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testNullable);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testReconnect);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testNumeric);
|
||||||
|
CppUnit_addTest(pSuite, SybaseODBC, testInsertStatReuse);
|
||||||
|
|
||||||
|
_pExecutor = 0;
|
||||||
|
_pSession = 0;
|
||||||
|
|
||||||
|
return pSuite;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
87
Data/ODBC/testsuite/src/ODBCSybaseTest.h
Normal file
87
Data/ODBC/testsuite/src/ODBCSybaseTest.h
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
Boost Software License - Version 1.0 - August 17th, 2003
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
do so, all subject to the following:
|
||||||
|
|
||||||
|
The copyright notices in the Software and this entire statement, including
|
||||||
|
the above license grant, this restriction and the following disclaimer,
|
||||||
|
must be included in all copies of the Software, in whole or in part, and
|
||||||
|
all derivative works of the Software, unless such copies or derivative
|
||||||
|
works are solely in the form of machine-executable object code generated by
|
||||||
|
a source language processor.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ODBCSybaseTest_INCLUDED
|
||||||
|
#define ODBCSybaseTest_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Data/ODBC/ODBC.h"
|
||||||
|
#include "ODBCTest.h"
|
||||||
|
#include "Poco/Format.h"
|
||||||
|
|
||||||
|
class SybaseODBC : public ODBCTest {
|
||||||
|
public:
|
||||||
|
SybaseODBC(const std::string& name);
|
||||||
|
static CppUnit::Test* suite();
|
||||||
|
|
||||||
|
virtual void testBareboneODBC();
|
||||||
|
virtual void testBulkPerformance();
|
||||||
|
private:
|
||||||
|
void dropObject(const std::string& type, const std::string& tableName);
|
||||||
|
void recreateNullableTable();
|
||||||
|
void recreatePersonTable();
|
||||||
|
void recreatePersonBLOBTable();
|
||||||
|
void recreatePersonDateTable();
|
||||||
|
void recreatePersonTimeTable();
|
||||||
|
void recreatePersonDateTimeTable();
|
||||||
|
void recreateStringsTable();
|
||||||
|
void recreateIntsTable();
|
||||||
|
void recreateFloatsTable();
|
||||||
|
void recreateTuplesTable();
|
||||||
|
void recreateVectorsTable();
|
||||||
|
void recreateAnysTable();
|
||||||
|
void recreateNullsTable(const std::string& notNull = "");
|
||||||
|
void recreateMiscTable();
|
||||||
|
void recreateLogTable();
|
||||||
|
void recreateNumericTable();
|
||||||
|
void testStoredProcedure();
|
||||||
|
void testStoredProcedureDynamicAny();
|
||||||
|
void testStoredProcedureAny();
|
||||||
|
void testTransaction();
|
||||||
|
|
||||||
|
virtual std::string str2NumExpr(const std::string& num, unsigned len, unsigned dec)
|
||||||
|
{
|
||||||
|
std::string res;
|
||||||
|
Poco::format(res, " CONVERT(NUMERIC(%u, %u), '%s') ", len, dec, num);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool emptyStringIsSpace() { return true; }
|
||||||
|
|
||||||
|
void doMiscTable(bool haveSecCol);
|
||||||
|
void doPersonTable(const std::string& lnAttr = "");
|
||||||
|
|
||||||
|
static ODBCTest::SessionPtr _pSession;
|
||||||
|
static ODBCTest::ExecPtr _pExecutor;
|
||||||
|
static std::string _driver;
|
||||||
|
static std::string _dsn;
|
||||||
|
static std::string _uid;
|
||||||
|
static std::string _pwd;
|
||||||
|
static std::string _connectString;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -22,6 +22,7 @@
|
|||||||
#include "Poco/Exception.h"
|
#include "Poco/Exception.h"
|
||||||
#include "Poco/Data/LOB.h"
|
#include "Poco/Data/LOB.h"
|
||||||
#include "Poco/Data/StatementImpl.h"
|
#include "Poco/Data/StatementImpl.h"
|
||||||
|
#include "Poco/Data/RecordSet.h"
|
||||||
#include "Poco/Data/ODBC/Connector.h"
|
#include "Poco/Data/ODBC/Connector.h"
|
||||||
#include "Poco/Data/ODBC/Utility.h"
|
#include "Poco/Data/ODBC/Utility.h"
|
||||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||||
@ -41,6 +42,7 @@ using Poco::Data::ODBC::ODBCException;
|
|||||||
using Poco::Data::ODBC::ConnectionException;
|
using Poco::Data::ODBC::ConnectionException;
|
||||||
using Poco::Data::ODBC::StatementException;
|
using Poco::Data::ODBC::StatementException;
|
||||||
using Poco::Data::ODBC::StatementDiagnostics;
|
using Poco::Data::ODBC::StatementDiagnostics;
|
||||||
|
using Poco::Data::Statement;
|
||||||
using Poco::format;
|
using Poco::format;
|
||||||
using Poco::Tuple;
|
using Poco::Tuple;
|
||||||
using Poco::Any;
|
using Poco::Any;
|
||||||
@ -1029,7 +1031,7 @@ void ODBCTest::testNull()
|
|||||||
recreateNullsTable();
|
recreateNullsTable();
|
||||||
_pSession->setFeature("autoBind", bindValue(i));
|
_pSession->setFeature("autoBind", bindValue(i));
|
||||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
_pSession->setFeature("autoExtract", bindValue(i+1));
|
||||||
_pExecutor->nulls();
|
_pExecutor->nulls(emptyStringIsSpace());
|
||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1127,6 +1129,20 @@ void ODBCTest::testMultipleResults()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ODBCTest::testMultipleResultsNoProj()
|
||||||
|
{
|
||||||
|
if (! &session()) fail("Test not available.");
|
||||||
|
session().setFeature("autoBind", true); // DB2 fails without that
|
||||||
|
for (int autoE = 0; autoE < 2; ++autoE)
|
||||||
|
{
|
||||||
|
recreatePersonTable();
|
||||||
|
_pSession->setFeature("autoExtract", autoE != 0);
|
||||||
|
_pExecutor->multipleResultsNoProj("SELECT * FROM " + ExecUtil::person() + " WHERE Age = ?; "
|
||||||
|
"SELECT Age FROM " + ExecUtil::person() + " WHERE FirstName = ?; "
|
||||||
|
"SELECT * FROM " + ExecUtil::person() + " WHERE Age = ? OR Age = ? ORDER BY Age;");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ODBCTest::testSQLChannel()
|
void ODBCTest::testSQLChannel()
|
||||||
{
|
{
|
||||||
@ -1219,6 +1235,46 @@ void ODBCTest::testNullable()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ODBCTest::testNumeric()
|
||||||
|
{
|
||||||
|
if (!_pSession) fail("Test not available.");
|
||||||
|
|
||||||
|
recreateNumericTable();
|
||||||
|
std::vector<std::string> vals;
|
||||||
|
vals.push_back("12345678");
|
||||||
|
vals.push_back("123456789012.123");
|
||||||
|
vals.push_back("123456789012345678");
|
||||||
|
vals.push_back("1234567890.12345678");
|
||||||
|
vals.push_back("1234567890123456789012");
|
||||||
|
|
||||||
|
const std::string sqlStr = std::string("INSERT INTO ") + ExecUtil::numeric_tbl() +
|
||||||
|
"(id, num8, num16_3, num18, num18_8, num22) VALUES (1, " + str2NumExpr(vals[0],8,0) + " , " + str2NumExpr(vals[1],16,3) + ", " + str2NumExpr(vals[2], 18,0)
|
||||||
|
+ " , " + str2NumExpr(vals[3], 18, 8) + " , " + str2NumExpr(vals[4], 22, 0) + ")";
|
||||||
|
|
||||||
|
session() << sqlStr, now;
|
||||||
|
|
||||||
|
for (int i = 0; i < 8;)
|
||||||
|
{
|
||||||
|
_pSession->setFeature("autoBind", bindValue(i));
|
||||||
|
_pSession->setFeature("autoExtract", bindValue(i + 1));
|
||||||
|
_pExecutor->numericTypes(vals);
|
||||||
|
i += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ODBCTest::testInsertStatReuse()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 8; i += 2)
|
||||||
|
{
|
||||||
|
recreatePersonTable();
|
||||||
|
session().setFeature("autoBind", bindValue(i));
|
||||||
|
session().setFeature("autoExtract", bindValue(i + 1));
|
||||||
|
|
||||||
|
_pExecutor->insertStatReuse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ODBCTest::testUnicode()
|
void ODBCTest::testUnicode()
|
||||||
{
|
{
|
||||||
@ -1256,6 +1312,28 @@ void ODBCTest::testReconnect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ODBCTest::testSyntaxError()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
session() << "select fro oops", now;
|
||||||
|
fail("Expected syntax error exception");
|
||||||
|
}
|
||||||
|
catch (const StatementException&)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Statement stat(session());
|
||||||
|
stat << "select fro oops";
|
||||||
|
stat.execute();
|
||||||
|
fail("Expected syntax error exception");
|
||||||
|
}
|
||||||
|
catch (const StatementException&)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ODBCTest::canConnect(const std::string& driver,
|
bool ODBCTest::canConnect(const std::string& driver,
|
||||||
std::string& dsn,
|
std::string& dsn,
|
||||||
std::string& uid,
|
std::string& uid,
|
||||||
@ -1274,7 +1352,7 @@ bool ODBCTest::canConnect(const std::string& driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_drivers.end() == itDrv)
|
if ((_drivers.end() == itDrv) && (driver.length() != 0) && (driver[0] != '/'))
|
||||||
{
|
{
|
||||||
dsn = "";
|
dsn = "";
|
||||||
uid = "";
|
uid = "";
|
||||||
|
@ -141,6 +141,7 @@ public:
|
|||||||
virtual void testDynamicAny();
|
virtual void testDynamicAny();
|
||||||
|
|
||||||
virtual void testMultipleResults();
|
virtual void testMultipleResults();
|
||||||
|
virtual void testMultipleResultsNoProj();
|
||||||
|
|
||||||
virtual void testSQLChannel();
|
virtual void testSQLChannel();
|
||||||
virtual void testSQLLogger();
|
virtual void testSQLLogger();
|
||||||
@ -153,6 +154,9 @@ public:
|
|||||||
virtual void testUnicode();
|
virtual void testUnicode();
|
||||||
|
|
||||||
virtual void testReconnect();
|
virtual void testReconnect();
|
||||||
|
virtual void testNumeric();
|
||||||
|
virtual void testSyntaxError();
|
||||||
|
virtual void testInsertStatReuse();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef Poco::Data::ODBC::Utility::DriverMap Drivers;
|
typedef Poco::Data::ODBC::Utility::DriverMap Drivers;
|
||||||
@ -176,6 +180,9 @@ protected:
|
|||||||
virtual void recreateMiscTable();
|
virtual void recreateMiscTable();
|
||||||
virtual void recreateLogTable();
|
virtual void recreateLogTable();
|
||||||
virtual void recreateUnicodeTable();
|
virtual void recreateUnicodeTable();
|
||||||
|
virtual void recreateNumericTable();
|
||||||
|
virtual bool emptyStringIsSpace() { return false; }
|
||||||
|
virtual std::string str2NumExpr(const std::string& num, unsigned len, unsigned dec) { return num; }
|
||||||
|
|
||||||
static SessionPtr init(const std::string& driver,
|
static SessionPtr init(const std::string& driver,
|
||||||
std::string& dsn,
|
std::string& dsn,
|
||||||
@ -264,6 +271,11 @@ inline void ODBCTest::recreateNullableTable()
|
|||||||
throw Poco::NotImplementedException("ODBCTest::recreateNullableTable()");
|
throw Poco::NotImplementedException("ODBCTest::recreateNullableTable()");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void ODBCTest::recreateNumericTable()
|
||||||
|
{
|
||||||
|
throw Poco::NotImplementedException("ODBCTest::recreateNumericTable()");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void ODBCTest::recreatePersonTable()
|
inline void ODBCTest::recreatePersonTable()
|
||||||
{
|
{
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include "ODBCTestSuite.h"
|
#include "ODBCTestSuite.h"
|
||||||
#include "ODBCDB2Test.h"
|
#include "ODBCDB2Test.h"
|
||||||
|
#include "ODBCSybaseTest.h"
|
||||||
#include "ODBCMySQLTest.h"
|
#include "ODBCMySQLTest.h"
|
||||||
#include "ODBCOracleTest.h"
|
#include "ODBCOracleTest.h"
|
||||||
#include "ODBCPostgreSQLTest.h"
|
#include "ODBCPostgreSQLTest.h"
|
||||||
@ -44,6 +45,7 @@ CppUnit::Test* ODBCTestSuite::suite()
|
|||||||
addTest(pSuite, ODBCPostgreSQLTest::suite());
|
addTest(pSuite, ODBCPostgreSQLTest::suite());
|
||||||
addTest(pSuite, ODBCSQLiteTest::suite());
|
addTest(pSuite, ODBCSQLiteTest::suite());
|
||||||
addTest(pSuite, ODBCSQLServerTest::suite());
|
addTest(pSuite, ODBCSQLServerTest::suite());
|
||||||
|
addTest(pSuite, SybaseODBC::suite());
|
||||||
addTest(pSuite, ODBCDB2Test::suite());
|
addTest(pSuite, ODBCDB2Test::suite());
|
||||||
// MS Access driver does not support connection status detection
|
// MS Access driver does not support connection status detection
|
||||||
// disabled for the time being
|
// disabled for the time being
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -73,6 +73,81 @@
|
|||||||
using Poco::Data::ODBC::ConnectionException; \
|
using Poco::Data::ODBC::ConnectionException; \
|
||||||
using Poco::Data::ODBC::StatementException
|
using Poco::Data::ODBC::StatementException
|
||||||
|
|
||||||
|
struct ExecUtil
|
||||||
|
{
|
||||||
|
static std::string mangleTable(const std::string& name);
|
||||||
|
|
||||||
|
static std::string person()
|
||||||
|
{
|
||||||
|
return mangleTable("Person");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string strings()
|
||||||
|
{
|
||||||
|
return mangleTable("Strings");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string tuples()
|
||||||
|
{
|
||||||
|
return mangleTable("Tuples");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string vectors()
|
||||||
|
{
|
||||||
|
return mangleTable("Vectors");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string anys()
|
||||||
|
{
|
||||||
|
return mangleTable("Anys");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string nulltest()
|
||||||
|
{
|
||||||
|
return mangleTable("NullTest");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string misctest()
|
||||||
|
{
|
||||||
|
return mangleTable("MiscTest");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string nullabletest()
|
||||||
|
{
|
||||||
|
return mangleTable("NullableTest");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string pocolog()
|
||||||
|
{
|
||||||
|
return mangleTable("POCO_LOG");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string pocolog_a()
|
||||||
|
{
|
||||||
|
return mangleTable("POCO_LOG_A");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string stored_func()
|
||||||
|
{
|
||||||
|
return mangleTable("storedFunc");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string stored_proc()
|
||||||
|
{
|
||||||
|
return mangleTable("storedProc");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string test_tbl()
|
||||||
|
{
|
||||||
|
return mangleTable("Test");
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string numeric_tbl()
|
||||||
|
{
|
||||||
|
return mangleTable("numer_t");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class SQLExecutor: public CppUnit::TestCase
|
class SQLExecutor: public CppUnit::TestCase
|
||||||
{
|
{
|
||||||
@ -89,7 +164,7 @@ public:
|
|||||||
DE_BOUND
|
DE_BOUND
|
||||||
};
|
};
|
||||||
|
|
||||||
SQLExecutor(const std::string& name, Poco::Data::Session* _pSession);
|
SQLExecutor(const std::string& name, Poco::Data::Session* _pSession, const std::string& connInitSql = std::string(), const std::string& schemaName = std::string());
|
||||||
~SQLExecutor();
|
~SQLExecutor();
|
||||||
|
|
||||||
void execute(const std::string& sql);
|
void execute(const std::string& sql);
|
||||||
@ -147,6 +222,8 @@ public:
|
|||||||
void limitPrepare();
|
void limitPrepare();
|
||||||
void limitZero();
|
void limitZero();
|
||||||
void prepare();
|
void prepare();
|
||||||
|
void numericTypes(const std::vector<std::string>& vals);
|
||||||
|
void insertStatReuse();
|
||||||
|
|
||||||
template <typename C1, typename C2, typename C3, typename C4, typename C5, typename C6>
|
template <typename C1, typename C2, typename C3, typename C4, typename C5, typename C6>
|
||||||
void doBulkWithBool(Poco::UInt32 size, const std::string& blobPlaceholder="?")
|
void doBulkWithBool(Poco::UInt32 size, const std::string& blobPlaceholder="?")
|
||||||
@ -173,7 +250,7 @@ public:
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() <<
|
session() <<
|
||||||
Poco::format("INSERT INTO MiscTest VALUES (?,%s,?,?,?,?)", blobPlaceholder),
|
Poco::format("INSERT INTO %s VALUES (?,%s,?,?,?,?)", ExecUtil::misctest(), blobPlaceholder),
|
||||||
use(strings),
|
use(strings),
|
||||||
use(blobs),
|
use(blobs),
|
||||||
use(ints),
|
use(ints),
|
||||||
@ -183,14 +260,14 @@ public:
|
|||||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
try { session() << "DELETE FROM MiscTest", now; }
|
try { session() << "DELETE FROM "<< ExecUtil::misctest(), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() <<
|
session() <<
|
||||||
Poco::format("INSERT INTO MiscTest VALUES (?,%s,?,?,?,?)", blobPlaceholder),
|
Poco::format("INSERT INTO %s VALUES (?,%s,?,?,?,?)", ExecUtil::misctest(), blobPlaceholder),
|
||||||
use(strings, bulk),
|
use(strings, bulk),
|
||||||
use(blobs, bulk),
|
use(blobs, bulk),
|
||||||
use(ints, bulk),
|
use(ints, bulk),
|
||||||
@ -209,7 +286,7 @@ public:
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT * FROM MiscTest ORDER BY Third",
|
session() << "SELECT * FROM "<< ExecUtil::misctest() <<" ORDER BY Third",
|
||||||
into(strings),
|
into(strings),
|
||||||
into(blobs),
|
into(blobs),
|
||||||
into(ints),
|
into(ints),
|
||||||
@ -239,14 +316,14 @@ public:
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT First FROM MiscTest", into(ints, bulk(size)), limit(size+1), now;
|
session() << "SELECT First FROM "<< ExecUtil::misctest(), into(ints, bulk(size)), limit(size+1), now;
|
||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
}
|
}
|
||||||
catch(Poco::InvalidArgumentException&){ }
|
catch(Poco::InvalidArgumentException&){ }
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT First FROM MiscTest", into(ints), bulk(size), now;
|
session() << "SELECT First FROM "<< ExecUtil::misctest(), into(ints), bulk(size), now;
|
||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
}
|
}
|
||||||
catch(Poco::InvalidAccessException&){ }
|
catch(Poco::InvalidAccessException&){ }
|
||||||
@ -263,7 +340,7 @@ public:
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT First, Second, Third, Fourth, Fifth, Sixth FROM MiscTest ORDER BY Third",
|
session() << "SELECT First, Second, Third, Fourth, Fifth, Sixth FROM "<< ExecUtil::misctest() <<" ORDER BY Third",
|
||||||
into(strings, bulk),
|
into(strings, bulk),
|
||||||
into(blobs, bulk(size)),
|
into(blobs, bulk(size)),
|
||||||
into(ints, bulk(size)),
|
into(ints, bulk(size)),
|
||||||
@ -313,7 +390,7 @@ public:
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "INSERT INTO MiscTest VALUES (?,?,?,?,?)",
|
session() << "INSERT INTO "<< ExecUtil::misctest() <<" VALUES (?,?,?,?,?)",
|
||||||
use(strings),
|
use(strings),
|
||||||
use(blobs),
|
use(blobs),
|
||||||
use(ints),
|
use(ints),
|
||||||
@ -322,13 +399,13 @@ public:
|
|||||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
try { session() << "DELETE FROM MiscTest", now; }
|
try { session() << "DELETE FROM "<< ExecUtil::misctest(), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "INSERT INTO MiscTest VALUES (?,?,?,?,?)",
|
session() << "INSERT INTO "<< ExecUtil::misctest() <<" VALUES (?,?,?,?,?)",
|
||||||
use(strings, bulk),
|
use(strings, bulk),
|
||||||
use(blobs, bulk),
|
use(blobs, bulk),
|
||||||
use(ints, bulk),
|
use(ints, bulk),
|
||||||
@ -345,7 +422,7 @@ public:
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT * FROM MiscTest ORDER BY First",
|
session() << "SELECT * FROM "<< ExecUtil::misctest() <<" ORDER BY First",
|
||||||
into(strings),
|
into(strings),
|
||||||
into(blobs),
|
into(blobs),
|
||||||
into(ints),
|
into(ints),
|
||||||
@ -372,14 +449,14 @@ public:
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT First FROM MiscTest", into(ints, bulk(size)), limit(size+1), now;
|
session() << "SELECT First FROM "<< ExecUtil::misctest(), into(ints, bulk(size)), limit(size+1), now;
|
||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
}
|
}
|
||||||
catch(Poco::InvalidArgumentException&){ }
|
catch(Poco::InvalidArgumentException&){ }
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT First FROM MiscTest", into(ints), bulk(size), now;
|
session() << "SELECT First FROM "<< ExecUtil::misctest(), into(ints), bulk(size), now;
|
||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
}
|
}
|
||||||
catch(Poco::InvalidAccessException&){ }
|
catch(Poco::InvalidAccessException&){ }
|
||||||
@ -392,7 +469,7 @@ public:
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT * FROM MiscTest ORDER BY First",
|
session() << "SELECT * FROM "<< ExecUtil::misctest() <<" ORDER BY First",
|
||||||
into(strings, bulk(size)),
|
into(strings, bulk(size)),
|
||||||
into(blobs, bulk(size)),
|
into(blobs, bulk(size)),
|
||||||
into(ints, bulk(size)),
|
into(ints, bulk(size)),
|
||||||
@ -435,6 +512,17 @@ public:
|
|||||||
void singleSelect();
|
void singleSelect();
|
||||||
void emptyDB();
|
void emptyDB();
|
||||||
|
|
||||||
|
void assertImpl(bool condition, const std::string& conditionExpression, long lineNumber, const std::string& fileName)
|
||||||
|
{
|
||||||
|
assertImplementation(condition, conditionExpression, lineNumber, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
void failImpl(const std::string& message, long lineNumber, const std::string& fileName)
|
||||||
|
{
|
||||||
|
fail(message, lineNumber, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void blob(int bigSize = 1024, const std::string& blobPlaceholder = "?");
|
void blob(int bigSize = 1024, const std::string& blobPlaceholder = "?");
|
||||||
|
|
||||||
template <typename C1, typename C2>
|
template <typename C1, typename C2>
|
||||||
@ -448,16 +536,16 @@ public:
|
|||||||
C1 address(size, "Address");
|
C1 address(size, "Address");
|
||||||
C2 img(size, CLOB("0123456789", 10));
|
C2 img(size, CLOB("0123456789", 10));
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(img), now; }
|
try { session() << "INSERT INTO " << ExecUtil::person() << " VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(img), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM " << ExecUtil::person(), into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == size);
|
assert (count == size);
|
||||||
|
|
||||||
C2 res;
|
C2 res;
|
||||||
try { session() << "SELECT Image FROM Person", into(res), now; }
|
try { session() << "SELECT Image FROM " << ExecUtil::person(), into(res), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (res.size() == img.size());
|
assert (res.size() == img.size());
|
||||||
@ -476,13 +564,13 @@ public:
|
|||||||
|
|
||||||
void internalExtraction();
|
void internalExtraction();
|
||||||
void filter(const std::string& query =
|
void filter(const std::string& query =
|
||||||
"SELECT * FROM Vectors ORDER BY int0 ASC",
|
"SELECT * FROM " + ExecUtil::vectors() + " ORDER BY i0 ASC",
|
||||||
const std::string& intFldName = "int0");
|
const std::string& intFldName = "i0");
|
||||||
|
|
||||||
void internalBulkExtraction();
|
void internalBulkExtraction();
|
||||||
void internalBulkExtractionUTF16();
|
void internalBulkExtractionUTF16();
|
||||||
void internalStorageType();
|
void internalStorageType();
|
||||||
void nulls();
|
void nulls(bool emptyStrIsSpace = false);
|
||||||
void notNulls(const std::string& sqlState = "23502");
|
void notNulls(const std::string& sqlState = "23502");
|
||||||
void rowIterator();
|
void rowIterator();
|
||||||
void stdVectorBool();
|
void stdVectorBool();
|
||||||
@ -493,9 +581,11 @@ public:
|
|||||||
void dynamicAny();
|
void dynamicAny();
|
||||||
|
|
||||||
void multipleResults(const std::string& sql =
|
void multipleResults(const std::string& sql =
|
||||||
"SELECT * FROM Person WHERE Age = ?; "
|
"SELECT * FROM " + ExecUtil::person() + " WHERE Age = ?; "
|
||||||
"SELECT Age FROM Person WHERE FirstName = 'Bart'; "
|
"SELECT Age FROM " + ExecUtil::person() +" WHERE FirstName = 'Bart'; "
|
||||||
"SELECT * FROM Person WHERE Age = ? OR Age = ? ORDER BY Age;");
|
"SELECT * FROM " + ExecUtil::person() + " WHERE Age = ? OR Age = ? ORDER BY Age;");
|
||||||
|
|
||||||
|
void multipleResultsNoProj(const std::string& sql);
|
||||||
|
|
||||||
void sqlChannel(const std::string& connect);
|
void sqlChannel(const std::string& connect);
|
||||||
void sqlLogger(const std::string& connect);
|
void sqlLogger(const std::string& connect);
|
||||||
@ -514,9 +604,12 @@ private:
|
|||||||
static const std::string MULTI_SELECT;
|
static const std::string MULTI_SELECT;
|
||||||
|
|
||||||
void setTransactionIsolation(Poco::Data::Session& session, Poco::UInt32 ti);
|
void setTransactionIsolation(Poco::Data::Session& session, Poco::UInt32 ti);
|
||||||
|
std::string schemaTable(const std::string& tblName) const;
|
||||||
|
|
||||||
Poco::Data::Session& session();
|
Poco::Data::Session& session();
|
||||||
Poco::Data::Session* _pSession;
|
Poco::Data::Session* _pSession;
|
||||||
|
std::string _connInitSql;
|
||||||
|
std::string _schemaName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -527,4 +620,10 @@ inline Poco::Data::Session& SQLExecutor::session()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline std::string SQLExecutor::schemaTable(const std::string& tblName) const
|
||||||
|
{
|
||||||
|
return _schemaName.empty() ? tblName : _schemaName + "." + tblName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif // SQLExecutor_INCLUDED
|
#endif // SQLExecutor_INCLUDED
|
||||||
|
34
Data/PostgreSQL/CMakeLists.txt
Normal file
34
Data/PostgreSQL/CMakeLists.txt
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
set(LIBNAME "DataPostgreSQL")
|
||||||
|
set(POCO_LIBNAME "Poco${LIBNAME}")
|
||||||
|
|
||||||
|
# Sources
|
||||||
|
file(GLOB SRCS_G "src/*.cpp")
|
||||||
|
POCO_SOURCES_AUTO( POSTGRESQL_SRCS ${SRCS_G})
|
||||||
|
|
||||||
|
# Headers
|
||||||
|
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
||||||
|
POCO_HEADERS_AUTO( POSTGRESQL_SRCS ${HDRS_G})
|
||||||
|
|
||||||
|
add_library( "${LIBNAME}" ${LIB_MODE} ${POSTGRESQL_SRCS} )
|
||||||
|
add_library( "${POCO_LIBNAME}" ALIAS "${LIBNAME}")
|
||||||
|
set_target_properties( "${LIBNAME}"
|
||||||
|
PROPERTIES
|
||||||
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
|
OUTPUT_NAME ${POCO_LIBNAME}
|
||||||
|
DEFINE_SYMBOL PostgreSQL_EXPORTS
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries( "${LIBNAME}" Foundation Data ${PostgreSQL_LIBRARIES})
|
||||||
|
target_include_directories( "${LIBNAME}"
|
||||||
|
PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
|
$<INSTALL_INTERFACE:include>
|
||||||
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
|
)
|
||||||
|
|
||||||
|
POCO_INSTALL("${LIBNAME}")
|
||||||
|
POCO_GENERATE_PACKAGE("${LIBNAME}")
|
||||||
|
|
||||||
|
if (ENABLE_TESTS)
|
||||||
|
add_subdirectory(testsuite)
|
||||||
|
endif ()
|
23
Data/PostgreSQL/Makefile
Normal file
23
Data/PostgreSQL/Makefile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#
|
||||||
|
# Makefile
|
||||||
|
#
|
||||||
|
# $Id: //poco/1.5/Data/PostgreSQL/Makefile#1 $
|
||||||
|
#
|
||||||
|
# Makefile for Poco PostgreSQL
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
|
INCLUDE += -I/usr/include/postgresql -I/usr/local/include/postgresql -I/usr/local/postgresql/include -I/opt/postgresql/include
|
||||||
|
|
||||||
|
SYSLIBS += -L/usr/lib$(LIB64SUFFIX)/postgresql -L/usr/local/lib$(LIB64SUFFIX)/postgresql -L/usr/local/postgresql/lib$(LIB64SUFFIX) -L/opt/postgresql/lib$(LIB64SUFFIX) -lpq
|
||||||
|
|
||||||
|
objects = Extractor Binder SessionImpl Connector \
|
||||||
|
PostgreSQLStatementImpl PostgreSQLException \
|
||||||
|
SessionHandle StatementExecutor PostgreSQLTypes Utility
|
||||||
|
|
||||||
|
target = PocoDataPostgreSQL
|
||||||
|
target_version = $(LIBVERSION)
|
||||||
|
target_libs = PocoData PocoFoundation
|
||||||
|
|
||||||
|
include $(POCO_BASE)/build/rules/lib
|
17
Data/PostgreSQL/PostgreSQL.progen
Normal file
17
Data/PostgreSQL/PostgreSQL.progen
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
vc.project.guid = 73E19FDE-1570-488C-B3DB-72A60FADD408
|
||||||
|
vc.project.name = PostgreSQL
|
||||||
|
vc.project.target = PocoDataPostgreSQL
|
||||||
|
vc.project.type = library
|
||||||
|
vc.project.pocobase = ..\\..
|
||||||
|
vc.project.outdir = ${vc.project.pocobase}
|
||||||
|
vc.project.platforms = Win32, x64
|
||||||
|
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||||
|
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||||
|
vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\Data\\include
|
||||||
|
vc.project.compiler.defines =
|
||||||
|
vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS
|
||||||
|
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||||
|
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||||
|
vc.project.linker.dependencies = libpq.lib
|
||||||
|
vc.solution.create = true
|
||||||
|
vc.solution.include = testsuite\\TestSuite
|
60
Data/PostgreSQL/PostgreSQL_VS90.sln
Normal file
60
Data/PostgreSQL/PostgreSQL_VS90.sln
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual Studio 2008
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_vs90.vcproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs90.vcproj", "{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408} = {73E19FDE-1570-488C-B3DB-72A60FADD408}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|Win32 = debug_shared|Win32
|
||||||
|
release_shared|Win32 = release_shared|Win32
|
||||||
|
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||||
|
release_static_mt|Win32 = release_static_mt|Win32
|
||||||
|
debug_static_md|Win32 = debug_static_md|Win32
|
||||||
|
release_static_md|Win32 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
449
Data/PostgreSQL/PostgreSQL_VS90.vcproj
Normal file
449
Data/PostgreSQL/PostgreSQL_VS90.vcproj
Normal file
@ -0,0 +1,449 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
Name="PostgreSQL"
|
||||||
|
Version="9.00"
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
ProjectGUID="{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
RootNamespace="PostgreSQL"
|
||||||
|
Keyword="Win32Proj">
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles/>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_shared|Win32"
|
||||||
|
OutputDirectory="obj\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS"
|
||||||
|
StringPooling="true"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpq.lib"
|
||||||
|
OutputFile="..\..\bin\PocoDataPostgreSQLd.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="..\..\bin\PocoDataPostgreSQLd.pdb"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
ImportLibrary="..\..\lib\PocoDataPostgreSQLd.lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_shared|Win32"
|
||||||
|
OutputDirectory="obj\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="false"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpq.lib"
|
||||||
|
OutputFile="..\..\bin\PocoDataPostgreSQL.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
ImportLibrary="..\..\lib\PocoDataPostgreSQL.lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_static_mt|Win32"
|
||||||
|
OutputDirectory="obj\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||||
|
StringPooling="true"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ProgramDataBaseFileName="..\..\lib\PocoDataPostgreSQLmtd.pdb"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="..\..\lib\PocoDataPostgreSQLmtd.lib"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_static_mt|Win32"
|
||||||
|
OutputDirectory="obj\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
BufferSecurityCheck="false"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="..\..\lib\PocoDataPostgreSQLmt.lib"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_static_md|Win32"
|
||||||
|
OutputDirectory="obj\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||||
|
StringPooling="true"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ProgramDataBaseFileName="..\..\lib\PocoDataPostgreSQLmdd.pdb"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="..\..\lib\PocoDataPostgreSQLmdd.lib"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_static_md|Win32"
|
||||||
|
OutputDirectory="obj\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="false"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="..\..\lib\PocoDataPostgreSQLmd.lib"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References/>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Binder.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Connector.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Extractor.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\PostgreSQLException.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\PostgreSQLStatementImpl.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\PostgreSQLTypes.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\SessionHandle.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\SessionImpl.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\StatementExecutor.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Utility.cpp"/>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\Binder.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\Connector.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\Extractor.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\PostgreSQL.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\PostgreSQLException.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\PostgreSQLTypes.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\SessionHandle.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\SessionImpl.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\StatementExecutor.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\Utility.h"/>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"/>
|
||||||
|
</Files>
|
||||||
|
<Globals/>
|
||||||
|
</VisualStudioProject>
|
60
Data/PostgreSQL/PostgreSQL_vs100.sln
Normal file
60
Data/PostgreSQL/PostgreSQL_vs100.sln
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_vs100.vcxproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs100.vcxproj", "{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408} = {73E19FDE-1570-488C-B3DB-72A60FADD408}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|Win32 = debug_shared|Win32
|
||||||
|
release_shared|Win32 = release_shared|Win32
|
||||||
|
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||||
|
release_static_mt|Win32 = release_static_mt|Win32
|
||||||
|
debug_static_md|Win32 = debug_static_md|Win32
|
||||||
|
release_static_md|Win32 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
304
Data/PostgreSQL/PostgreSQL_vs100.vcxproj
Normal file
304
Data/PostgreSQL/PostgreSQL_vs100.vcxproj
Normal file
@ -0,0 +1,304 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|Win32">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|Win32">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>PostgreSQL</ProjectName>
|
||||||
|
<ProjectGuid>{73E19FDE-1570-488C-B3DB-72A60FADD408}</ProjectGuid>
|
||||||
|
<RootNamespace>PostgreSQL</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros"/>
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">..\..\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">..\..\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">..\..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">..\..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">..\..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">..\..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoDataPostgreSQLd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoDataPostgreSQLmdd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoDataPostgreSQLmtd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">PocoDataPostgreSQL</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">PocoDataPostgreSQLmd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoDataPostgreSQLmt</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin\PocoDataPostgreSQLd.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>..\..\bin\PocoDataPostgreSQLd.pdb</ProgramDatabaseFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<ImportLibrary>..\..\lib\PocoDataPostgreSQLd.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin\PocoDataPostgreSQL.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<ImportLibrary>..\..\lib\PocoDataPostgreSQL.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\..\lib\PocoDataPostgreSQLmtd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmtd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmt.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\..\lib\PocoDataPostgreSQLmdd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmdd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\..\lib\PocoDataPostgreSQLmd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp"/>
|
||||||
|
<ClCompile Include="src\Connector.cpp"/>
|
||||||
|
<ClCompile Include="src\Extractor.cpp"/>
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp"/>
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp"/>
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp"/>
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp"/>
|
||||||
|
<ClCompile Include="src\Utility.cpp"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
|
</Project>
|
84
Data/PostgreSQL/PostgreSQL_vs100.vcxproj.filters
Normal file
84
Data/PostgreSQL/PostgreSQL_vs100.vcxproj.filters
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Connector.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Extractor.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Utility.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
60
Data/PostgreSQL/PostgreSQL_vs110.sln
Normal file
60
Data/PostgreSQL/PostgreSQL_vs110.sln
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_vs110.vcxproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs110.vcxproj", "{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408} = {73E19FDE-1570-488C-B3DB-72A60FADD408}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|Win32 = debug_shared|Win32
|
||||||
|
release_shared|Win32 = release_shared|Win32
|
||||||
|
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||||
|
release_static_mt|Win32 = release_static_mt|Win32
|
||||||
|
debug_static_md|Win32 = debug_static_md|Win32
|
||||||
|
release_static_md|Win32 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
309
Data/PostgreSQL/PostgreSQL_vs110.vcxproj
Normal file
309
Data/PostgreSQL/PostgreSQL_vs110.vcxproj
Normal file
@ -0,0 +1,309 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|Win32">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|Win32">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>PostgreSQL</ProjectName>
|
||||||
|
<ProjectGuid>{73E19FDE-1570-488C-B3DB-72A60FADD408}</ProjectGuid>
|
||||||
|
<RootNamespace>PostgreSQL</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoDataPostgreSQLd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoDataPostgreSQLmdd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoDataPostgreSQLmtd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">PocoDataPostgreSQL</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">PocoDataPostgreSQLmd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoDataPostgreSQLmt</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<OutDir>..\..\bin\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<OutDir>..\..\bin\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<OutDir>..\..\lib\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<OutDir>..\..\lib\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<OutDir>..\..\lib\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<OutDir>..\..\lib\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin\PocoDataPostgreSQLd.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>..\..\bin\PocoDataPostgreSQLd.pdb</ProgramDatabaseFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<ImportLibrary>..\..\lib\PocoDataPostgreSQLd.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin\PocoDataPostgreSQL.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<ImportLibrary>..\..\lib\PocoDataPostgreSQL.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<ProgramDataBaseFileName>..\..\lib\PocoDataPostgreSQLmtd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmtd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmt.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<ProgramDataBaseFileName>..\..\lib\PocoDataPostgreSQLmdd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmdd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<ProgramDataBaseFileName>..\..\lib\PocoDataPostgreSQLmd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp" />
|
||||||
|
<ClCompile Include="src\Connector.cpp" />
|
||||||
|
<ClCompile Include="src\Extractor.cpp" />
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp" />
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp" />
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp" />
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp" />
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp" />
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp" />
|
||||||
|
<ClCompile Include="src\Utility.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
|
</Project>
|
84
Data/PostgreSQL/PostgreSQL_vs110.vcxproj.filters
Normal file
84
Data/PostgreSQL/PostgreSQL_vs110.vcxproj.filters
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Connector.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Extractor.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Utility.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
50
Data/PostgreSQL/PostgreSQL_vs120.sln
Normal file
50
Data/PostgreSQL/PostgreSQL_vs120.sln
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Express 2013 for Windows Desktop
|
||||||
|
VisualStudioVersion = 12.0.40629.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_vs120.vcxproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs120.vcxproj", "{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408} = {73E19FDE-1570-488C-B3DB-72A60FADD408}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|Win32 = debug_shared|Win32
|
||||||
|
debug_static_md|Win32 = debug_static_md|Win32
|
||||||
|
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||||
|
release_shared|Win32 = release_shared|Win32
|
||||||
|
release_static_md|Win32 = release_static_md|Win32
|
||||||
|
release_static_mt|Win32 = release_static_mt|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
308
Data/PostgreSQL/PostgreSQL_vs120.vcxproj
Normal file
308
Data/PostgreSQL/PostgreSQL_vs120.vcxproj
Normal file
@ -0,0 +1,308 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|Win32">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|Win32">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>PostgreSQL</ProjectName>
|
||||||
|
<ProjectGuid>{73E19FDE-1570-488C-B3DB-72A60FADD408}</ProjectGuid>
|
||||||
|
<RootNamespace>PostgreSQL</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoDataPostgreSQLd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoDataPostgreSQLmdd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoDataPostgreSQLmtd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">PocoDataPostgreSQL</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">PocoDataPostgreSQLmd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoDataPostgreSQLmt</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<OutDir>..\..\bin\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<OutDir>..\..\bin\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<OutDir>..\..\lib\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<OutDir>..\..\lib\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<OutDir>..\..\lib\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<OutDir>..\..\lib\</OutDir>
|
||||||
|
<IntDir>obj\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin\PocoDataPostgreSQLd.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>..\..\bin\PocoDataPostgreSQLd.pdb</ProgramDatabaseFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<ImportLibrary>..\..\lib\PocoDataPostgreSQLd.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnit.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin\PocoDataPostgreSQL.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<ImportLibrary>..\..\lib\PocoDataPostgreSQL.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<ProgramDataBaseFileName>..\..\lib\PocoDataPostgreSQLmtd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmtd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmt.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<ProgramDataBaseFileName>..\..\lib\PocoDataPostgreSQLmdd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmdd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<ProgramDataBaseFileName>..\..\lib\PocoDataPostgreSQLmd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\lib\PocoDataPostgreSQLmd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp" />
|
||||||
|
<ClCompile Include="src\Connector.cpp" />
|
||||||
|
<ClCompile Include="src\Extractor.cpp" />
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp" />
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp" />
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp" />
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp" />
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp" />
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp" />
|
||||||
|
<ClCompile Include="src\Utility.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
|
</Project>
|
84
Data/PostgreSQL/PostgreSQL_vs120.vcxproj.filters
Normal file
84
Data/PostgreSQL/PostgreSQL_vs120.vcxproj.filters
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Connector.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Extractor.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Utility.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
60
Data/PostgreSQL/PostgreSQL_vs140.sln
Normal file
60
Data/PostgreSQL/PostgreSQL_vs140.sln
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 14.00
|
||||||
|
# Visual Studio 2015
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_vs140.vcxproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs140.vcxproj", "{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408} = {73E19FDE-1570-488C-B3DB-72A60FADD408}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|Win32 = debug_shared|Win32
|
||||||
|
release_shared|Win32 = release_shared|Win32
|
||||||
|
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||||
|
release_static_mt|Win32 = release_static_mt|Win32
|
||||||
|
debug_static_md|Win32 = debug_static_md|Win32
|
||||||
|
release_static_md|Win32 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
60
Data/PostgreSQL/PostgreSQL_x64_vs100.sln
Normal file
60
Data/PostgreSQL/PostgreSQL_x64_vs100.sln
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_x64_vs100.vcxproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs100.vcxproj", "{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408} = {73E19FDE-1570-488C-B3DB-72A60FADD408}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|x64 = debug_shared|x64
|
||||||
|
release_shared|x64 = release_shared|x64
|
||||||
|
debug_static_mt|x64 = debug_static_mt|x64
|
||||||
|
release_static_mt|x64 = release_static_mt|x64
|
||||||
|
debug_static_md|x64 = debug_static_md|x64
|
||||||
|
release_static_md|x64 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
302
Data/PostgreSQL/PostgreSQL_x64_vs100.vcxproj
Normal file
302
Data/PostgreSQL/PostgreSQL_x64_vs100.vcxproj
Normal file
@ -0,0 +1,302 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|x64">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|x64">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|x64">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|x64">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>PostgreSQL</ProjectName>
|
||||||
|
<ProjectGuid>{73E19FDE-1570-488C-B3DB-72A60FADD408}</ProjectGuid>
|
||||||
|
<RootNamespace>PostgreSQL</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros"/>
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">..\..\bin64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">..\..\bin64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">..\..\lib64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">..\..\lib64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">..\..\lib64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">..\..\lib64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoDataPostgreSQL64d</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">PocoDataPostgreSQLmdd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">PocoDataPostgreSQLmtd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">PocoDataPostgreSQL64</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">PocoDataPostgreSQLmd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">PocoDataPostgreSQLmt</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin64\PocoDataPostgreSQL64d.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>..\..\bin64\PocoDataPostgreSQL64d.pdb</ProgramDatabaseFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<ImportLibrary>..\..\lib64\PocoDataPostgreSQLd.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin64\PocoDataPostgreSQL64.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<ImportLibrary>..\..\lib64\PocoDataPostgreSQL.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\..\lib64\PocoDataPostgreSQLmtd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmtd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmt.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\..\lib64\PocoDataPostgreSQLmdd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmdd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp"/>
|
||||||
|
<ClCompile Include="src\Connector.cpp"/>
|
||||||
|
<ClCompile Include="src\Extractor.cpp"/>
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp"/>
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp"/>
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp"/>
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp"/>
|
||||||
|
<ClCompile Include="src\Utility.cpp"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
|
</Project>
|
84
Data/PostgreSQL/PostgreSQL_x64_vs100.vcxproj.filters
Normal file
84
Data/PostgreSQL/PostgreSQL_x64_vs100.vcxproj.filters
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Connector.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Extractor.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Utility.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
60
Data/PostgreSQL/PostgreSQL_x64_vs110.sln
Normal file
60
Data/PostgreSQL/PostgreSQL_x64_vs110.sln
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_x64_vs110.vcxproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs110.vcxproj", "{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408} = {73E19FDE-1570-488C-B3DB-72A60FADD408}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|x64 = debug_shared|x64
|
||||||
|
release_shared|x64 = release_shared|x64
|
||||||
|
debug_static_mt|x64 = debug_static_mt|x64
|
||||||
|
release_static_mt|x64 = release_static_mt|x64
|
||||||
|
debug_static_md|x64 = debug_static_md|x64
|
||||||
|
release_static_md|x64 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
306
Data/PostgreSQL/PostgreSQL_x64_vs110.vcxproj
Normal file
306
Data/PostgreSQL/PostgreSQL_x64_vs110.vcxproj
Normal file
@ -0,0 +1,306 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|x64">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|x64">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|x64">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|x64">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>PostgreSQL</ProjectName>
|
||||||
|
<ProjectGuid>{73E19FDE-1570-488C-B3DB-72A60FADD408}</ProjectGuid>
|
||||||
|
<RootNamespace>PostgreSQL</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros"/>
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoDataPostgreSQL64d</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">PocoDataPostgreSQLmdd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">PocoDataPostgreSQLmtd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">PocoDataPostgreSQL64</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">PocoDataPostgreSQLmd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">PocoDataPostgreSQLmt</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||||
|
<OutDir>..\..\bin64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||||
|
<OutDir>..\..\bin64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
|
<OutDir>..\..\lib64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||||
|
<OutDir>..\..\lib64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
|
<OutDir>..\..\lib64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||||
|
<OutDir>..\..\lib64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin64\PocoDataPostgreSQL64d.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>..\..\bin64\PocoDataPostgreSQL64d.pdb</ProgramDatabaseFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<ImportLibrary>..\..\lib64\PocoDataPostgreSQLd.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin64\PocoDataPostgreSQL64.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<ImportLibrary>..\..\lib64\PocoDataPostgreSQL.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\..\lib64\PocoDataPostgreSQLmtd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmtd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmt.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\..\lib64\PocoDataPostgreSQLmdd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmdd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp"/>
|
||||||
|
<ClCompile Include="src\Connector.cpp"/>
|
||||||
|
<ClCompile Include="src\Extractor.cpp"/>
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp"/>
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp"/>
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp"/>
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp"/>
|
||||||
|
<ClCompile Include="src\Utility.cpp"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
|
</Project>
|
84
Data/PostgreSQL/PostgreSQL_x64_vs110.vcxproj.filters
Normal file
84
Data/PostgreSQL/PostgreSQL_x64_vs110.vcxproj.filters
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Connector.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Extractor.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Utility.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
47
Data/PostgreSQL/PostgreSQL_x64_vs120.sln
Normal file
47
Data/PostgreSQL/PostgreSQL_x64_vs120.sln
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Express 2013 for Windows Desktop
|
||||||
|
VisualStudioVersion = 12.0.40629.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_x64_vs120.vcxproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs120.vcxproj", "{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|x64 = debug_shared|x64
|
||||||
|
debug_static_md|x64 = debug_static_md|x64
|
||||||
|
debug_static_mt|x64 = debug_static_mt|x64
|
||||||
|
release_shared|x64 = release_shared|x64
|
||||||
|
release_static_md|x64 = release_static_md|x64
|
||||||
|
release_static_mt|x64 = release_static_mt|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
306
Data/PostgreSQL/PostgreSQL_x64_vs120.vcxproj
Normal file
306
Data/PostgreSQL/PostgreSQL_x64_vs120.vcxproj
Normal file
@ -0,0 +1,306 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|x64">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|x64">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|x64">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|x64">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>PostgreSQL</ProjectName>
|
||||||
|
<ProjectGuid>{73E19FDE-1570-488C-B3DB-72A60FADD408}</ProjectGuid>
|
||||||
|
<RootNamespace>PostgreSQL</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoDataPostgreSQL64d</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">PocoDataPostgreSQLmdd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">PocoDataPostgreSQLmtd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">PocoDataPostgreSQL64</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">PocoDataPostgreSQLmd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">PocoDataPostgreSQLmt</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||||
|
<OutDir>..\..\bin64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||||
|
<OutDir>..\..\bin64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
|
<OutDir>..\..\lib64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||||
|
<OutDir>..\..\lib64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
|
<OutDir>..\..\lib64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||||
|
<OutDir>..\..\lib64\</OutDir>
|
||||||
|
<IntDir>obj64\PostgreSQL\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin64\PocoDataPostgreSQL64d.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>..\..\bin64\PocoDataPostgreSQL64d.pdb</ProgramDatabaseFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<ImportLibrary>..\..\lib64\PocoDataPostgreSQLd.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\..\bin64\PocoDataPostgreSQL64.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<ImportLibrary>..\..\lib64\PocoDataPostgreSQL.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<ProgramDataBaseFileName>..\..\lib64\PocoDataPostgreSQLmtd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmtd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmt.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<ProgramDataBaseFileName>..\..\lib64\PocoDataPostgreSQLmdd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmdd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\..\lib64\PocoDataPostgreSQLmd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Binder.cpp" />
|
||||||
|
<ClCompile Include="src\Connector.cpp" />
|
||||||
|
<ClCompile Include="src\Extractor.cpp" />
|
||||||
|
<ClCompile Include="src\PostgreSQLException.cpp" />
|
||||||
|
<ClCompile Include="src\PostgreSQLStatementImpl.cpp" />
|
||||||
|
<ClCompile Include="src\PostgreSQLTypes.cpp" />
|
||||||
|
<ClCompile Include="src\SessionHandle.cpp" />
|
||||||
|
<ClCompile Include="src\SessionImpl.cpp" />
|
||||||
|
<ClCompile Include="src\StatementExecutor.cpp" />
|
||||||
|
<ClCompile Include="src\Utility.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Binder.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Connector.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Extractor.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQL.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLException.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\PostgreSQLTypes.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionHandle.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\SessionImpl.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\StatementExecutor.h" />
|
||||||
|
<ClInclude Include="include\Poco\Data\PostgreSQL\Utility.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
|
</Project>
|
60
Data/PostgreSQL/PostgreSQL_x64_vs140.sln
Normal file
60
Data/PostgreSQL/PostgreSQL_x64_vs140.sln
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 14.00
|
||||||
|
# Visual Studio 2015
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_x64_vs140.vcxproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs140.vcxproj", "{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408} = {73E19FDE-1570-488C-B3DB-72A60FADD408}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|x64 = debug_shared|x64
|
||||||
|
release_shared|x64 = release_shared|x64
|
||||||
|
debug_static_mt|x64 = debug_static_mt|x64
|
||||||
|
release_static_mt|x64 = release_static_mt|x64
|
||||||
|
debug_static_md|x64 = debug_static_md|x64
|
||||||
|
release_static_md|x64 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
60
Data/PostgreSQL/PostgreSQL_x64_vs90.sln
Normal file
60
Data/PostgreSQL/PostgreSQL_x64_vs90.sln
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual Studio 2008
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_x64_vs90.vcproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs90.vcproj", "{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408} = {73E19FDE-1570-488C-B3DB-72A60FADD408}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|x64 = debug_shared|x64
|
||||||
|
release_shared|x64 = release_shared|x64
|
||||||
|
debug_static_mt|x64 = debug_static_mt|x64
|
||||||
|
release_static_mt|x64 = release_static_mt|x64
|
||||||
|
debug_static_md|x64 = debug_static_md|x64
|
||||||
|
release_static_md|x64 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{73E19FDE-1570-488C-B3DB-72A60FADD408}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
454
Data/PostgreSQL/PostgreSQL_x64_vs90.vcproj
Normal file
454
Data/PostgreSQL/PostgreSQL_x64_vs90.vcproj
Normal file
@ -0,0 +1,454 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
Name="PostgreSQL"
|
||||||
|
Version="9.00"
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
ProjectGUID="{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||||
|
RootNamespace="PostgreSQL"
|
||||||
|
Keyword="Win32Proj">
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="x64"/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles/>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_shared|x64"
|
||||||
|
OutputDirectory="obj64\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS"
|
||||||
|
StringPooling="true"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpq.lib"
|
||||||
|
OutputFile="..\..\bin64\PocoDataPostgreSQL64d.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="..\..\bin64\PocoDataPostgreSQL64d.pdb"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib64"
|
||||||
|
SubSystem="1"
|
||||||
|
ImportLibrary="..\..\lib64\PocoDataPostgreSQLd.lib"
|
||||||
|
TargetMachine="17"
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_shared|x64"
|
||||||
|
OutputDirectory="obj64\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PostgreSQL_EXPORTS"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="false"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpq.lib"
|
||||||
|
OutputFile="..\..\bin64\PocoDataPostgreSQL64.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib64"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
OptimizeForWindows98="0"
|
||||||
|
ImportLibrary="..\..\lib64\PocoDataPostgreSQL.lib"
|
||||||
|
TargetMachine="17"
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_static_mt|x64"
|
||||||
|
OutputDirectory="obj64\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||||
|
StringPooling="true"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ProgramDataBaseFileName="..\..\lib64\PocoDataPostgreSQLmtd.pdb"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="..\..\lib64\PocoDataPostgreSQLmtd.lib"
|
||||||
|
TargetMachine="17"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_static_mt|x64"
|
||||||
|
OutputDirectory="obj64\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
BufferSecurityCheck="false"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="..\..\lib64\PocoDataPostgreSQLmt.lib"
|
||||||
|
TargetMachine="17"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_static_md|x64"
|
||||||
|
OutputDirectory="obj64\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||||
|
StringPooling="true"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ProgramDataBaseFileName="..\..\lib64\PocoDataPostgreSQLmdd.pdb"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="..\..\lib64\PocoDataPostgreSQLmdd.lib"
|
||||||
|
TargetMachine="17"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_static_md|x64"
|
||||||
|
OutputDirectory="obj64\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="false"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CompileAs="0"
|
||||||
|
DisableSpecificWarnings=""
|
||||||
|
AdditionalOptions=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="..\..\lib64\PocoDataPostgreSQLmd.lib"
|
||||||
|
TargetMachine="17"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References/>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Binder.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Connector.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Extractor.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\PostgreSQLException.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\PostgreSQLStatementImpl.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\PostgreSQLTypes.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\SessionHandle.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\SessionImpl.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\StatementExecutor.cpp"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Utility.cpp"/>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\Binder.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\Connector.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\Extractor.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\PostgreSQL.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\PostgreSQLException.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\PostgreSQLStatementImpl.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\PostgreSQLTypes.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\SessionHandle.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\SessionImpl.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\StatementExecutor.h"/>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Data\PostgreSQL\Utility.h"/>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"/>
|
||||||
|
</Files>
|
||||||
|
<Globals/>
|
||||||
|
</VisualStudioProject>
|
4
Data/PostgreSQL/cmake/PocoDataPostgreSQLConfig.cmake
Normal file
4
Data/PostgreSQL/cmake/PocoDataPostgreSQLConfig.cmake
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
include(CMakeFindDependencyMacro)
|
||||||
|
find_dependency(PocoFoundation)
|
||||||
|
find_dependency(PocoData)
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/PocoDataPostgreSQLTargets.cmake")
|
2
Data/PostgreSQL/dependencies
Normal file
2
Data/PostgreSQL/dependencies
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Foundation
|
||||||
|
Data
|
285
Data/PostgreSQL/include/Poco/Data/PostgreSQL/Binder.h
Normal file
285
Data/PostgreSQL/include/Poco/Data/PostgreSQL/Binder.h
Normal file
@ -0,0 +1,285 @@
|
|||||||
|
//
|
||||||
|
// Binder.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.5/Data/PostgreSQL/include/Poco/Data/PostgreSQL/Binder.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Data
|
||||||
|
// Package: PostgreSQL
|
||||||
|
// Module: Binder
|
||||||
|
//
|
||||||
|
// Definition of the Binder class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Data_PostgreSQL_Binder_INCLUDED
|
||||||
|
#define Data_PostgreSQL_Binder_INCLUDED
|
||||||
|
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQL.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQLTypes.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQLException.h"
|
||||||
|
|
||||||
|
#include "Poco/Data/AbstractBinder.h"
|
||||||
|
#include "Poco/Data/MetaColumn.h"
|
||||||
|
#include "Poco/Data/LOB.h"
|
||||||
|
#include "Poco/Types.h"
|
||||||
|
|
||||||
|
#include <libpq-fe.h>
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace Data {
|
||||||
|
namespace PostgreSQL {
|
||||||
|
|
||||||
|
|
||||||
|
class PostgreSQL_API Binder: public Poco::Data::AbstractBinder
|
||||||
|
/// Binds INPUT (only) placeholders in the sql query to the provided values.
|
||||||
|
/// Allows data type mapping at statement execution time.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef SharedPtr<Binder> Ptr;
|
||||||
|
|
||||||
|
Binder();
|
||||||
|
/// Creates the Binder.
|
||||||
|
|
||||||
|
virtual ~Binder();
|
||||||
|
/// Destroys the Binder.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Poco::Int8& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds an Int8.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Poco::UInt8& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds an UInt8.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Poco::Int16& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds an Int16.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Poco::UInt16& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds an UInt16.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Poco::Int32& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds an Int32.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Poco::UInt32& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds an UInt32.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Poco::Int64& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds an Int64.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Poco::UInt64& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds an UInt64.
|
||||||
|
|
||||||
|
#ifndef POCO_LONG_IS_64_BIT
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const long& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a long.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const unsigned long& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds an unsigned long.
|
||||||
|
|
||||||
|
#endif // POCO_LONG_IS_64_BIT
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const bool& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a boolean.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const float& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a float.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const double& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a double.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const char& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a single character.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::string& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a string.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Poco::Data::BLOB& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a BLOB.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Poco::Data::CLOB& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a CLOB.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const DateTime& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a DateTime.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Date& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a Date.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const Time& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||||
|
/// Binds a Time.
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const NullData& val, Direction dir = PD_IN, const std::type_info& bindType = typeid(void));
|
||||||
|
/// 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::deque<Poco::Int8>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<Poco::Int8>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<Poco::UInt8>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<Poco::UInt8>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<Poco::UInt8>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<Poco::Int16>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<Poco::Int16>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<Poco::Int16>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<Poco::UInt16>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<Poco::UInt16>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<Poco::UInt16>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<Poco::Int32>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
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::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::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::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::vector<bool>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<bool>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<bool>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<float>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<float>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<float>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<double>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<double>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<double>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<char>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<char>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<char>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<BLOB>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<BLOB>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<BLOB>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<CLOB>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<CLOB>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<CLOB>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<DateTime>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<DateTime>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<DateTime>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<Date>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<Date>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<Date>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<Time>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<Time>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
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, const std::type_info& bindType = typeid(void));
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<NullData>& val, Direction dir = PD_IN, const std::type_info& bindType = typeid(void));
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<NullData>& val, Direction dir = PD_IN, const std::type_info& bindType = typeid(void));
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::vector<std::string>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::deque<std::string>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
virtual void bind(std::size_t pos, const std::list<std::string>& val, Direction dir = PD_IN);
|
||||||
|
|
||||||
|
std::size_t size() const;
|
||||||
|
/// Return count of bound parameters
|
||||||
|
|
||||||
|
InputParameterVector bindVector() const;
|
||||||
|
/// Return the vector of bound parameters.
|
||||||
|
|
||||||
|
void updateBindVectorToCurrentValues();
|
||||||
|
/// obtain the current version of the bound data and update the internal representation
|
||||||
|
|
||||||
|
private:
|
||||||
|
Binder(const Binder&);
|
||||||
|
/// Don't copy the binder
|
||||||
|
|
||||||
|
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.
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void realBind(std::size_t aPosition, Poco::Data::MetaColumn::ColumnDataType aFieldType, const void* aBufferPtr, std::size_t aLength);
|
||||||
|
/// Common bind implementation
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
InputParameterVector _bindVector;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::Data::PostgreSQL
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Data_PostgreSQL_Binder_INCLUDED
|
141
Data/PostgreSQL/include/Poco/Data/PostgreSQL/Connector.h
Normal file
141
Data/PostgreSQL/include/Poco/Data/PostgreSQL/Connector.h
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
//
|
||||||
|
// Connector.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.5/Data/PostgreSQL/include/Poco/Data/PostgreSQL/Connector.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Data
|
||||||
|
// Package: PostgreSQL
|
||||||
|
// Module: Connector
|
||||||
|
//
|
||||||
|
// Definition of the Connector class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef Data_PostgreSQL_Connector_INCLUDED
|
||||||
|
#define Data_PostgreSQL_Connector_INCLUDED
|
||||||
|
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQL.h"
|
||||||
|
#include "Poco/Data/SessionImpl.h"
|
||||||
|
#include "Poco/Data/Connector.h"
|
||||||
|
|
||||||
|
#include "Poco/AutoPtr.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
// Note: to avoid static (de)initialization problems,
|
||||||
|
// during connector automatic (un)registration, it is
|
||||||
|
// best to have this as a macro.
|
||||||
|
|
||||||
|
#define POCO_DATA_POSTGRESQL_CONNECTOR_NAME "postgresql"
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace Data {
|
||||||
|
namespace PostgreSQL {
|
||||||
|
|
||||||
|
class PostgreSQL_API Connector: public Poco::Data::Connector
|
||||||
|
/// Connector instantiates PostgreSQL SessionImpl objects.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
static std::string KEY;
|
||||||
|
|
||||||
|
Connector();
|
||||||
|
/// Creates the Connector.
|
||||||
|
|
||||||
|
virtual ~Connector();
|
||||||
|
/// Destroys the Connector.
|
||||||
|
|
||||||
|
virtual const std::string& name() const;
|
||||||
|
/// Returns the name associated with this connector.
|
||||||
|
|
||||||
|
virtual Poco::AutoPtr<Poco::Data::SessionImpl> createSession(const std::string& aConnectionString,
|
||||||
|
std::size_t aTimeout = Poco::Data::SessionImpl::LOGIN_TIMEOUT_DEFAULT);
|
||||||
|
/// Creates a PostgreSQL SessionImpl object and initializes it with the given connectionString.
|
||||||
|
|
||||||
|
static void registerConnector();
|
||||||
|
/// Registers the Connector under the Keyword Connector::KEY at the Poco::Data::SessionFactory
|
||||||
|
|
||||||
|
static void unregisterConnector();
|
||||||
|
/// Unregisters the Connector under the Keyword Connector::KEY at the Poco::Data::SessionFactory
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::Data::PostgreSQL
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Automatic Connector registration
|
||||||
|
//
|
||||||
|
|
||||||
|
struct PostgreSQL_API PostgreSQLConnectorRegistrator
|
||||||
|
/// Connector registering class.
|
||||||
|
/// A global instance of this class is instantiated
|
||||||
|
/// with sole purpose to automatically register the
|
||||||
|
/// PostgreSQL connector with central Poco Data registry.
|
||||||
|
{
|
||||||
|
PostgreSQLConnectorRegistrator()
|
||||||
|
/// Calls Poco::Data::PostgreSQL::registerConnector();
|
||||||
|
{
|
||||||
|
Poco::Data::PostgreSQL::Connector::registerConnector();
|
||||||
|
}
|
||||||
|
|
||||||
|
~PostgreSQLConnectorRegistrator()
|
||||||
|
/// Calls Poco::Data::PostgreSQL::unregisterConnector();
|
||||||
|
{
|
||||||
|
Poco::Data::PostgreSQL::Connector::unregisterConnector();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(POCO_NO_AUTOMATIC_LIB_INIT)
|
||||||
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
extern "C" const struct PostgreSQL_API PostgreSQLConnectorRegistrator pocoPostgreSQLConnectorRegistrator;
|
||||||
|
#if defined(PostgreSQL_EXPORTS)
|
||||||
|
#if defined(_WIN64)
|
||||||
|
#define POCO_DATA_POSTGRESQL_FORCE_SYMBOL(s) __pragma(comment (linker, "/export:"#s))
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
#define POCO_DATA_POSTGRESQL_FORCE_SYMBOL(s) __pragma(comment (linker, "/export:_"#s))
|
||||||
|
#endif
|
||||||
|
#else // !PostgreSQL_EXPORTS
|
||||||
|
#if defined(_WIN64)
|
||||||
|
#define POCO_DATA_POSTGRESQL_FORCE_SYMBOL(s) __pragma(comment (linker, "/include:"#s))
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
#define POCO_DATA_POSTGRESQL_FORCE_SYMBOL(s) __pragma(comment (linker, "/include:_"#s))
|
||||||
|
#endif
|
||||||
|
#endif // PostgreSQL_EXPORTS
|
||||||
|
#else // !POCO_OS_FAMILY_WINDOWS
|
||||||
|
#define POCO_DATA_POSTGRESQL_FORCE_SYMBOL(s) extern "C" const struct PostgreSQLConnectorRegistrator s;
|
||||||
|
#endif // POCO_OS_FAMILY_WINDOWS
|
||||||
|
POCO_DATA_POSTGRESQL_FORCE_SYMBOL(pocoPostgreSQLConnectorRegistrator)
|
||||||
|
#endif // POCO_NO_AUTOMATIC_LIB_INIT
|
||||||
|
|
||||||
|
//
|
||||||
|
// End automatic Connector registration
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Data_PostgreSQL_Connector_INCLUDED
|
390
Data/PostgreSQL/include/Poco/Data/PostgreSQL/Extractor.h
Normal file
390
Data/PostgreSQL/include/Poco/Data/PostgreSQL/Extractor.h
Normal file
@ -0,0 +1,390 @@
|
|||||||
|
//
|
||||||
|
// Extractor.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.5/Data/PostgreSQL/include/Poco/Data/PostgreSQL/Extractor.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Data
|
||||||
|
// Package: PostgreSQL
|
||||||
|
// Module: Extractor
|
||||||
|
//
|
||||||
|
// Definition of the Extractor class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Data_PostgreSQL_Extractor_INCLUDED
|
||||||
|
#define Data_PostgreSQL_Extractor_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQL.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQLTypes.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/StatementExecutor.h"
|
||||||
|
|
||||||
|
#include "Poco/Data/AbstractExtractor.h"
|
||||||
|
#include "Poco/Data/LOB.h"
|
||||||
|
|
||||||
|
#include "Poco/Types.h"
|
||||||
|
#include "Poco/Any.h"
|
||||||
|
#include "Poco/DynamicAny.h"
|
||||||
|
#include "Poco/Dynamic/Var.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
|
||||||
|
//namespace Dynamic {
|
||||||
|
// class Var;
|
||||||
|
//}
|
||||||
|
|
||||||
|
namespace Data {
|
||||||
|
namespace PostgreSQL {
|
||||||
|
|
||||||
|
|
||||||
|
class PostgreSQL_API Extractor: public Poco::Data::AbstractExtractor
|
||||||
|
/// Extracts and converts data values from the result row returned by PostgreSQL.
|
||||||
|
/// If NULL is received, the incoming val value is not changed and false is returned
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef SharedPtr<Extractor> Ptr;
|
||||||
|
|
||||||
|
Extractor(StatementExecutor& st);
|
||||||
|
/// Creates the Extractor.
|
||||||
|
|
||||||
|
virtual ~Extractor();
|
||||||
|
/// Destroys the Extractor.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, char& val);
|
||||||
|
/// Extracts a single character.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::string& val);
|
||||||
|
/// Extracts a string.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, Poco::Data::BLOB& val);
|
||||||
|
/// Extracts a BLOB.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, Poco::Data::CLOB& val);
|
||||||
|
/// Extracts a CLOB.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, DateTime& val);
|
||||||
|
/// Extracts a DateTime. Returns false if null was received.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, Date& val);
|
||||||
|
/// Extracts a Date. Returns false if null was received.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, Time& val);
|
||||||
|
/// Extracts a Time. Returns false if null was received.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, Any& val);
|
||||||
|
/// Extracts an Any. Returns false if null was received.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, Dynamic::Var& val);
|
||||||
|
/// Extracts a Dynamic::Var. Returns false if null was received.
|
||||||
|
|
||||||
|
virtual bool isNull(std::size_t col, std::size_t row);
|
||||||
|
/// Returns true if the value at [col,row] position is null.
|
||||||
|
|
||||||
|
virtual void reset();
|
||||||
|
/// Resets any information internally cached by the extractor.
|
||||||
|
|
||||||
|
////////////
|
||||||
|
// Not implemented extract functions
|
||||||
|
////////////
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Poco::Int8>& val);
|
||||||
|
/// Extracts an Int8 vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Poco::Int8>& val);
|
||||||
|
/// Extracts an Int8 deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Poco::Int8>& val);
|
||||||
|
/// Extracts an Int8 list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Poco::UInt8>& val);
|
||||||
|
/// Extracts an UInt8 vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Poco::UInt8>& val);
|
||||||
|
/// Extracts an UInt8 deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Poco::UInt8>& val);
|
||||||
|
/// Extracts an UInt8 list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Poco::Int16>& val);
|
||||||
|
/// Extracts an Int16 vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Poco::Int16>& val);
|
||||||
|
/// Extracts an Int16 deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Poco::Int16>& val);
|
||||||
|
/// Extracts an Int16 list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Poco::UInt16>& val);
|
||||||
|
/// Extracts an UInt16 vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Poco::UInt16>& val);
|
||||||
|
/// Extracts an UInt16 deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Poco::UInt16>& val);
|
||||||
|
/// Extracts an UInt16 list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Poco::Int32>& val);
|
||||||
|
/// Extracts an Int32 vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Poco::Int32>& val);
|
||||||
|
/// Extracts an Int32 deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Poco::Int32>& val);
|
||||||
|
/// Extracts an Int32 list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Poco::UInt32>& val);
|
||||||
|
/// Extracts an UInt32 vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Poco::UInt32>& val);
|
||||||
|
/// Extracts an UInt32 deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Poco::UInt32>& val);
|
||||||
|
/// Extracts an UInt32 list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Poco::Int64>& val);
|
||||||
|
/// Extracts an Int64 vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Poco::Int64>& val);
|
||||||
|
/// Extracts an Int64 deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Poco::Int64>& val);
|
||||||
|
/// Extracts an Int64 list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Poco::UInt64>& val);
|
||||||
|
/// Extracts an UInt64 vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Poco::UInt64>& val);
|
||||||
|
/// Extracts an UInt64 deque.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<long>& val);
|
||||||
|
/// Extracts a long deque.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<bool>& val);
|
||||||
|
/// Extracts a boolean deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<bool>& val);
|
||||||
|
/// Extracts a boolean list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<float>& val);
|
||||||
|
/// Extracts a float vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<float>& val);
|
||||||
|
/// Extracts a float deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<float>& val);
|
||||||
|
/// Extracts a float list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<double>& val);
|
||||||
|
/// Extracts a double vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<double>& val);
|
||||||
|
/// Extracts a double deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<double>& val);
|
||||||
|
/// Extracts a double list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<char>& val);
|
||||||
|
/// Extracts a character vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<char>& val);
|
||||||
|
/// Extracts a character deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<char>& val);
|
||||||
|
/// Extracts a character list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<std::string>& val);
|
||||||
|
/// Extracts a string vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<std::string>& val);
|
||||||
|
/// Extracts a string deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<std::string>& val);
|
||||||
|
/// Extracts a string list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<BLOB>& val);
|
||||||
|
/// Extracts a BLOB vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<BLOB>& val);
|
||||||
|
/// Extracts a BLOB deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<BLOB>& val);
|
||||||
|
/// Extracts a BLOB list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<CLOB>& val);
|
||||||
|
/// Extracts a CLOB vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<CLOB>& val);
|
||||||
|
/// Extracts a CLOB deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<CLOB>& val);
|
||||||
|
/// Extracts a CLOB list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<DateTime>& val);
|
||||||
|
/// Extracts a DateTime vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<DateTime>& val);
|
||||||
|
/// Extracts a DateTime deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<DateTime>& val);
|
||||||
|
/// Extracts a DateTime list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Date>& val);
|
||||||
|
/// Extracts a Date vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Date>& val);
|
||||||
|
/// Extracts a Date deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Date>& val);
|
||||||
|
/// Extracts a Date list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Time>& val);
|
||||||
|
/// Extracts a Time vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Time>& val);
|
||||||
|
/// Extracts a Time deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Time>& val);
|
||||||
|
/// Extracts a Time list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Any>& val);
|
||||||
|
/// Extracts an Any vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Any>& val);
|
||||||
|
/// Extracts an Any deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Any>& val);
|
||||||
|
/// Extracts an Any list.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::vector<Dynamic::Var>& val);
|
||||||
|
/// Extracts a Dynamic::Var vector.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::deque<Dynamic::Var>& val);
|
||||||
|
/// Extracts a Dynamic::Var deque.
|
||||||
|
|
||||||
|
virtual bool extract(std::size_t pos, std::list<Dynamic::Var>& val);
|
||||||
|
/// Extracts a Dynamic::Var list.
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
const OutputParameter& extractPreamble(std::size_t aPosition) const;
|
||||||
|
|
||||||
|
bool isColumnNull(const OutputParameter& anOutputParameter) const;
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
bool extractStringImpl(std::size_t pos, T& val)
|
||||||
|
/// Utility function for extraction of Any and DynamicAny.
|
||||||
|
{
|
||||||
|
OutputParameter outputParameter = extractPreamble(pos);
|
||||||
|
|
||||||
|
if (isColumnNull(outputParameter))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string tempString; // since the postgreSQL API in use is all about strings...
|
||||||
|
|
||||||
|
bool returnValue = extract(pos, tempString);
|
||||||
|
|
||||||
|
if (returnValue)
|
||||||
|
{
|
||||||
|
val = tempString;
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Prevent VC8 warning "operator= could not be generated"
|
||||||
|
Extractor& operator=(const Extractor&);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
StatementExecutor& _statementExecutor;
|
||||||
|
};
|
||||||
|
|
||||||
|
} } } // namespace Poco::Data::PostgreSQL
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Data_PostgreSQL_Extractor_INCLUDED
|
82
Data/PostgreSQL/include/Poco/Data/PostgreSQL/PostgreSQL.h
Normal file
82
Data/PostgreSQL/include/Poco/Data/PostgreSQL/PostgreSQL.h
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
//
|
||||||
|
// PostgreSQL.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.5/Data/PostgreSQL/include/Poco/Data/PostgreSQL/PostgreSQL.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Data
|
||||||
|
// Package: PostgreSQL
|
||||||
|
// Module: PostgreSQL
|
||||||
|
//
|
||||||
|
// Basic definitions for the PostgreSQL library.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Data_PostgreSQL_INCLUDED
|
||||||
|
#define Data_PostgreSQL_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Foundation.h"
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// The following block is the standard way of creating macros which make exporting
|
||||||
|
// from a DLL simpler. All files within this DLL are compiled with the ODBC_EXPORTS
|
||||||
|
// symbol defined on the command line. this symbol should not be defined on any project
|
||||||
|
// that uses this DLL. This way any other project whose source files include this file see
|
||||||
|
// ODBC_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||||
|
// defined with this macro as being exported.
|
||||||
|
//
|
||||||
|
#if defined(_WIN32) && defined(POCO_DLL)
|
||||||
|
#if defined(PostgreSQL_EXPORTS)
|
||||||
|
#define PostgreSQL_API __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
#define PostgreSQL_API __declspec(dllimport)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(PostgreSQL_API)
|
||||||
|
#if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4)
|
||||||
|
#define PostgreSQL_API __attribute__ ((visibility ("default")))
|
||||||
|
#else
|
||||||
|
#define PostgreSQL_API
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Automatically link Data library.
|
||||||
|
//
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(PostgreSQL_EXPORTS)
|
||||||
|
#pragma comment(lib, "PocoDataPostgreSQL" POCO_LIB_SUFFIX)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Data_PostgreSQL_INCLUDED
|
@ -0,0 +1,157 @@
|
|||||||
|
//
|
||||||
|
// PostgreSQLException.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.5/Data/PostgreSQL/include/Poco/Data/PostgreSQL/PostgreSQLException.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Data
|
||||||
|
// Package: PostgreSQL
|
||||||
|
// Module: PostgreSQLException
|
||||||
|
//
|
||||||
|
// Definition of the PostgreSQLException class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Data_PostgreSQL_PostgreSQLException_INCLUDED
|
||||||
|
#define Data_PostgreSQL_PostgreSQLException_INCLUDED
|
||||||
|
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQL.h"
|
||||||
|
#include "Poco/Data/DataException.h"
|
||||||
|
|
||||||
|
#include <typeinfo>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace Data {
|
||||||
|
namespace PostgreSQL {
|
||||||
|
|
||||||
|
// End-user include this file and use in code ConnectionException/StatementException
|
||||||
|
// So it need not know
|
||||||
|
|
||||||
|
class PostgreSQL_API PostgreSQLException: public Poco::Data::DataException
|
||||||
|
/// Base class for all PostgreSQL exceptions
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
PostgreSQLException(const std::string& aMessage);
|
||||||
|
/// Creates PostgreSQLException.
|
||||||
|
|
||||||
|
PostgreSQLException(const PostgreSQLException& exc);
|
||||||
|
/// Creates PostgreSQLException.
|
||||||
|
|
||||||
|
~PostgreSQLException() throw();
|
||||||
|
/// Destroys PostgreSQLexception.
|
||||||
|
|
||||||
|
PostgreSQLException& operator=(const PostgreSQLException& exc);
|
||||||
|
/// Assignment operator.
|
||||||
|
|
||||||
|
const char* name() const throw();
|
||||||
|
/// Returns exception name.
|
||||||
|
|
||||||
|
const char* className() const throw();
|
||||||
|
/// Returns the name of the exception class.
|
||||||
|
|
||||||
|
Poco::Exception* clone() const;
|
||||||
|
/// Creates an exact copy of the exception.
|
||||||
|
///
|
||||||
|
/// The copy can later be thrown again by
|
||||||
|
/// invoking rethrow() on it.
|
||||||
|
|
||||||
|
void rethrow() const;
|
||||||
|
/// (Re)Throws the exception.
|
||||||
|
///
|
||||||
|
/// This is useful for temporarily storing a
|
||||||
|
/// copy of an exception (see clone()), then
|
||||||
|
/// throwing it again.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class ConnectionException : public PostgreSQLException
|
||||||
|
/// ConnectionException
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
ConnectionException(const std::string& aMessage);
|
||||||
|
/// Creates ConnectionException from string.
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class TransactionException : public ConnectionException
|
||||||
|
/// TrabsactionException
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
TransactionException(const std::string& aMessage);
|
||||||
|
/// Creates TransactionException from string.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class StatementException : public PostgreSQLException
|
||||||
|
/// StatementException
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
StatementException(const std::string& aMessage);
|
||||||
|
/// Creates StatementException from string.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// inlines
|
||||||
|
//
|
||||||
|
|
||||||
|
inline PostgreSQLException& PostgreSQLException::operator=(const PostgreSQLException& exc)
|
||||||
|
{
|
||||||
|
Poco::Data::DataException::operator=(exc);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const char* PostgreSQLException::name() const throw()
|
||||||
|
{
|
||||||
|
return "PostgreSQL";
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const char* PostgreSQLException::className() const throw()
|
||||||
|
{
|
||||||
|
return typeid(*this).name();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Poco::Exception* PostgreSQLException::clone() const
|
||||||
|
{
|
||||||
|
return new PostgreSQLException(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void PostgreSQLException::rethrow() const
|
||||||
|
{
|
||||||
|
throw *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::Data::PostgreSQL
|
||||||
|
|
||||||
|
#endif //Data_PostgreSQL_PostgreSQLException_INCLUDED
|
@ -0,0 +1,122 @@
|
|||||||
|
//
|
||||||
|
// PostgreSQLStatementImpl.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.5/Data/PostgreSQL/include/Poco/Data/PostgreSQL/PostgreSQLStatementImpl.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Data
|
||||||
|
// Package: PostgreSQL
|
||||||
|
// Module: PostgreSQLStatementImpl
|
||||||
|
//
|
||||||
|
// Definition of the PostgreSQLStatementImpl class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Data_PostgreSQL_PostgreSQLStatementImpl_INCLUDED
|
||||||
|
#define Data_PostgreSQL_PostgreSQLStatementImpl_INCLUDED
|
||||||
|
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQL.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/SessionImpl.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/Binder.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/Extractor.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/StatementExecutor.h"
|
||||||
|
#include "Poco/Data/StatementImpl.h"
|
||||||
|
#include "Poco/SharedPtr.h"
|
||||||
|
#include "Poco/Format.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace Data {
|
||||||
|
namespace PostgreSQL {
|
||||||
|
|
||||||
|
|
||||||
|
class PostgreSQL_API PostgreSQLStatementImpl: public Poco::Data::StatementImpl
|
||||||
|
/// Implements statement functionality needed for PostgreSQL
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PostgreSQLStatementImpl(SessionImpl& aSessionImpl);
|
||||||
|
/// Creates the PostgreSQLStatementImpl.
|
||||||
|
|
||||||
|
~PostgreSQLStatementImpl();
|
||||||
|
/// Destroys the PostgreSQLStatementImpl.
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
virtual std::size_t columnsReturned() const;
|
||||||
|
/// Returns number of columns returned by query.
|
||||||
|
|
||||||
|
virtual int affectedRowCount() const;
|
||||||
|
/// 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 aPosition, std::size_t aDataset) const;
|
||||||
|
/// Returns column meta data.
|
||||||
|
|
||||||
|
virtual bool hasNext();
|
||||||
|
/// Returns true if a call to next() will return data.
|
||||||
|
|
||||||
|
virtual std::size_t next();
|
||||||
|
/// Retrieves the next row from the resultset.
|
||||||
|
/// Will throw, if the resultset is empty.
|
||||||
|
|
||||||
|
virtual bool canBind() const;
|
||||||
|
/// Returns true if a valid statement is set and we can bind.
|
||||||
|
|
||||||
|
virtual bool canCompile() const;
|
||||||
|
/// Returns true if another compile is possible.
|
||||||
|
|
||||||
|
virtual void compileImpl();
|
||||||
|
/// Compiles the statement, doesn't bind yet
|
||||||
|
|
||||||
|
virtual void bindImpl();
|
||||||
|
/// Binds parameters
|
||||||
|
|
||||||
|
virtual Poco::Data::AbstractExtractor::Ptr extractor();
|
||||||
|
/// Returns the concrete extractor used by the statement.
|
||||||
|
|
||||||
|
virtual Poco::Data::AbstractBinder::Ptr binder();
|
||||||
|
/// Returns the concrete binder used by the statement.
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum NextState
|
||||||
|
{
|
||||||
|
NEXT_DONTKNOW,
|
||||||
|
NEXT_TRUE,
|
||||||
|
NEXT_FALSE
|
||||||
|
};
|
||||||
|
|
||||||
|
StatementExecutor _statementExecutor;
|
||||||
|
Binder::Ptr _pBinder;
|
||||||
|
Extractor::Ptr _pExtractor;
|
||||||
|
NextState _hasNext;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::Data::PostgreSQL
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Data_PostgreSQL_PostgreSQLStatementImpl_INCLUDED
|
479
Data/PostgreSQL/include/Poco/Data/PostgreSQL/PostgreSQLTypes.h
Normal file
479
Data/PostgreSQL/include/Poco/Data/PostgreSQL/PostgreSQLTypes.h
Normal file
@ -0,0 +1,479 @@
|
|||||||
|
//
|
||||||
|
// PostgreSQLTypes.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.4/Data/PostgreSQL/include/Poco/Data/PostgreSQL/SessionHandle.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Data
|
||||||
|
// Package: PostgreSQL
|
||||||
|
//
|
||||||
|
// Definition of the SessionHandle class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef Data_PostgreSQL_Types_INCLUDED
|
||||||
|
#define Data_PostgreSQL_Types_INCLUDED
|
||||||
|
|
||||||
|
#include "Poco/Data/MetaColumn.h"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <libpq-fe.h>
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace Data {
|
||||||
|
namespace PostgreSQL {
|
||||||
|
|
||||||
|
/// Oid constants duplicated from PostgreSQL "include/postgresql/server/catalog/pg_type.h"
|
||||||
|
/// because PostgreSQL compile time definitions are too onerous to reproduce for this module
|
||||||
|
|
||||||
|
const Oid BOOLOID = 16;
|
||||||
|
|
||||||
|
const Oid INT2OID = 21;
|
||||||
|
const Oid INT4OID = 23;
|
||||||
|
const Oid INT8OID = 20;
|
||||||
|
|
||||||
|
const Oid FLOAT8OID = 701; // double
|
||||||
|
const Oid FLOAT4OID = 700;
|
||||||
|
const Oid NUMERICOID = 1700;
|
||||||
|
|
||||||
|
const Oid CHAROID = 18;
|
||||||
|
const Oid BPCHAROID = 1042; // fixed length char
|
||||||
|
const Oid VARCHAROID = 1043;
|
||||||
|
|
||||||
|
const Oid BYTEAOID = 17; // BLOB
|
||||||
|
const Oid TEXTOID = 25; // CLOB
|
||||||
|
|
||||||
|
const Oid DATEOID = 1082;
|
||||||
|
const Oid TIMEOID = 1083;
|
||||||
|
const Oid TIMETZOID = 1266;
|
||||||
|
const Oid TIMESTAMPOID = 1114;
|
||||||
|
const Oid TIMESTAMPZOID = 1184;
|
||||||
|
|
||||||
|
// future use
|
||||||
|
const Oid BITOID = 1560;
|
||||||
|
const Oid VARYBITOID = 1562;
|
||||||
|
const Oid CASHOID = 790;
|
||||||
|
const Oid MACADDROID = 829;
|
||||||
|
const Oid UUIDOID = 2950;
|
||||||
|
|
||||||
|
Poco::Data::MetaColumn::ColumnDataType oidToColumnDataType(const Oid anOID);
|
||||||
|
|
||||||
|
class InputParameter
|
||||||
|
/// PostgreSQL class to record values for input parameters to SQL statements
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit InputParameter(Poco::Data::MetaColumn::ColumnDataType aFieldType,
|
||||||
|
const void* aDataPtr,
|
||||||
|
std::size_t theDataLength);
|
||||||
|
explicit InputParameter();
|
||||||
|
|
||||||
|
~InputParameter();
|
||||||
|
|
||||||
|
Poco::Data::MetaColumn::ColumnDataType fieldType() const;
|
||||||
|
const void* pData() const;
|
||||||
|
std::size_t size() const;
|
||||||
|
bool isBinary() const;
|
||||||
|
|
||||||
|
void setStringVersionRepresentation(const std::string& aString);
|
||||||
|
void setNonStringVersionRepresentation(const void* aPtr, std::size_t theSize);
|
||||||
|
|
||||||
|
const void* pInternalRepresentation() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Poco::Data::MetaColumn::ColumnDataType _fieldType;
|
||||||
|
const void* _pData;
|
||||||
|
std::size_t _size;
|
||||||
|
bool _isBinary;
|
||||||
|
std::string _stringVersionRepresentation;
|
||||||
|
void* _pNonStringVersionRepresentation;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::vector <InputParameter> InputParameterVector;
|
||||||
|
|
||||||
|
|
||||||
|
class OutputParameter
|
||||||
|
/// PostgreSQL class to record values for output parameters to capture the results
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit OutputParameter(Poco::Data::MetaColumn::ColumnDataType aFieldType,
|
||||||
|
Oid anInternalFieldType,
|
||||||
|
std::size_t aRowNumber,
|
||||||
|
const char* aDataPtr,
|
||||||
|
std::size_t theSize,
|
||||||
|
bool anIsNull);
|
||||||
|
|
||||||
|
explicit OutputParameter();
|
||||||
|
|
||||||
|
~OutputParameter();
|
||||||
|
|
||||||
|
void setValues(Poco::Data::MetaColumn::ColumnDataType aFieldType,
|
||||||
|
Oid anInternalFieldType,
|
||||||
|
std::size_t aRowNumber,
|
||||||
|
const char* aDataPtr,
|
||||||
|
std::size_t theSize,
|
||||||
|
bool anIsNull);
|
||||||
|
|
||||||
|
Poco::Data::MetaColumn::ColumnDataType fieldType() const;
|
||||||
|
Oid internalFieldType() const;
|
||||||
|
std::size_t rowNumber() const;
|
||||||
|
const char* pData() const;
|
||||||
|
std::size_t size() const;
|
||||||
|
bool isNull() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Poco::Data::MetaColumn::ColumnDataType _fieldType;
|
||||||
|
Oid _internalFieldType;
|
||||||
|
std::size_t _rowNumber;
|
||||||
|
const char* _pData;
|
||||||
|
std::size_t _size;
|
||||||
|
bool _isNull;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::vector <OutputParameter> OutputParameterVector;
|
||||||
|
|
||||||
|
|
||||||
|
class PQConnectionInfoOptionsFree
|
||||||
|
/// PostgreSQL connection Info Options free (RAII)
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit PQConnectionInfoOptionsFree(PQconninfoOption* aConnectionInfoOptionPtr);
|
||||||
|
~PQConnectionInfoOptionsFree();
|
||||||
|
|
||||||
|
private:
|
||||||
|
PQConnectionInfoOptionsFree (const PQConnectionInfoOptionsFree&);
|
||||||
|
PQConnectionInfoOptionsFree& operator= (const PQConnectionInfoOptionsFree&);
|
||||||
|
|
||||||
|
private:
|
||||||
|
PQconninfoOption* _pConnectionInfoOption;
|
||||||
|
};
|
||||||
|
|
||||||
|
class PQResultClear
|
||||||
|
/// PostgreSQL statement result free (RAII)
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit PQResultClear(PGresult * aPQResultPtr);
|
||||||
|
~PQResultClear();
|
||||||
|
|
||||||
|
private:
|
||||||
|
PQResultClear (const PQResultClear&);
|
||||||
|
PQResultClear& operator= (const PQResultClear&);
|
||||||
|
|
||||||
|
private:
|
||||||
|
PGresult* _pPQResult;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class PGCancelFree
|
||||||
|
/// PostgreSQL Cancel Info Options free (RAII)
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit PGCancelFree(PGcancel * aStatementCancelPtr);
|
||||||
|
~PGCancelFree();
|
||||||
|
|
||||||
|
private:
|
||||||
|
PGCancelFree (const PGCancelFree&);
|
||||||
|
PGCancelFree& operator= (const PGCancelFree&);
|
||||||
|
|
||||||
|
private:
|
||||||
|
PGcancel* _pPGCancel;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// inlines
|
||||||
|
//
|
||||||
|
|
||||||
|
// InputParameter
|
||||||
|
|
||||||
|
inline
|
||||||
|
InputParameter::InputParameter(Poco::Data::MetaColumn::ColumnDataType aFieldType,
|
||||||
|
const void* aDataPtr,
|
||||||
|
std::size_t theSize)
|
||||||
|
: _fieldType (aFieldType),
|
||||||
|
_pData (aDataPtr),
|
||||||
|
_size (theSize),
|
||||||
|
_isBinary (false),
|
||||||
|
_pNonStringVersionRepresentation (0)
|
||||||
|
{
|
||||||
|
if ( Poco::Data::MetaColumn::FDT_BLOB == _fieldType
|
||||||
|
|| Poco::Data::MetaColumn::FDT_CLOB == _fieldType) {
|
||||||
|
_isBinary = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
InputParameter::InputParameter()
|
||||||
|
: _fieldType (Poco::Data::MetaColumn::FDT_UNKNOWN),
|
||||||
|
_pData (0),
|
||||||
|
_size (0),
|
||||||
|
_isBinary (false),
|
||||||
|
_pNonStringVersionRepresentation (0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
InputParameter::~InputParameter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
const void*
|
||||||
|
InputParameter::pData() const
|
||||||
|
{
|
||||||
|
return _pData;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
Poco::Data::MetaColumn::ColumnDataType
|
||||||
|
InputParameter::fieldType() const
|
||||||
|
{
|
||||||
|
return _fieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::size_t
|
||||||
|
InputParameter::size() const
|
||||||
|
{
|
||||||
|
return _size;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
InputParameter::isBinary() const
|
||||||
|
{
|
||||||
|
return _isBinary;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void
|
||||||
|
InputParameter::setStringVersionRepresentation(const std::string& aString)
|
||||||
|
{
|
||||||
|
_pNonStringVersionRepresentation = 0;
|
||||||
|
|
||||||
|
_stringVersionRepresentation = aString;
|
||||||
|
_size = _stringVersionRepresentation.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void
|
||||||
|
InputParameter::setNonStringVersionRepresentation(const void* aPtr, std::size_t theDataLength)
|
||||||
|
{
|
||||||
|
_stringVersionRepresentation = std::string();
|
||||||
|
|
||||||
|
_pNonStringVersionRepresentation = const_cast<void *> (aPtr);
|
||||||
|
_size = theDataLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
const void*
|
||||||
|
InputParameter::pInternalRepresentation() const
|
||||||
|
{
|
||||||
|
switch (_fieldType) {
|
||||||
|
case Poco::Data::MetaColumn::FDT_BOOL:
|
||||||
|
case Poco::Data::MetaColumn::FDT_INT8:
|
||||||
|
case Poco::Data::MetaColumn::FDT_UINT8:
|
||||||
|
case Poco::Data::MetaColumn::FDT_INT16:
|
||||||
|
case Poco::Data::MetaColumn::FDT_UINT16:
|
||||||
|
case Poco::Data::MetaColumn::FDT_INT32:
|
||||||
|
case Poco::Data::MetaColumn::FDT_UINT32:
|
||||||
|
case Poco::Data::MetaColumn::FDT_INT64:
|
||||||
|
case Poco::Data::MetaColumn::FDT_UINT64:
|
||||||
|
case Poco::Data::MetaColumn::FDT_FLOAT:
|
||||||
|
case Poco::Data::MetaColumn::FDT_DOUBLE:
|
||||||
|
case Poco::Data::MetaColumn::FDT_STRING:
|
||||||
|
case Poco::Data::MetaColumn::FDT_DATE:
|
||||||
|
case Poco::Data::MetaColumn::FDT_TIME:
|
||||||
|
case Poco::Data::MetaColumn::FDT_TIMESTAMP:
|
||||||
|
return _stringVersionRepresentation.c_str();
|
||||||
|
|
||||||
|
case Poco::Data::MetaColumn::FDT_BLOB:
|
||||||
|
case Poco::Data::MetaColumn::FDT_CLOB:
|
||||||
|
return _pNonStringVersionRepresentation;
|
||||||
|
|
||||||
|
case Poco::Data::MetaColumn::FDT_UNKNOWN:
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// OutputParameter
|
||||||
|
inline
|
||||||
|
OutputParameter::OutputParameter(Poco::Data::MetaColumn::ColumnDataType aFieldType,
|
||||||
|
Oid anInternalFieldType,
|
||||||
|
std::size_t aRowNumber,
|
||||||
|
const char* aDataPtr,
|
||||||
|
std::size_t theSize,
|
||||||
|
bool anIsNull)
|
||||||
|
: _fieldType (aFieldType),
|
||||||
|
_internalFieldType (anInternalFieldType),
|
||||||
|
_rowNumber (aRowNumber),
|
||||||
|
_pData (aDataPtr),
|
||||||
|
_size (theSize),
|
||||||
|
_isNull (anIsNull)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
OutputParameter::OutputParameter()
|
||||||
|
: _fieldType (Poco::Data::MetaColumn::FDT_UNKNOWN),
|
||||||
|
_internalFieldType (-1),
|
||||||
|
_rowNumber (0),
|
||||||
|
_pData (0),
|
||||||
|
_size (0),
|
||||||
|
_isNull (true)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
OutputParameter::~OutputParameter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void
|
||||||
|
OutputParameter::setValues(Poco::Data::MetaColumn::ColumnDataType aFieldType,
|
||||||
|
Oid anInternalFieldType,
|
||||||
|
std::size_t aRowNumber,
|
||||||
|
const char* aDataPtr,
|
||||||
|
std::size_t theSize,
|
||||||
|
bool anIsNull)
|
||||||
|
{
|
||||||
|
_fieldType = aFieldType;
|
||||||
|
_internalFieldType = anInternalFieldType;
|
||||||
|
_rowNumber = aRowNumber;
|
||||||
|
_pData = aDataPtr;
|
||||||
|
_size = theSize;
|
||||||
|
_isNull = anIsNull;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
Poco::Data::MetaColumn::ColumnDataType
|
||||||
|
OutputParameter::fieldType() const
|
||||||
|
{
|
||||||
|
return _fieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
Oid
|
||||||
|
OutputParameter::internalFieldType() const
|
||||||
|
{
|
||||||
|
return _internalFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::size_t
|
||||||
|
OutputParameter::rowNumber() const
|
||||||
|
{
|
||||||
|
return _rowNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
const char*
|
||||||
|
OutputParameter::pData() const
|
||||||
|
{
|
||||||
|
return _pData;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::size_t
|
||||||
|
OutputParameter::size() const
|
||||||
|
{
|
||||||
|
return _size;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
OutputParameter::isNull() const
|
||||||
|
{
|
||||||
|
return _isNull;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PQConnectionInfoOptionsFree
|
||||||
|
|
||||||
|
inline
|
||||||
|
PQConnectionInfoOptionsFree::PQConnectionInfoOptionsFree(PQconninfoOption* aConnectionInfoOptionPtr)
|
||||||
|
: _pConnectionInfoOption(aConnectionInfoOptionPtr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
PQConnectionInfoOptionsFree::~PQConnectionInfoOptionsFree()
|
||||||
|
{
|
||||||
|
if (_pConnectionInfoOption)
|
||||||
|
{
|
||||||
|
PQconninfoFree(_pConnectionInfoOption);
|
||||||
|
_pConnectionInfoOption = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PQResultClear
|
||||||
|
|
||||||
|
inline
|
||||||
|
PQResultClear::PQResultClear(PGresult* aPQResultPtr)
|
||||||
|
: _pPQResult(aPQResultPtr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
PQResultClear::~PQResultClear()
|
||||||
|
{
|
||||||
|
if (_pPQResult)
|
||||||
|
{
|
||||||
|
PQclear(_pPQResult);
|
||||||
|
_pPQResult = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PGCancelFree
|
||||||
|
|
||||||
|
inline
|
||||||
|
PGCancelFree::PGCancelFree(PGcancel* aStatementCancelPtr)
|
||||||
|
: _pPGCancel(aStatementCancelPtr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
PGCancelFree::~PGCancelFree()
|
||||||
|
{
|
||||||
|
if (_pPGCancel)
|
||||||
|
{
|
||||||
|
PQfreeCancel(_pPGCancel);
|
||||||
|
_pPGCancel = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}}}
|
||||||
|
|
||||||
|
#endif // Data_PostgreSQL_Types_INCLUDED
|
363
Data/PostgreSQL/include/Poco/Data/PostgreSQL/SessionHandle.h
Normal file
363
Data/PostgreSQL/include/Poco/Data/PostgreSQL/SessionHandle.h
Normal file
@ -0,0 +1,363 @@
|
|||||||
|
//
|
||||||
|
// SesssionHandle.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.4/Data/PostgreSQL/include/Poco/Data/PostgreSQL/SessionHandle.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Data
|
||||||
|
// Package: PostgreSQL
|
||||||
|
// Module: SessionHandle
|
||||||
|
//
|
||||||
|
// Definition of the SessionHandle class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef Data_PostgreSQL_SessionHandle_INCLUDED
|
||||||
|
#define Data_PostgreSQL_SessionHandle_INCLUDED
|
||||||
|
|
||||||
|
#include "Poco/Mutex.h"
|
||||||
|
#include "Poco/Types.h"
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <libpq-fe.h>
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace Data {
|
||||||
|
namespace PostgreSQL {
|
||||||
|
|
||||||
|
class SessionParameters
|
||||||
|
{
|
||||||
|
/// PostgreSQL session parameters
|
||||||
|
public:
|
||||||
|
enum HOW_TO_DISPLAY {
|
||||||
|
HTD_ASIS, // as is
|
||||||
|
HTD_HIDE, // do not display (e.g. passwords)
|
||||||
|
HID_DEBUG // debug use only
|
||||||
|
};
|
||||||
|
|
||||||
|
SessionParameters( const std::string& aKeyword,
|
||||||
|
const std::string& anEnvironmentVariable,
|
||||||
|
const std::string& aCompiledDefault,
|
||||||
|
const std::string& aCurrentValue,
|
||||||
|
const std::string& aDisplayLabel,
|
||||||
|
const std::string& aHowToDisplay,
|
||||||
|
int aDisplaySize);
|
||||||
|
|
||||||
|
~SessionParameters();
|
||||||
|
|
||||||
|
std::string keyword()const;
|
||||||
|
std::string enviromentVariable() const;
|
||||||
|
std::string compiledDefault()const;
|
||||||
|
std::string currentValue() const;
|
||||||
|
std::string displayLabel() const;
|
||||||
|
HOW_TO_DISPLAY howToDisplay() const;
|
||||||
|
int displaySize()const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string _keyword;// The keyword of the option
|
||||||
|
std::string _environmentVariable;// Fallback environment variable name
|
||||||
|
std::string _compiledDefault;// Fallback compiled in default value
|
||||||
|
std::string _currentValue; // Option's current value, or NULL
|
||||||
|
std::string _displayLabel; // Label for field in a connect dialog
|
||||||
|
HOW_TO_DISPLAY _howToDisplay; // Indicates how to display this field
|
||||||
|
int _displaySize;// Field size in characters for connect dialog
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::map<std::string, SessionParameters> SessionParametersMap;
|
||||||
|
|
||||||
|
|
||||||
|
class SessionHandle
|
||||||
|
/// PostgreSQL connection(session) handle
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
explicit SessionHandle();
|
||||||
|
/// Creates session handle
|
||||||
|
|
||||||
|
~SessionHandle();
|
||||||
|
/// Destroy handle, close connection
|
||||||
|
|
||||||
|
void connect (const std::string& aConnectionString);
|
||||||
|
/// Connect to server
|
||||||
|
|
||||||
|
void connect (const char* aConnectionString);
|
||||||
|
|
||||||
|
void connect ( const char* aHost,
|
||||||
|
const char* aUser,
|
||||||
|
const char* aPassword,
|
||||||
|
const char* aDatabase,
|
||||||
|
unsigned short aPort,
|
||||||
|
unsigned int aConnectionTimeout);
|
||||||
|
|
||||||
|
bool isConnected() const;
|
||||||
|
/// is a connection established?
|
||||||
|
|
||||||
|
void disconnect();
|
||||||
|
/// Close connection
|
||||||
|
|
||||||
|
bool reset();
|
||||||
|
/// reset the connection
|
||||||
|
|
||||||
|
std::string lastError() const;
|
||||||
|
/// last error on the connection
|
||||||
|
|
||||||
|
void startTransaction();
|
||||||
|
/// Start transaction
|
||||||
|
|
||||||
|
bool isTransaction();
|
||||||
|
/// Returns true iff a transaction is a transaction is in progress, false otherwise.
|
||||||
|
|
||||||
|
void commit();
|
||||||
|
/// Commit transaction
|
||||||
|
|
||||||
|
void rollback();
|
||||||
|
/// Rollback trabsaction
|
||||||
|
|
||||||
|
bool isAutoCommit();
|
||||||
|
/// is the connection in auto commit mode?
|
||||||
|
|
||||||
|
void setAutoCommit(bool aShouldAutoCommit = true);
|
||||||
|
/// is the connection in auto commit mode?
|
||||||
|
|
||||||
|
bool isAsynchronousCommit();
|
||||||
|
/// is the connection in Asynchronous commit mode?
|
||||||
|
|
||||||
|
void setAsynchronousCommit(bool aShouldAsynchronousCommit = true);
|
||||||
|
/// is the connection in Asynchronous commit mode?
|
||||||
|
|
||||||
|
void cancel();
|
||||||
|
/// Attempts to cancel in-process statements
|
||||||
|
|
||||||
|
void setTransactionIsolation(Poco::UInt32 aTI);
|
||||||
|
/// Sets the transaction isolation level.
|
||||||
|
|
||||||
|
Poco::UInt32 transactionIsolation();
|
||||||
|
/// Returns the transaction isolation level.
|
||||||
|
|
||||||
|
bool hasTransactionIsolation(Poco::UInt32 aTI);
|
||||||
|
/// Returns true iff the transaction isolation level corresponding
|
||||||
|
/// to the supplied bitmask is supported.
|
||||||
|
|
||||||
|
void deallocatePreparedStatement(const std::string& aPreparedStatementToDeAllocate);
|
||||||
|
/// deallocates a previously prepared statement
|
||||||
|
|
||||||
|
int serverVersion() const;
|
||||||
|
/// remote server version
|
||||||
|
|
||||||
|
int serverProcessID() const;
|
||||||
|
/// the process ID of the remotee server process
|
||||||
|
|
||||||
|
int protocoVersion() const;
|
||||||
|
/// the protocol version between the client and the server
|
||||||
|
|
||||||
|
std::string clientEncoding() const;
|
||||||
|
/// returns the client encoding
|
||||||
|
|
||||||
|
int libpqVersion() const;
|
||||||
|
/// returns the version of libpq
|
||||||
|
|
||||||
|
static SessionParametersMap connectionDefaultParameters();
|
||||||
|
/// returns the default parameters used on a connection
|
||||||
|
|
||||||
|
SessionParametersMap connectionParameters() const;
|
||||||
|
/// returns the parameters used on the connection
|
||||||
|
|
||||||
|
std::string connectionString() const;
|
||||||
|
/// returns the string used to connect
|
||||||
|
|
||||||
|
operator PGconn* ();
|
||||||
|
/// Get the PostgreSQL connection pointer
|
||||||
|
|
||||||
|
Poco::FastMutex& mutex();
|
||||||
|
/// Get the sessionHandle mutex to protect the connection pointer
|
||||||
|
|
||||||
|
private:
|
||||||
|
static SessionParametersMap setConnectionInfoParameters(PQconninfoOption* aConnectionInfoOptionsPtr);
|
||||||
|
|
||||||
|
void deallocateStoredPreparedStatements();
|
||||||
|
|
||||||
|
void deallocatePreparedStatementNoLock(const std::string& aPreparedStatementToDeAllocate);
|
||||||
|
bool isConnectedNoLock() const;
|
||||||
|
std::string lastErrorNoLock() const;
|
||||||
|
|
||||||
|
|
||||||
|
SessionHandle(const SessionHandle&);
|
||||||
|
SessionHandle& operator= (const SessionHandle&);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
mutable Poco::FastMutex _sessionMutex;
|
||||||
|
PGconn* _pConnection;
|
||||||
|
std::string _connectionString;
|
||||||
|
bool _inTransaction;
|
||||||
|
bool _isAutoCommit;
|
||||||
|
bool _isAsynchronousCommit;
|
||||||
|
Poco::UInt32 _tranactionIsolationLevel;
|
||||||
|
std::vector <std::string> _preparedStatementsToBeDeallocated;
|
||||||
|
|
||||||
|
// static const std::string POSTGRESQL_READ_UNCOMMITTED; // NOT SUPPORTED
|
||||||
|
static const std::string POSTGRESQL_READ_COMMITTED;
|
||||||
|
static const std::string POSTGRESQL_REPEATABLE_READ;
|
||||||
|
static const std::string POSTGRESQL_SERIALIZABLE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// inlines
|
||||||
|
//
|
||||||
|
|
||||||
|
// SessionParameters
|
||||||
|
|
||||||
|
inline
|
||||||
|
SessionParameters::SessionParameters( const std::string& aKeyword,
|
||||||
|
const std::string& anEnvironmentVariable,
|
||||||
|
const std::string& aCompiledDefault,
|
||||||
|
const std::string& aCurrentValue,
|
||||||
|
const std::string& aDisplayLabel,
|
||||||
|
const std::string& aHowToDisplay,
|
||||||
|
int aDisplaySize)
|
||||||
|
: _keyword (aKeyword),
|
||||||
|
_environmentVariable (anEnvironmentVariable),
|
||||||
|
_compiledDefault (aCompiledDefault),
|
||||||
|
_currentValue (aCurrentValue),
|
||||||
|
_displayLabel (aDisplayLabel),
|
||||||
|
_howToDisplay (HTD_ASIS),
|
||||||
|
_displaySize (aDisplaySize)
|
||||||
|
{
|
||||||
|
if (aHowToDisplay == "*")
|
||||||
|
{
|
||||||
|
_howToDisplay = HTD_HIDE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aHowToDisplay == "D")
|
||||||
|
{
|
||||||
|
_howToDisplay = HID_DEBUG;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
SessionParameters::~SessionParameters()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::string
|
||||||
|
SessionParameters::keyword() const
|
||||||
|
{
|
||||||
|
return _keyword;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::string
|
||||||
|
SessionParameters::enviromentVariable() const
|
||||||
|
{
|
||||||
|
return _environmentVariable;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::string
|
||||||
|
SessionParameters::compiledDefault() const
|
||||||
|
{
|
||||||
|
return _compiledDefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::string
|
||||||
|
SessionParameters::currentValue() const
|
||||||
|
{
|
||||||
|
return _currentValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::string
|
||||||
|
SessionParameters::displayLabel() const
|
||||||
|
{
|
||||||
|
return _displayLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
SessionParameters::HOW_TO_DISPLAY
|
||||||
|
SessionParameters::howToDisplay() const
|
||||||
|
{
|
||||||
|
return _howToDisplay;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
int
|
||||||
|
SessionParameters::displaySize() const
|
||||||
|
{
|
||||||
|
return _displaySize;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SessionHandle
|
||||||
|
|
||||||
|
inline
|
||||||
|
SessionHandle::operator PGconn * ()
|
||||||
|
{
|
||||||
|
return _pConnection;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
Poco::FastMutex&
|
||||||
|
SessionHandle::mutex()
|
||||||
|
{
|
||||||
|
return _sessionMutex;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::string
|
||||||
|
SessionHandle::connectionString() const
|
||||||
|
{
|
||||||
|
return _connectionString;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
SessionHandle::isTransaction()
|
||||||
|
{
|
||||||
|
return _inTransaction;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
SessionHandle::isAutoCommit()
|
||||||
|
{
|
||||||
|
return _isAutoCommit;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
SessionHandle::isAsynchronousCommit()
|
||||||
|
{
|
||||||
|
return _isAsynchronousCommit;
|
||||||
|
}
|
||||||
|
|
||||||
|
}}}
|
||||||
|
|
||||||
|
#endif // Data_PostgreSQL_SessionHandle_INCLUDED
|
184
Data/PostgreSQL/include/Poco/Data/PostgreSQL/SessionImpl.h
Normal file
184
Data/PostgreSQL/include/Poco/Data/PostgreSQL/SessionImpl.h
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
//
|
||||||
|
// SessionImpl.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.5/Data/PostgreSQL/include/Poco/Data/PostgreSQL/SessionImpl.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Data
|
||||||
|
// Package: PostgreSQL
|
||||||
|
// Module: SessionImpl
|
||||||
|
//
|
||||||
|
// Definition of the SessionImpl class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Data_PostgreSQL_SessionImpl_INCLUDED
|
||||||
|
#define Data_PostgreSQL_SessionImpl_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQL.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/SessionHandle.h"
|
||||||
|
|
||||||
|
#include "Poco/Data/AbstractSessionImpl.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace Data {
|
||||||
|
namespace PostgreSQL {
|
||||||
|
|
||||||
|
|
||||||
|
class PostgreSQL_API SessionImpl: public Poco::Data::AbstractSessionImpl<SessionImpl>
|
||||||
|
/// Implements SessionImpl interface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
SessionImpl(const std::string& aConnectionString,
|
||||||
|
std::size_t aLoginTimeout = LOGIN_TIMEOUT_DEFAULT);
|
||||||
|
/// Creates the SessionImpl. Opens a connection to the database
|
||||||
|
///
|
||||||
|
/// Connection string format:
|
||||||
|
/// <str> == <assignment> | <assignment> ' ' <str>
|
||||||
|
/// <assignment> == <name> '=' <value>
|
||||||
|
/// <name> == 'host' | 'port' | 'user' | 'password' | 'dbname' | 'connect_timeout'
|
||||||
|
/// <value> == [~;]*
|
||||||
|
///
|
||||||
|
/// consult postgres documentation for other parameters
|
||||||
|
|
||||||
|
~SessionImpl();
|
||||||
|
/// Destroys the SessionImpl.
|
||||||
|
|
||||||
|
void setConnectionTimeout(std::size_t aTimeout);
|
||||||
|
/// Sets the session connection timeout value.
|
||||||
|
|
||||||
|
std::size_t getConnectionTimeout();
|
||||||
|
/// Returns the session connection timeout value.
|
||||||
|
|
||||||
|
void open(const std::string& aConnectionString = std::string());
|
||||||
|
/// Opens a connection to the database.
|
||||||
|
|
||||||
|
void close();
|
||||||
|
/// Closes the connection.
|
||||||
|
|
||||||
|
bool isConnected();
|
||||||
|
/// Returns true if connected, false otherwise.
|
||||||
|
|
||||||
|
Poco::Data::StatementImpl* createStatementImpl();
|
||||||
|
/// Returns an PostgreSQL StatementImpl
|
||||||
|
|
||||||
|
void begin();
|
||||||
|
/// Starts a transaction
|
||||||
|
|
||||||
|
void commit();
|
||||||
|
/// Commits and ends a transaction
|
||||||
|
|
||||||
|
void rollback();
|
||||||
|
/// Aborts a transaction
|
||||||
|
|
||||||
|
bool canTransact();
|
||||||
|
/// Returns true if session has transaction capabilities.
|
||||||
|
|
||||||
|
bool isTransaction();
|
||||||
|
/// Returns true iff a transaction is a transaction is in progress, false otherwise.
|
||||||
|
|
||||||
|
void setTransactionIsolation(Poco::UInt32 aTI);
|
||||||
|
/// Sets the transaction isolation level.
|
||||||
|
|
||||||
|
Poco::UInt32 getTransactionIsolation();
|
||||||
|
/// Returns the transaction isolation level.
|
||||||
|
|
||||||
|
bool hasTransactionIsolation(Poco::UInt32 aTI);
|
||||||
|
/// Returns true iff the transaction isolation level corresponding
|
||||||
|
/// to the supplied bitmask is supported.
|
||||||
|
|
||||||
|
bool isTransactionIsolation(Poco::UInt32 aTI);
|
||||||
|
/// Returns true iff the transaction isolation level corresponds
|
||||||
|
/// to the supplied bitmask.
|
||||||
|
|
||||||
|
void setAutoCommit(const std::string&, bool aValue);
|
||||||
|
/// Sets autocommit property for the session.
|
||||||
|
|
||||||
|
bool isAutoCommit(const std::string& aName = std::string());
|
||||||
|
/// Returns autocommit property value.
|
||||||
|
|
||||||
|
void setAsynchronousCommit(const std::string&, bool aValue);
|
||||||
|
/// Sets asynchronousCommit property for the session.
|
||||||
|
|
||||||
|
bool isAsynchronousCommit(const std::string& aName = std::string());
|
||||||
|
/// is the connection in Asynchronous commit mode?
|
||||||
|
|
||||||
|
SessionHandle& handle();
|
||||||
|
/// Get handle
|
||||||
|
|
||||||
|
const std::string& connectorName() const;
|
||||||
|
/// Returns the name of the connector.
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string _connectorName;
|
||||||
|
SessionHandle _sessionHandle;
|
||||||
|
|
||||||
|
std::size_t _timeout;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// inlines
|
||||||
|
//
|
||||||
|
inline
|
||||||
|
bool
|
||||||
|
SessionImpl::canTransact()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SessionHandle& SessionImpl::handle()
|
||||||
|
{
|
||||||
|
return _sessionHandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const std::string& SessionImpl::connectorName() const
|
||||||
|
{
|
||||||
|
return _connectorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool SessionImpl::isTransactionIsolation(Poco::UInt32 aTI)
|
||||||
|
{
|
||||||
|
return getTransactionIsolation() == aTI;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline std::size_t SessionImpl::getConnectionTimeout()
|
||||||
|
{
|
||||||
|
return _timeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::Data::PostgreSQL
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Data_PostgreSQL_SessionImpl_INCLUDED
|
140
Data/PostgreSQL/include/Poco/Data/PostgreSQL/StatementExecutor.h
Normal file
140
Data/PostgreSQL/include/Poco/Data/PostgreSQL/StatementExecutor.h
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
//
|
||||||
|
// StatementExecutor.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.5/Data/PostgreSQL/include/Poco/Data/PostgreSQL/StatementExecutor.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Data
|
||||||
|
// Package: PostgreSQL
|
||||||
|
// Module: StatementExecutor
|
||||||
|
//
|
||||||
|
// Definition of the StatementExecutor class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Data_PostgreSQL_StatementHandle_INCLUDED
|
||||||
|
#define Data_PostgreSQL_StatementHandle_INCLUDED
|
||||||
|
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQLException.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQLTypes.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/SessionHandle.h"
|
||||||
|
#include "Poco/Data/MetaColumn.h"
|
||||||
|
|
||||||
|
#include <libpq-fe.h>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace Data {
|
||||||
|
namespace PostgreSQL {
|
||||||
|
|
||||||
|
|
||||||
|
class StatementExecutor
|
||||||
|
/// PostgreSQL statement executor.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum State
|
||||||
|
{
|
||||||
|
STMT_INITED,
|
||||||
|
STMT_COMPILED,
|
||||||
|
STMT_EXECUTED
|
||||||
|
};
|
||||||
|
|
||||||
|
explicit StatementExecutor(SessionHandle& aSessionHandle);
|
||||||
|
/// Creates the StatementExecutor.
|
||||||
|
|
||||||
|
~StatementExecutor();
|
||||||
|
/// Destroys the StatementExecutor.
|
||||||
|
|
||||||
|
State state() const;
|
||||||
|
/// Returns the current state.
|
||||||
|
|
||||||
|
void prepare(const std::string& aSQLStatement);
|
||||||
|
/// Prepares the statement for execution.
|
||||||
|
|
||||||
|
void bindParams(const InputParameterVector& anInputParameterVector);
|
||||||
|
/// Binds the params - REQUIRED if the statment has input parameters/placeholders
|
||||||
|
/// Pointer and list elements must stay valid for the lifetime of the StatementExecutor!
|
||||||
|
|
||||||
|
void execute();
|
||||||
|
/// Executes the statement.
|
||||||
|
|
||||||
|
bool fetch();
|
||||||
|
/// Fetches the data for the current row
|
||||||
|
|
||||||
|
std::size_t getAffectedRowCount() const;
|
||||||
|
/// get the count of rows affected by the statement
|
||||||
|
|
||||||
|
std::size_t columnsReturned() const;
|
||||||
|
/// get the count of columns returned by the statement
|
||||||
|
|
||||||
|
const MetaColumn& metaColumn(std::size_t aPosition) const;
|
||||||
|
/// Returns the reference to the specified metacolumn - 0 based
|
||||||
|
|
||||||
|
const OutputParameter& resultColumn(std::size_t aPosition) const;
|
||||||
|
/// Returns the reference to the specified result - 0 based
|
||||||
|
|
||||||
|
operator PGresult* ();
|
||||||
|
/// Cast operator to native result handle type.
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
void clearResults();
|
||||||
|
|
||||||
|
StatementExecutor(const StatementExecutor&);
|
||||||
|
StatementExecutor& operator= (const StatementExecutor&);
|
||||||
|
|
||||||
|
private:
|
||||||
|
SessionHandle& _sessionHandle;
|
||||||
|
State _state;
|
||||||
|
|
||||||
|
PGresult* _pResultHandle;
|
||||||
|
std::string _SQLStatement;
|
||||||
|
std::string _preparedStatementName; // UUID based to allow multiple prepared statements per transaction.
|
||||||
|
std::size_t _countPlaceholdersInSQLStatement;
|
||||||
|
std::vector<MetaColumn> _resultColumns;
|
||||||
|
|
||||||
|
InputParameterVector _inputParameterVector;
|
||||||
|
OutputParameterVector _outputParameterVector;
|
||||||
|
std::size_t _currentRow; // current row of the result
|
||||||
|
std::size_t _affectedRowCount;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// inlines
|
||||||
|
//
|
||||||
|
|
||||||
|
inline StatementExecutor::operator PGresult* ()
|
||||||
|
{
|
||||||
|
return _pResultHandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
}}}
|
||||||
|
|
||||||
|
#endif // Data_PostgreSQL_StatementHandle_INCLUDED
|
103
Data/PostgreSQL/include/Poco/Data/PostgreSQL/Utility.h
Normal file
103
Data/PostgreSQL/include/Poco/Data/PostgreSQL/Utility.h
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
//
|
||||||
|
// Utility.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/Data/PostgreSQL/include/Poco/Data/PostgreSQL/Utility.h#2 $
|
||||||
|
//
|
||||||
|
// Library: PostgreSQL
|
||||||
|
// Package: PostgreSQL
|
||||||
|
// Module: Utility
|
||||||
|
//
|
||||||
|
// Definition of Utility.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef PostgreSQL_Utility_INCLUDED
|
||||||
|
#define PostgreSQL_Utility_INCLUDED
|
||||||
|
|
||||||
|
#include "Poco/Data/PostgreSQL/PostgreSQL.h"
|
||||||
|
#include "Poco/Data/PostgreSQL/SessionHandle.h"
|
||||||
|
|
||||||
|
#include "Poco/Data/Session.h"
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace Data {
|
||||||
|
namespace PostgreSQL {
|
||||||
|
|
||||||
|
|
||||||
|
class PostgreSQL_API Utility
|
||||||
|
/// Various utility functions for PostgreSQL.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
static std::string serverInfo(SessionHandle* aHandlePtr);
|
||||||
|
/// Returns server info.
|
||||||
|
|
||||||
|
static std::string serverInfo(Poco::Data::Session& aSession);
|
||||||
|
/// Returns server info.
|
||||||
|
|
||||||
|
static int serverVersion(SessionHandle* aHandlePtr);
|
||||||
|
/// Returns server version.
|
||||||
|
|
||||||
|
static int serverVersion(Poco::Data::Session& aSession);
|
||||||
|
/// Returns server version.
|
||||||
|
|
||||||
|
static std::string hostInfo(SessionHandle* aHandlePtr);
|
||||||
|
/// Returns host info.
|
||||||
|
|
||||||
|
static std::string hostInfo(Poco::Data::Session& aSession);
|
||||||
|
/// Returns host info.
|
||||||
|
|
||||||
|
static std::string sessionEncoding(SessionHandle* aHandlePtr);
|
||||||
|
/// Returns session encoding.
|
||||||
|
|
||||||
|
static std::string sessionEncoding(Poco::Data::Session& aSession);
|
||||||
|
/// Returns session encoding.
|
||||||
|
|
||||||
|
static bool hasMicrosecond() { return true; }
|
||||||
|
/// Rturns true if microseconds are suported.
|
||||||
|
|
||||||
|
static SessionHandle* handle(Poco::Data::Session& aSession);
|
||||||
|
/// Returns native PostgreSQL handle for the session.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// inlines
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
inline SessionHandle* Utility::handle(Session& aSession)
|
||||||
|
{
|
||||||
|
return Poco::AnyCast< SessionHandle* >(aSession.getProperty("handle"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::Data::PostgreSQL
|
||||||
|
|
||||||
|
|
||||||
|
#endif // PostgreSQL_Utility_INCLUDED
|
24
Data/PostgreSQL/include/libpq/libpq-fs.h
Normal file
24
Data/PostgreSQL/include/libpq/libpq-fs.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* libpq-fs.h
|
||||||
|
* definitions for using Inversion file system routines (ie, large objects)
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
|
||||||
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
|
*
|
||||||
|
* src/include/libpq/libpq-fs.h
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
#ifndef LIBPQ_FS_H
|
||||||
|
#define LIBPQ_FS_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read/write mode flags for inversion (large object) calls
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define INV_WRITE 0x00020000
|
||||||
|
#define INV_READ 0x00040000
|
||||||
|
|
||||||
|
#endif /* LIBPQ_FS_H */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user