mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-02 03:27:56 +00:00
Data2sql (#2070)
* remove leftover progen files * remove Data sources and turn headers into forwards * add SQL files #2059 * Data2sql: adjust Travis, AppVeyor & Makefiles (#2069) * Replace Data by SQL * Replace Data by SQL * Replace Data by SQL * Replace Data by SQL * fix header forwarding * Data2sql: Fixes for complete Travis CI success (#2071) * Replace Data by SQL * Replace Data by SQL * Replace Data by SQL * Replace Data by SQL * Replace Data by SQL * Restore DataFormatException * Replace Data by SQL * Replace Data by SQL * Replace Data by SQL * Replace Data by SQL * construct RowFilter from RecordSet reference instead of pointer * pass Container ref instead of ptr to Column * elimitate g++ warnings * SQL: remove raw pointers from interfaces #2094; add constness and move ops where appropriate * tidy up Postgres * ODBC fixes
This commit is contained in:
committed by
GitHub
parent
7726d024ab
commit
b49ac67225
34
SQL/PostgreSQL/CMakeLists.txt
Normal file
34
SQL/PostgreSQL/CMakeLists.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
set(LIBNAME "SQLPostgreSQL")
|
||||
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 SQL ${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 ()
|
||||
21
SQL/PostgreSQL/Makefile
Normal file
21
SQL/PostgreSQL/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# 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 = PocoSQLPostgreSQL
|
||||
target_version = $(LIBVERSION)
|
||||
target_libs = PocoSQL PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/lib
|
||||
60
SQL/PostgreSQL/PostgreSQL_vs140.sln
Normal file
60
SQL/PostgreSQL/PostgreSQL_vs140.sln
Normal file
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.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
|
||||
308
SQL/PostgreSQL/PostgreSQL_vs140.vcxproj
Normal file
308
SQL/PostgreSQL/PostgreSQL_vs140.vcxproj
Normal file
@@ -0,0 +1,308 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.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>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</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>14.0.23107.0</_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>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
SQL/PostgreSQL/PostgreSQL_vs140.vcxproj.filters
Normal file
84
SQL/PostgreSQL/PostgreSQL_vs140.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
SQL/PostgreSQL/PostgreSQL_vs150.sln
Normal file
60
SQL/PostgreSQL/PostgreSQL_vs150.sln
Normal file
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2017
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_vs150.vcxproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs150.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
|
||||
308
SQL/PostgreSQL/PostgreSQL_vs150.vcxproj
Normal file
308
SQL/PostgreSQL/PostgreSQL_vs150.vcxproj
Normal file
@@ -0,0 +1,308 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.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>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</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>14.0.23107.0</_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>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
SQL/PostgreSQL/PostgreSQL_vs150.vcxproj.filters
Normal file
84
SQL/PostgreSQL/PostgreSQL_vs150.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
SQL/PostgreSQL/PostgreSQL_x64_vs140.sln
Normal file
60
SQL/PostgreSQL/PostgreSQL_x64_vs140.sln
Normal file
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.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
|
||||
306
SQL/PostgreSQL/PostgreSQL_x64_vs140.vcxproj
Normal file
306
SQL/PostgreSQL/PostgreSQL_x64_vs140.vcxproj
Normal file
@@ -0,0 +1,306 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.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>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</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>14.0.23107.0</_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
SQL/PostgreSQL/PostgreSQL_x64_vs140.vcxproj.filters
Normal file
84
SQL/PostgreSQL/PostgreSQL_x64_vs140.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
SQL/PostgreSQL/PostgreSQL_x64_vs150.sln
Normal file
60
SQL/PostgreSQL/PostgreSQL_x64_vs150.sln
Normal file
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2017
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostgreSQL", "PostgreSQL_x64_vs150.vcxproj", "{73E19FDE-1570-488C-B3DB-72A60FADD408}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs150.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
SQL/PostgreSQL/PostgreSQL_x64_vs150.vcxproj
Normal file
306
SQL/PostgreSQL/PostgreSQL_x64_vs150.vcxproj
Normal file
@@ -0,0 +1,306 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.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>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</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>14.0.23107.0</_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
SQL/PostgreSQL/PostgreSQL_x64_vs150.vcxproj.filters
Normal file
84
SQL/PostgreSQL/PostgreSQL_x64_vs150.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>
|
||||
4
SQL/PostgreSQL/cmake/PocoSQLPostgreSQLConfig.cmake
Normal file
4
SQL/PostgreSQL/cmake/PocoSQLPostgreSQLConfig.cmake
Normal file
@@ -0,0 +1,4 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(PocoFoundation)
|
||||
find_dependency(PocoSQL)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoSQLPostgreSQLTargets.cmake")
|
||||
2
SQL/PostgreSQL/dependencies
Normal file
2
SQL/PostgreSQL/dependencies
Normal file
@@ -0,0 +1,2 @@
|
||||
Foundation
|
||||
Data
|
||||
263
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/Binder.h
Normal file
263
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/Binder.h
Normal file
@@ -0,0 +1,263 @@
|
||||
//
|
||||
// Binder.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: Binder
|
||||
//
|
||||
// Definition of the Binder class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SQL_PostgreSQL_Binder_INCLUDED
|
||||
#define SQL_PostgreSQL_Binder_INCLUDED
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQL.h"
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLTypes.h"
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLException.h"
|
||||
|
||||
#include "Poco/SQL/AbstractBinder.h"
|
||||
#include "Poco/SQL/MetaColumn.h"
|
||||
#include "Poco/SQL/LOB.h"
|
||||
#include "Poco/Types.h"
|
||||
|
||||
#include <libpq-fe.h>
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
class PostgreSQL_API Binder: public Poco::SQL::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::SQL::BLOB& val, Direction dir = PD_IN, const WhenNullCb& nullCb = WhenNullCb());
|
||||
/// Binds a BLOB.
|
||||
|
||||
virtual void bind(std::size_t pos, const Poco::SQL::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::SQL::MetaColumn::ColumnDataType aFieldType, const void* aBufferPtr, std::size_t aLength);
|
||||
/// Common bind implementation
|
||||
|
||||
private:
|
||||
|
||||
InputParameterVector _bindVector;
|
||||
};
|
||||
|
||||
|
||||
} } } // namespace Poco::SQL::PostgreSQL
|
||||
|
||||
|
||||
#endif // Data_PostgreSQL_Binder_INCLUDED
|
||||
119
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/Connector.h
Normal file
119
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/Connector.h
Normal file
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// Connector.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: Connector
|
||||
//
|
||||
// Definition of the Connector class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
#ifndef SQL_PostgreSQL_Connector_INCLUDED
|
||||
#define SQL_PostgreSQL_Connector_INCLUDED
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQL.h"
|
||||
#include "Poco/SQL/SessionImpl.h"
|
||||
#include "Poco/SQL/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 SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
class PostgreSQL_API Connector: public Poco::SQL::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::SQL::SessionImpl::Ptr createSession(const std::string& aConnectionString,
|
||||
std::size_t aTimeout = Poco::SQL::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::SQL::SessionFactory
|
||||
|
||||
static void unregisterConnector();
|
||||
/// Unregisters the Connector under the Keyword Connector::KEY at the Poco::SQL::SessionFactory
|
||||
};
|
||||
|
||||
|
||||
} } } // namespace Poco::SQL::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::SQL::PostgreSQL::registerConnector();
|
||||
{
|
||||
Poco::SQL::PostgreSQL::Connector::registerConnector();
|
||||
}
|
||||
|
||||
~PostgreSQLConnectorRegistrator()
|
||||
/// Calls Poco::SQL::PostgreSQL::unregisterConnector();
|
||||
{
|
||||
Poco::SQL::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
|
||||
369
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/Extractor.h
Normal file
369
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/Extractor.h
Normal file
@@ -0,0 +1,369 @@
|
||||
//
|
||||
// Extractor.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: Extractor
|
||||
//
|
||||
// Definition of the Extractor class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SQL_PostgreSQL_Extractor_INCLUDED
|
||||
#define SQL_PostgreSQL_Extractor_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQL.h"
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLTypes.h"
|
||||
#include "Poco/SQL/PostgreSQL/StatementExecutor.h"
|
||||
|
||||
#include "Poco/SQL/AbstractExtractor.h"
|
||||
#include "Poco/SQL/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 SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
class PostgreSQL_API Extractor: public Poco::SQL::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::SQL::BLOB& val);
|
||||
/// Extracts a BLOB.
|
||||
|
||||
virtual bool extract(std::size_t pos, Poco::SQL::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::SQL::PostgreSQL
|
||||
|
||||
|
||||
#endif // SQL_PostgreSQL_Extractor_INCLUDED
|
||||
60
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/PostgreSQL.h
Normal file
60
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/PostgreSQL.h
Normal file
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// PostgreSQL.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: PostgreSQL
|
||||
//
|
||||
// Basic definitions for the PostgreSQL library.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SQL_PostgreSQL_INCLUDED
|
||||
#define SQL_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, whereas 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 // SQL_PostgreSQL_INCLUDED
|
||||
139
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/PostgreSQLException.h
Normal file
139
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/PostgreSQLException.h
Normal file
@@ -0,0 +1,139 @@
|
||||
//
|
||||
// PostgreSQLException.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: PostgreSQLException
|
||||
//
|
||||
// Definition of the PostgreSQLException class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SQL_PostgreSQL_PostgreSQLException_INCLUDED
|
||||
#define SQL_PostgreSQL_PostgreSQLException_INCLUDED
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQL.h"
|
||||
#include "Poco/SQL/SQLException.h"
|
||||
|
||||
#include <typeinfo>
|
||||
#include <string>
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
// End-user include this file and use in code ConnectionException/StatementException
|
||||
// So it need not know
|
||||
|
||||
class PostgreSQL_API PostgreSQLException: public Poco::SQL::SQLException
|
||||
/// 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::SQL::SQLException::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::SQL::PostgreSQL
|
||||
|
||||
#endif //SQL_PostgreSQL_PostgreSQLException_INCLUDED
|
||||
@@ -0,0 +1,100 @@
|
||||
//
|
||||
// PostgreSQLStatementImpl.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: PostgreSQLStatementImpl
|
||||
//
|
||||
// Definition of the PostgreSQLStatementImpl class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SQL_PostgreSQL_PostgreSQLStatementImpl_INCLUDED
|
||||
#define SQL_PostgreSQL_PostgreSQLStatementImpl_INCLUDED
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQL.h"
|
||||
#include "Poco/SQL/PostgreSQL/SessionImpl.h"
|
||||
#include "Poco/SQL/PostgreSQL/Binder.h"
|
||||
#include "Poco/SQL/PostgreSQL/Extractor.h"
|
||||
#include "Poco/SQL/PostgreSQL/StatementExecutor.h"
|
||||
#include "Poco/SQL/StatementImpl.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/Format.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
class PostgreSQL_API PostgreSQLStatementImpl: public Poco::SQL::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::SQL::AbstractExtractor::Ptr extractor();
|
||||
/// Returns the concrete extractor used by the statement.
|
||||
|
||||
virtual Poco::SQL::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::SQL::PostgreSQL
|
||||
|
||||
|
||||
#endif // SQL_PostgreSQL_PostgreSQLStatementImpl_INCLUDED
|
||||
427
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/PostgreSQLTypes.h
Normal file
427
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/PostgreSQLTypes.h
Normal file
@@ -0,0 +1,427 @@
|
||||
//
|
||||
// PostgreSQLTypes.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: PostgreSQLTypes
|
||||
//
|
||||
// Definition of the SessionHandle class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
#ifndef SQL_PostgreSQL_Types_INCLUDED
|
||||
#define SQL_PostgreSQL_Types_INCLUDED
|
||||
|
||||
#include "Poco/SQL/MetaColumn.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <libpq-fe.h>
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
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::SQL::MetaColumn::ColumnDataType oidToColumnDataType(const Oid anOID);
|
||||
|
||||
class InputParameter
|
||||
/// PostgreSQL class to record values for input parameters to SQL statements
|
||||
{
|
||||
public:
|
||||
typedef Poco::SQL::MetaColumn::ColumnDataType CDT;
|
||||
|
||||
explicit InputParameter(CDT fieldType, const void* dataPtr, std::size_t dataLength);
|
||||
explicit InputParameter();
|
||||
|
||||
~InputParameter();
|
||||
|
||||
CDT 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:
|
||||
CDT _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:
|
||||
typedef Poco::SQL::MetaColumn::ColumnDataType CDT;
|
||||
|
||||
OutputParameter(CDT aFieldType, Oid internalFieldType, std::size_t rowNumber,
|
||||
const char* dataPtr, std::size_t size, bool isNull);
|
||||
|
||||
OutputParameter();
|
||||
~OutputParameter();
|
||||
|
||||
void setValues(CDT fieldType, Oid internalFieldType, std::size_t rowNumber,
|
||||
const char* dataPtr, std::size_t size, bool isNull);
|
||||
|
||||
CDT fieldType() const;
|
||||
Oid internalFieldType() const;
|
||||
std::size_t rowNumber() const;
|
||||
const char* pData() const;
|
||||
std::size_t size() const;
|
||||
bool isNull() const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
CDT _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::SQL::MetaColumn::ColumnDataType aFieldType,
|
||||
const void* aDataPtr, std::size_t theSize): _fieldType(aFieldType),
|
||||
_pData(aDataPtr),
|
||||
_size(theSize),
|
||||
_isBinary(false),
|
||||
_pNonStringVersionRepresentation(0)
|
||||
{
|
||||
if (Poco::SQL::MetaColumn::FDT_BLOB == _fieldType
|
||||
|| Poco::SQL::MetaColumn::FDT_CLOB == _fieldType)
|
||||
{
|
||||
_isBinary = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline InputParameter::InputParameter(): _fieldType(Poco::SQL::MetaColumn::FDT_UNKNOWN),
|
||||
_pData(0),
|
||||
_size(0),
|
||||
_isBinary(false),
|
||||
_pNonStringVersionRepresentation(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline InputParameter::~InputParameter()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline const void* InputParameter::pData() const
|
||||
{
|
||||
return _pData;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::SQL::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::SQL::MetaColumn::FDT_BOOL:
|
||||
case Poco::SQL::MetaColumn::FDT_INT8:
|
||||
case Poco::SQL::MetaColumn::FDT_UINT8:
|
||||
case Poco::SQL::MetaColumn::FDT_INT16:
|
||||
case Poco::SQL::MetaColumn::FDT_UINT16:
|
||||
case Poco::SQL::MetaColumn::FDT_INT32:
|
||||
case Poco::SQL::MetaColumn::FDT_UINT32:
|
||||
case Poco::SQL::MetaColumn::FDT_INT64:
|
||||
case Poco::SQL::MetaColumn::FDT_UINT64:
|
||||
case Poco::SQL::MetaColumn::FDT_FLOAT:
|
||||
case Poco::SQL::MetaColumn::FDT_DOUBLE:
|
||||
case Poco::SQL::MetaColumn::FDT_STRING:
|
||||
case Poco::SQL::MetaColumn::FDT_DATE:
|
||||
case Poco::SQL::MetaColumn::FDT_TIME:
|
||||
case Poco::SQL::MetaColumn::FDT_TIMESTAMP:
|
||||
return _stringVersionRepresentation.c_str();
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_BLOB:
|
||||
case Poco::SQL::MetaColumn::FDT_CLOB:
|
||||
return _pNonStringVersionRepresentation;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_UNKNOWN:
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// OutputParameter
|
||||
|
||||
inline OutputParameter::OutputParameter(Poco::SQL::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::SQL::MetaColumn::FDT_UNKNOWN),
|
||||
_internalFieldType (-1),
|
||||
_rowNumber (0),
|
||||
_pData (0),
|
||||
_size (0),
|
||||
_isNull (true)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline OutputParameter::~OutputParameter()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline void OutputParameter::setValues(Poco::SQL::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::SQL::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 // SQL_PostgreSQL_Types_INCLUDED
|
||||
324
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/SessionHandle.h
Normal file
324
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/SessionHandle.h
Normal file
@@ -0,0 +1,324 @@
|
||||
//
|
||||
// SesssionHandle.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: SessionHandle
|
||||
//
|
||||
// Definition of the SessionHandle class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
#ifndef SQL_PostgreSQL_SessionHandle_INCLUDED
|
||||
#define SQL_PostgreSQL_SessionHandle_INCLUDED
|
||||
|
||||
#include "Poco/Mutex.h"
|
||||
#include "Poco/Types.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <libpq-fe.h>
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}}} // namespace Poco::SQL::PostgreSQL
|
||||
|
||||
|
||||
#endif // SQL_PostgreSQL_SessionHandle_INCLUDED
|
||||
162
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/SessionImpl.h
Normal file
162
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/SessionImpl.h
Normal file
@@ -0,0 +1,162 @@
|
||||
//
|
||||
// SessionImpl.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: SessionImpl
|
||||
//
|
||||
// Definition of the SessionImpl class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SQL_PostgreSQL_SessionImpl_INCLUDED
|
||||
#define SQL_PostgreSQL_SessionImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQL.h"
|
||||
#include "Poco/SQL/PostgreSQL/SessionHandle.h"
|
||||
#include "Poco/SQL/AbstractSessionImpl.h"
|
||||
#include "Poco/SQL/StatementImpl.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
class PostgreSQL_API SessionImpl: public Poco::SQL::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() const;
|
||||
/// 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() const;
|
||||
/// Returns true if connected, false otherwise.
|
||||
|
||||
Poco::SQL::StatementImpl::Ptr createStatementImpl();
|
||||
/// Returns an PostgreSQL StatementImpl
|
||||
|
||||
void begin();
|
||||
/// Starts a transaction
|
||||
|
||||
void commit();
|
||||
/// Commits and ends a transaction
|
||||
|
||||
void rollback();
|
||||
/// Aborts a transaction
|
||||
|
||||
bool canTransact() const;
|
||||
/// Returns true if session has transaction capabilities.
|
||||
|
||||
bool isTransaction() const;
|
||||
/// 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() const;
|
||||
/// Returns the transaction isolation level.
|
||||
|
||||
bool hasTransactionIsolation(Poco::UInt32 aTI) const;
|
||||
/// Returns true iff the transaction isolation level corresponding
|
||||
/// to the supplied bitmask is supported.
|
||||
|
||||
bool isTransactionIsolation(Poco::UInt32 aTI) const;
|
||||
/// 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()) const;
|
||||
/// 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()) const;
|
||||
/// 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;
|
||||
mutable SessionHandle _sessionHandle;
|
||||
std::size_t _timeout;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
|
||||
inline bool SessionImpl::canTransact() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
inline SessionHandle& SessionImpl::handle()
|
||||
{
|
||||
return _sessionHandle;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& SessionImpl::connectorName() const
|
||||
{
|
||||
return _connectorName;
|
||||
}
|
||||
|
||||
|
||||
inline bool SessionImpl::isTransactionIsolation(Poco::UInt32 aTI) const
|
||||
{
|
||||
return getTransactionIsolation() == aTI;
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t SessionImpl::getConnectionTimeout() const
|
||||
{
|
||||
return _timeout;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::SQL::PostgreSQL
|
||||
|
||||
|
||||
#endif // SQL_PostgreSQL_SessionImpl_INCLUDED
|
||||
118
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/StatementExecutor.h
Normal file
118
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/StatementExecutor.h
Normal file
@@ -0,0 +1,118 @@
|
||||
//
|
||||
// StatementExecutor.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: StatementExecutor
|
||||
//
|
||||
// Definition of the StatementExecutor class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SQL_PostgreSQL_StatementExecutor_INCLUDED
|
||||
#define SQL_PostgreSQL_StatementExecutor_INCLUDED
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLException.h"
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLTypes.h"
|
||||
#include "Poco/SQL/PostgreSQL/SessionHandle.h"
|
||||
#include "Poco/SQL/MetaColumn.h"
|
||||
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
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 statement 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 // SQL_PostgreSQL_StatementExecutor_INCLUDED
|
||||
82
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/Utility.h
Normal file
82
SQL/PostgreSQL/include/Poco/SQL/PostgreSQL/Utility.h
Normal file
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// Utility.h
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: Utility
|
||||
//
|
||||
// Definition of Utility.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SQL_PostgreSQL_Utility_INCLUDED
|
||||
#define SQL_PostgreSQL_Utility_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQL.h"
|
||||
#include "Poco/SQL/PostgreSQL/SessionHandle.h"
|
||||
#include "Poco/SQL/Session.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
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::SQL::Session& aSession);
|
||||
/// Returns server info.
|
||||
|
||||
static int serverVersion(SessionHandle* aHandlePtr);
|
||||
/// Returns server version.
|
||||
|
||||
static int serverVersion(Poco::SQL::Session& aSession);
|
||||
/// Returns server version.
|
||||
|
||||
static std::string hostInfo(SessionHandle* aHandlePtr);
|
||||
/// Returns host info.
|
||||
|
||||
static std::string hostInfo(Poco::SQL::Session& aSession);
|
||||
/// Returns host info.
|
||||
|
||||
static std::string sessionEncoding(SessionHandle* aHandlePtr);
|
||||
/// Returns session encoding.
|
||||
|
||||
static std::string sessionEncoding(Poco::SQL::Session& aSession);
|
||||
/// Returns session encoding.
|
||||
|
||||
static bool hasMicrosecond() { return true; }
|
||||
/// Rturns true if microseconds are suported.
|
||||
|
||||
static SessionHandle* handle(Poco::SQL::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::SQL::PostgreSQL
|
||||
|
||||
|
||||
#endif // SQL_PostgreSQL_Utility_INCLUDED
|
||||
24
SQL/PostgreSQL/include/libpq/libpq-fs.h
Normal file
24
SQL/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 */
|
||||
673
SQL/PostgreSQL/src/Binder.cpp
Normal file
673
SQL/PostgreSQL/src/Binder.cpp
Normal file
@@ -0,0 +1,673 @@
|
||||
//
|
||||
// Binder.cpp
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: Binder
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/Binder.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
#include "Poco/DateTimeFormat.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
Binder::Binder()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Binder::~Binder()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::Int8& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_INT8, &val, sizeof(Poco::Int8));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt8& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_UINT8, &val, sizeof(Poco::UInt8));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::Int16& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_INT16, &val, sizeof(Poco::Int16));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt16& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_UINT16, &val, sizeof(Poco::UInt16));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::Int32& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_INT32, &val, sizeof(Poco::Int32));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt32& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_UINT32, &val, sizeof(Poco::UInt32));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::Int64& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_INT64, &val, sizeof(Poco::Int64));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::UInt64& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_UINT64, &val, sizeof(Poco::UInt64));
|
||||
}
|
||||
|
||||
|
||||
#ifndef POCO_LONG_IS_64_BIT
|
||||
|
||||
void Binder::bind(std::size_t pos, const long& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_INT64, &val, sizeof(Poco::Int64));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_UINT64, &val, sizeof(Poco::UInt64));
|
||||
}
|
||||
|
||||
#endif // POCO_LONG_IS_64_BIT
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const bool& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_BOOL, &val, sizeof(bool));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const float& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_FLOAT, &val, sizeof(float));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const double& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_DOUBLE, &val, sizeof(double));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const char& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
// USING UINT8 because Poco::SQL::MetaColumn does not have a single character type, just std::string
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_UINT8, &val, sizeof(char));
|
||||
}
|
||||
|
||||
// complex types
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::string& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_STRING, &val, static_cast<int>(val.size()));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::SQL::BLOB& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_BLOB, &val, static_cast<int>(val.size()));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::SQL::CLOB& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_CLOB, &val, static_cast<int>(val.size()));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::DateTime& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_TIMESTAMP, &val, sizeof(Poco::DateTime));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Date& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_DATE, &val, sizeof(Date));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Time& val, Direction dir, const WhenNullCb& nullCb)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_TIME, &val, sizeof(Time));
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const NullData&, Direction dir, const std::type_info&)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
realBind(pos, Poco::SQL::MetaColumn::FDT_UNKNOWN, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
std::size_t Binder::size() const
|
||||
{
|
||||
return static_cast<std::size_t>(_bindVector.size());
|
||||
}
|
||||
|
||||
|
||||
InputParameterVector
|
||||
Binder::bindVector() const
|
||||
{
|
||||
return _bindVector;
|
||||
}
|
||||
|
||||
|
||||
void Binder::updateBindVectorToCurrentValues()
|
||||
{
|
||||
InputParameterVector::iterator itr = _bindVector.begin();
|
||||
InputParameterVector::iterator itrEnd = _bindVector.end();
|
||||
|
||||
for (; itr != itrEnd; ++itr)
|
||||
{
|
||||
switch (itr->fieldType())
|
||||
{
|
||||
case Poco::SQL::MetaColumn::FDT_INT8:
|
||||
itr->setStringVersionRepresentation(Poco::NumberFormatter::format(* static_cast<const Poco::Int8*>(itr->pData())));
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_UINT8:
|
||||
itr->setStringVersionRepresentation(Poco::NumberFormatter::format(* static_cast<const Poco::UInt8*>(itr->pData())));
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_INT16:
|
||||
itr->setStringVersionRepresentation(Poco::NumberFormatter::format(* static_cast<const Poco::Int16*>(itr->pData())));
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_UINT16:
|
||||
itr->setStringVersionRepresentation(Poco::NumberFormatter::format(* static_cast<const Poco::UInt16*>(itr->pData())));
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_INT32:
|
||||
itr->setStringVersionRepresentation(Poco::NumberFormatter::format(* static_cast<const Poco::Int32*>(itr->pData())));
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_UINT32:
|
||||
itr->setStringVersionRepresentation(Poco::NumberFormatter::format(* static_cast<const Poco::UInt32*>(itr->pData())));
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_INT64:
|
||||
itr->setStringVersionRepresentation(Poco::NumberFormatter::format(* static_cast<const Poco::Int64*>(itr->pData())));
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_UINT64:
|
||||
itr->setStringVersionRepresentation(Poco::NumberFormatter::format(* static_cast<const Poco::UInt64*>(itr->pData())));
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_BOOL:
|
||||
{
|
||||
const bool currentBoolValue = * static_cast<const bool*>(itr->pData());
|
||||
itr->setStringVersionRepresentation(currentBoolValue ? "TRUE" : "FALSE");
|
||||
}
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_FLOAT:
|
||||
itr->setStringVersionRepresentation(Poco::NumberFormatter::format(* static_cast<const float*>(itr->pData())));
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_DOUBLE:
|
||||
itr->setStringVersionRepresentation(Poco::NumberFormatter::format(* static_cast<const double*>(itr->pData())));
|
||||
break;
|
||||
|
||||
// case Poco::SQL::MetaColumn::FDT_CHAR:
|
||||
// itr->setStringVersionRepresentation(std::string(static_cast<const char*>(itr->pData()), 1)); // single character string
|
||||
// break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_STRING:
|
||||
itr->setStringVersionRepresentation(* static_cast<const std::string*>(itr->pData()));
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_TIMESTAMP:
|
||||
{
|
||||
const Poco::DateTime& dateTime = * static_cast<const Poco::DateTime*>(itr->pData());
|
||||
itr->setStringVersionRepresentation(DateTimeFormatter::format(dateTime, Poco::DateTimeFormat::ISO8601_FRAC_FORMAT));
|
||||
}
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_DATE:
|
||||
{
|
||||
const Poco::SQL::Date& date = * static_cast<const Poco::SQL::Date*>(itr->pData());
|
||||
itr->setStringVersionRepresentation(DateTimeFormatter::format(Poco::DateTime(date.year(), date.month(), date.day()), "%Y-%m-%d"));
|
||||
}
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_TIME:
|
||||
{
|
||||
const Poco::SQL::Time& time = * static_cast<const Poco::SQL::Time*>(itr->pData());
|
||||
itr->setStringVersionRepresentation(DateTimeFormatter::format(Poco::DateTime(0, 1, 1, time.hour(), time.minute(), time.second()), "%H:%M:%s%z"));
|
||||
}
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_BLOB:
|
||||
{
|
||||
const Poco::SQL::BLOB& blob = * static_cast<const Poco::SQL::BLOB*>(itr->pData());
|
||||
itr->setNonStringVersionRepresentation(static_cast<const void*> (blob.rawContent()), blob.size());
|
||||
}
|
||||
break;
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_CLOB:
|
||||
{
|
||||
const Poco::SQL::CLOB& clob = * static_cast<const Poco::SQL::CLOB*>(itr->pData());
|
||||
itr->setNonStringVersionRepresentation(static_cast<const void*> (clob.rawContent()), clob.size());
|
||||
}
|
||||
|
||||
case Poco::SQL::MetaColumn::FDT_UNKNOWN:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Private
|
||||
//
|
||||
|
||||
void Binder::realBind(std::size_t aPosition, Poco::SQL::MetaColumn::ColumnDataType aFieldType, const void* aBufferPtr, std::size_t aLength)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (aPosition >= _bindVector.size())
|
||||
{
|
||||
_bindVector.resize(aPosition + 1);
|
||||
}
|
||||
|
||||
InputParameter inputParameter(aFieldType, aBufferPtr, aLength);
|
||||
|
||||
_bindVector[aPosition] = inputParameter;
|
||||
}
|
||||
catch (std::bad_alloc&)
|
||||
{
|
||||
PostgreSQLException("Memory allocation error while binding");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int8>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::Int8>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int8>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt8>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::UInt8>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt8>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int16>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::Int16>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int16>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt16>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::UInt16>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt16>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int32>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::Int32>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int32>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt32>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::UInt32>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt32>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::Int64>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::Int64>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::Int64>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::UInt64>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::UInt64>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::UInt64>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<bool>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<bool>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<bool>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<float>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<float>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<float>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<double>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<double>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<double>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<char>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<char>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<char>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::SQL::BLOB>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::SQL::BLOB>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::SQL::BLOB>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::SQL::CLOB>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::SQL::CLOB>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::SQL::CLOB>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::DateTime>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::DateTime>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::DateTime>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::SQL::Date>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::SQL::Date>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::SQL::Date>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::SQL::Time>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::SQL::Time>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::SQL::Time>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<Poco::SQL::NullData>& val, Direction dir, const std::type_info&)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<Poco::SQL::NullData>& val, Direction dir, const std::type_info&)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<Poco::SQL::NullData>& val, Direction dir, const std::type_info&)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::vector<std::string>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::deque<std::string>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::list<std::string>& val, Direction dir)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::SQL::PostgreSQL
|
||||
63
SQL/PostgreSQL/src/Connector.cpp
Normal file
63
SQL/PostgreSQL/src/Connector.cpp
Normal file
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// Connector.cpp
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: Connector
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/Connector.h"
|
||||
#include "Poco/SQL/PostgreSQL/SessionImpl.h"
|
||||
#include "Poco/SQL/SessionFactory.h"
|
||||
|
||||
|
||||
const PostgreSQLConnectorRegistrator pocoPostgreSQLConnectorRegistrator;
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
std::string Connector::KEY = POCO_DATA_POSTGRESQL_CONNECTOR_NAME;
|
||||
|
||||
|
||||
Connector::Connector()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Connector::~Connector()
|
||||
{
|
||||
}
|
||||
|
||||
const std::string&
|
||||
Connector::name() const
|
||||
{
|
||||
static const std::string n(POCO_DATA_POSTGRESQL_CONNECTOR_NAME);
|
||||
return n;
|
||||
}
|
||||
|
||||
SessionImpl::Ptr Connector::createSession(const std::string& aConnectionString, std::size_t aTimeout)
|
||||
{
|
||||
return Poco::AutoPtr<Poco::SQL::SessionImpl>(new SessionImpl(aConnectionString, aTimeout));
|
||||
}
|
||||
|
||||
void Connector::registerConnector()
|
||||
{
|
||||
Poco::SQL::SessionFactory::instance().add(new Connector());
|
||||
}
|
||||
|
||||
void Connector::unregisterConnector()
|
||||
{
|
||||
Poco::SQL::SessionFactory::instance().remove(POCO_DATA_POSTGRESQL_CONNECTOR_NAME);
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::SQL::PostgreSQL
|
||||
|
||||
870
SQL/PostgreSQL/src/Extractor.cpp
Normal file
870
SQL/PostgreSQL/src/Extractor.cpp
Normal file
@@ -0,0 +1,870 @@
|
||||
//
|
||||
// Extractor.cpp
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: Extractor
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/Extractor.h"
|
||||
#include "Poco/SQL/Date.h"
|
||||
#include "Poco/SQL/Time.h"
|
||||
#include "Poco/NumberParser.h"
|
||||
#include "Poco/DateTimeParser.h"
|
||||
#include <limits>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
Extractor::Extractor(StatementExecutor& st /*, ResultMetadata& md */)
|
||||
: _statementExecutor (st)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Extractor::~Extractor()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Poco::Int8& val)
|
||||
{
|
||||
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
int tempVal;
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParse(outputParameter.pData(), tempVal)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
val = tempVal;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Poco::UInt8& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
unsigned int tempVal;
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParseUnsigned(outputParameter.pData(), tempVal)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
val = tempVal;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Poco::Int16& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
int tempVal;
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParse(outputParameter.pData(), tempVal)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
val = tempVal;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Poco::UInt16& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
unsigned int tempVal;
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParseUnsigned(outputParameter.pData(), tempVal)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
val = tempVal;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Poco::Int32& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParse(outputParameter.pData(), val)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Poco::UInt32& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParseUnsigned(outputParameter.pData(), val)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Poco::Int64& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParse64(outputParameter.pData(), val)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Poco::UInt64& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParseUnsigned64(outputParameter.pData(), val)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#ifndef POCO_LONG_IS_64_BIT
|
||||
bool Extractor::extract(std::size_t pos, long& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
Poco::Int64 tempVal;
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParse64(outputParameter.pData(), tempVal)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
val = tempVal;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, unsigned long& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
Poco::UInt64 tempVal;
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParseUnsigned64(outputParameter.pData(), tempVal)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
val = tempVal;
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, bool& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if ( isColumnNull(outputParameter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ('t' == *outputParameter.pData())
|
||||
{
|
||||
val = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, float& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
double tempVal;
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParseFloat(outputParameter.pData(), tempVal)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
val = tempVal;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, double& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if ( isColumnNull(outputParameter)
|
||||
|| ! Poco::NumberParser::tryParseFloat(outputParameter.pData(), val)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, char& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if (isColumnNull(outputParameter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
val = *outputParameter.pData();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, std::string& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if (isColumnNull(outputParameter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
val.assign(outputParameter.pData(), outputParameter.size());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Poco::SQL::BLOB& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if (isColumnNull(outputParameter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// convert the PostgreSQL text format to binary and append to the BLOB
|
||||
// Format: \x10843029479abcf ... two characters for every byte
|
||||
//
|
||||
// The code below can be made more efficient by converting more than one byte at a time
|
||||
// also if BLOB had a resize method it would be useful to allocate memory in one
|
||||
// attempt.
|
||||
//
|
||||
|
||||
const char * pBLOB = reinterpret_cast<const char*>(outputParameter.pData());
|
||||
std::size_t BLOBSize = outputParameter.size();
|
||||
|
||||
if ( '\\' == pBLOB[0]
|
||||
&& 'x' == pBLOB[1] // preamble to BYTEA data format in text form is \x
|
||||
)
|
||||
{
|
||||
BLOBSize -= 2; // lose the preamble
|
||||
BLOBSize /= 2; // each byte is encoded as two text characters
|
||||
|
||||
for (int i = 0; i < BLOBSize * 2; i += 2)
|
||||
{
|
||||
std::string buffer(&pBLOB[i + 2], 2);
|
||||
unsigned int binaryBuffer = 0;
|
||||
if (Poco::NumberParser::tryParseHex(buffer, binaryBuffer))
|
||||
{
|
||||
unsigned char finalBinaryBuffer = binaryBuffer; // downsize
|
||||
val.appendRaw(&finalBinaryBuffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Poco::SQL::CLOB& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if (isColumnNull(outputParameter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
val.assignRaw(outputParameter.pData(), outputParameter.size());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Extractor::extract(std::size_t pos, DateTime& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if (isColumnNull(outputParameter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int tzd = -1;
|
||||
DateTime dateTime;
|
||||
|
||||
if (! DateTimeParser::tryParse(outputParameter.pData(), dateTime, tzd))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
dateTime.makeUTC(tzd);
|
||||
|
||||
val = dateTime;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Date& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if (isColumnNull(outputParameter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int tzd = -1;
|
||||
DateTime dateTime;
|
||||
|
||||
if (! DateTimeParser::tryParse(outputParameter.pData(), dateTime, tzd))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
dateTime.makeUTC(tzd);
|
||||
|
||||
val.assign(dateTime.year(), dateTime.month(), dateTime.day());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Time& val)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(pos);
|
||||
|
||||
if (isColumnNull(outputParameter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int tzd = -1;
|
||||
DateTime dateTime;
|
||||
|
||||
if (! DateTimeParser::tryParse("%H:%M:%s%z", outputParameter.pData(), dateTime, tzd))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// dateTime.makeUTC(tzd); // TODO
|
||||
// Note: Poco::SQL::Time should be extended to support the fractional components of Poco::DateTime
|
||||
|
||||
val.assign(dateTime.hour(), dateTime.minute(), dateTime.second());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Any& val)
|
||||
{
|
||||
return extractStringImpl (pos, val);
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Dynamic::Var& val)
|
||||
{
|
||||
return extractStringImpl (pos, val);
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::isNull(std::size_t col, std::size_t row)
|
||||
{
|
||||
OutputParameter outputParameter = extractPreamble(col);
|
||||
|
||||
if (isColumnNull(outputParameter))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void Extractor::reset()
|
||||
{
|
||||
AbstractExtractor::reset();
|
||||
}
|
||||
|
||||
|
||||
const OutputParameter&
|
||||
Extractor::extractPreamble(std::size_t aPosition) const
|
||||
{
|
||||
if (_statementExecutor.columnsReturned() <= aPosition)
|
||||
{
|
||||
throw PostgreSQLException("Extractor: attempt to extract more parameters than query result contains");
|
||||
}
|
||||
|
||||
return _statementExecutor.resultColumn(aPosition);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Extractor::isColumnNull (const OutputParameter& anOutputParameter) const
|
||||
{
|
||||
return anOutputParameter.isNull()
|
||||
|| 0 == anOutputParameter.pData();
|
||||
}
|
||||
|
||||
|
||||
//////////////
|
||||
// Not implemented
|
||||
//////////////
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Poco::Int8>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Poco::Int8>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Poco::Int8>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Poco::UInt8>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Poco::UInt8>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Poco::UInt8>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Poco::Int16>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Poco::Int16>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Poco::Int16>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Poco::UInt16>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Poco::UInt16>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Poco::UInt16>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Poco::Int32>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Poco::Int32>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Poco::Int32>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Poco::UInt32>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Poco::UInt32>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Poco::UInt32>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Poco::Int64>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Poco::Int64>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Poco::Int64>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Poco::UInt64>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Poco::UInt64>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Poco::UInt64>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
#ifndef POCO_LONG_IS_64_BIT
|
||||
bool Extractor::extract(std::size_t , std::vector<long>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<long>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<long>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<bool>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<bool>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<bool>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<float>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<float>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<float>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<double>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<double>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<double>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<char>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<char>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<char>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<std::string>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<std::string>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<std::string>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<BLOB>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<BLOB>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<BLOB>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<CLOB>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<CLOB>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<CLOB>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<DateTime>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<DateTime>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<DateTime>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Date>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Date>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Date>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Time>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Time>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Time>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Any>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Any>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Any>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::vector<Dynamic::Var>&)
|
||||
{
|
||||
throw NotImplementedException("std::vector extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::deque<Dynamic::Var>&)
|
||||
{
|
||||
throw NotImplementedException("std::deque extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t , std::list<Dynamic::Var>&)
|
||||
{
|
||||
throw NotImplementedException("std::list extractor must be implemented.");
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::SQL::PostgreSQL
|
||||
71
SQL/PostgreSQL/src/PostgreSQLException.cpp
Normal file
71
SQL/PostgreSQL/src/PostgreSQLException.cpp
Normal file
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// PostgreSQLException.cpp
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: PostgreSQLException
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLException.h"
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
PostgreSQLException::PostgreSQLException(const std::string& aMessage)
|
||||
: Poco::SQL::SQLException(std::string("[PostgreSQL]: ") + aMessage)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
PostgreSQLException::PostgreSQLException(const PostgreSQLException& anException)
|
||||
: Poco::SQL::SQLException(anException)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
PostgreSQLException::~PostgreSQLException() throw()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ConnectionException
|
||||
//
|
||||
|
||||
|
||||
ConnectionException::ConnectionException(const std::string& aMessage)
|
||||
: PostgreSQLException(aMessage)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// TransactionException
|
||||
//
|
||||
|
||||
TransactionException::TransactionException(const std::string& aMessage)
|
||||
: ConnectionException(aMessage)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// StatementException
|
||||
//
|
||||
|
||||
|
||||
StatementException::StatementException(const std::string& aMessage)
|
||||
: PostgreSQLException(aMessage)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::SQL::PostgreSQL
|
||||
171
SQL/PostgreSQL/src/PostgreSQLStatementImpl.cpp
Normal file
171
SQL/PostgreSQL/src/PostgreSQLStatementImpl.cpp
Normal file
@@ -0,0 +1,171 @@
|
||||
//
|
||||
// PostgreSQLStatementImpl.cpp
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: PostgreSQLStatementImpl
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLStatementImpl.h"
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
PostgreSQLStatementImpl::PostgreSQLStatementImpl(SessionImpl& aSessionImpl): Poco::SQL::StatementImpl(aSessionImpl),
|
||||
_statementExecutor(aSessionImpl.handle()),
|
||||
_pBinder(new Binder),
|
||||
_pExtractor(new Extractor (_statementExecutor)),
|
||||
_hasNext(NEXT_DONTKNOW)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
PostgreSQLStatementImpl::~PostgreSQLStatementImpl()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
std::size_t PostgreSQLStatementImpl::columnsReturned() const
|
||||
{
|
||||
return _statementExecutor.columnsReturned();
|
||||
}
|
||||
|
||||
|
||||
int PostgreSQLStatementImpl::affectedRowCount() const
|
||||
{
|
||||
return _statementExecutor.getAffectedRowCount();
|
||||
}
|
||||
|
||||
|
||||
const MetaColumn& PostgreSQLStatementImpl::metaColumn(std::size_t aPosition, std::size_t aDataset) const
|
||||
{
|
||||
// PostgreSql doesn't support multiple result sets
|
||||
poco_assert_dbg(aDataset == 0);
|
||||
|
||||
return _statementExecutor.metaColumn(aPosition);
|
||||
}
|
||||
|
||||
|
||||
bool PostgreSQLStatementImpl::hasNext()
|
||||
{
|
||||
if (NEXT_DONTKNOW == _hasNext)
|
||||
{
|
||||
if (columnsReturned() == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_statementExecutor.fetch())
|
||||
{
|
||||
_hasNext = NEXT_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
_hasNext = NEXT_FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
if (NEXT_TRUE == _hasNext)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
std::size_t PostgreSQLStatementImpl::next()
|
||||
{
|
||||
if (! hasNext())
|
||||
{
|
||||
throw StatementException("No data received");
|
||||
}
|
||||
|
||||
Poco::SQL::AbstractExtractionVec::iterator it= extractions().begin();
|
||||
Poco::SQL::AbstractExtractionVec::iterator itEnd = extractions().end();
|
||||
|
||||
std::size_t position = 0;
|
||||
|
||||
for (; it != itEnd; ++it)
|
||||
{
|
||||
(*it)->extract(position);
|
||||
position += (*it)->numOfColumnsHandled();
|
||||
}
|
||||
|
||||
_hasNext = NEXT_DONTKNOW;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
bool PostgreSQLStatementImpl::canBind() const
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if ((_statementExecutor.state() >= StatementExecutor::STMT_COMPILED)
|
||||
&& ! bindings().empty())
|
||||
{
|
||||
ret = (*bindings().begin())->canBind();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
bool PostgreSQLStatementImpl::canCompile() const
|
||||
{
|
||||
return (_statementExecutor.state() < StatementExecutor::STMT_COMPILED);
|
||||
}
|
||||
|
||||
|
||||
void PostgreSQLStatementImpl::compileImpl()
|
||||
{
|
||||
_statementExecutor.prepare(toString());
|
||||
}
|
||||
|
||||
|
||||
void PostgreSQLStatementImpl::bindImpl()
|
||||
{
|
||||
Poco::SQL::AbstractBindingVec& binds = bindings();
|
||||
|
||||
std::size_t position = 0;
|
||||
Poco::SQL::AbstractBindingVec::iterator it= binds.begin();
|
||||
Poco::SQL::AbstractBindingVec::iterator itEnd = binds.end();
|
||||
|
||||
for (; it != itEnd && (*it)->canBind(); ++it)
|
||||
{
|
||||
(*it)->bind(position);
|
||||
position += (*it)->numOfColumnsHandled();
|
||||
}
|
||||
|
||||
_pBinder->updateBindVectorToCurrentValues();
|
||||
|
||||
_statementExecutor.bindParams(_pBinder->bindVector());
|
||||
|
||||
_statementExecutor.execute();
|
||||
|
||||
_hasNext = NEXT_DONTKNOW;
|
||||
}
|
||||
|
||||
|
||||
Poco::SQL::AbstractExtractor::Ptr PostgreSQLStatementImpl::extractor()
|
||||
{
|
||||
return _pExtractor;
|
||||
}
|
||||
|
||||
|
||||
Poco::SQL::AbstractBinder::Ptr PostgreSQLStatementImpl::binder()
|
||||
{
|
||||
return _pBinder;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::SQL::PostgreSQL
|
||||
105
SQL/PostgreSQL/src/PostgreSQLTypes.cpp
Normal file
105
SQL/PostgreSQL/src/PostgreSQLTypes.cpp
Normal file
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// PostgreSQLTypes.cpp
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: PostgreSQLTypes
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLTypes.h"
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
Poco::SQL::MetaColumn::ColumnDataType oidToColumnDataType(const Oid anOID)
|
||||
{
|
||||
Poco::SQL::MetaColumn::ColumnDataType cdt = Poco::SQL::MetaColumn::FDT_UNKNOWN;
|
||||
|
||||
switch (anOID)
|
||||
{
|
||||
// bool
|
||||
case BOOLOID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_BOOL;
|
||||
break;
|
||||
|
||||
// integers
|
||||
case INT2OID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_INT16;
|
||||
break;
|
||||
case INT4OID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_INT32;
|
||||
break;
|
||||
case INT8OID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_INT64;
|
||||
break;
|
||||
|
||||
// floating point
|
||||
case FLOAT8OID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_DOUBLE;
|
||||
break;
|
||||
case FLOAT4OID:
|
||||
// cdt = Poco::SQL::MetaColumn::FDT_FLOAT; This a bug in Poco::SQL as a 4 byte "float" can't be cast/ugraded to an 8 byte "double"
|
||||
cdt = Poco::SQL::MetaColumn::FDT_DOUBLE;
|
||||
break;
|
||||
case NUMERICOID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_DOUBLE;
|
||||
break;
|
||||
|
||||
// character strings
|
||||
case CHAROID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_STRING;
|
||||
break;
|
||||
case BPCHAROID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_STRING;
|
||||
break;
|
||||
case VARCHAROID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_STRING;
|
||||
break;
|
||||
|
||||
// BLOB, CLOB
|
||||
case BYTEAOID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_BLOB;
|
||||
break;
|
||||
case TEXTOID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_CLOB;
|
||||
break;
|
||||
|
||||
// date
|
||||
case DATEOID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_DATE;
|
||||
break;
|
||||
|
||||
// time
|
||||
case TIMEOID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_TIME;
|
||||
break;
|
||||
case TIMETZOID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_TIME;
|
||||
break;
|
||||
|
||||
//timestamp
|
||||
case TIMESTAMPOID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_TIMESTAMP;
|
||||
break;
|
||||
case TIMESTAMPZOID:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_TIMESTAMP;
|
||||
break;
|
||||
|
||||
// everything else is a string
|
||||
default:
|
||||
cdt = Poco::SQL::MetaColumn::FDT_STRING;
|
||||
break;
|
||||
}
|
||||
|
||||
return cdt;
|
||||
}
|
||||
|
||||
} } } // namespace Poco::SQL::PostgreSQL
|
||||
|
||||
565
SQL/PostgreSQL/src/SessionHandle.cpp
Normal file
565
SQL/PostgreSQL/src/SessionHandle.cpp
Normal file
@@ -0,0 +1,565 @@
|
||||
//
|
||||
// SessionHandle.cpp
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: SessionHandle
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/SessionHandle.h"
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLException.h"
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLTypes.h"
|
||||
#include "Poco/SQL/Session.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
|
||||
|
||||
#define POCO_POSTGRESQL_VERSION_NUMBER ((NDB_VERSION_MAJOR<<16) | (NDB_VERSION_MINOR<<8) | (NDB_VERSION_BUILD&0xFF))
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
//const std::string SessionHandle::POSTGRESQL_READ_UNCOMMITTED = "READ UNCOMMITTED";
|
||||
const std::string SessionHandle::POSTGRESQL_READ_COMMITTED = "READ COMMITTED";
|
||||
const std::string SessionHandle::POSTGRESQL_REPEATABLE_READ = "REPEATABLE READ";
|
||||
const std::string SessionHandle::POSTGRESQL_SERIALIZABLE = "SERIALIZABLE";
|
||||
|
||||
|
||||
SessionHandle::SessionHandle(): _pConnection(0),
|
||||
_inTransaction(false),
|
||||
_isAutoCommit(true),
|
||||
_isAsynchronousCommit(false),
|
||||
_tranactionIsolationLevel(Session::TRANSACTION_READ_COMMITTED)
|
||||
{
|
||||
}
|
||||
|
||||
SessionHandle::~SessionHandle()
|
||||
{
|
||||
try
|
||||
{
|
||||
disconnect();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool SessionHandle::isConnected() const
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
return isConnectedNoLock();
|
||||
}
|
||||
|
||||
|
||||
bool SessionHandle::isConnectedNoLock() const
|
||||
{
|
||||
// DO NOT ACQUIRE THE MUTEX IN PRIVATE METHODS
|
||||
|
||||
if (_pConnection
|
||||
&& PQstatus(_pConnection) == CONNECTION_OK)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::connect(const std::string& aConnectionString)
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (isConnectedNoLock())
|
||||
{
|
||||
throw ConnectionFailedException("Already Connected");
|
||||
}
|
||||
|
||||
_pConnection = PQconnectdb(aConnectionString.c_str());
|
||||
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw ConnectionFailedException(std::string("Connection Error: ") + lastErrorNoLock());
|
||||
}
|
||||
|
||||
_connectionString = aConnectionString;
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::connect(const char* aConnectionString)
|
||||
{
|
||||
connect(std::string(aConnectionString));
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::connect(const char* aHost, const char* aUser, const char* aPassword,
|
||||
const char* aDatabase, unsigned short aPort, unsigned int aConnectionTimeout)
|
||||
{
|
||||
std::string connectionString;
|
||||
|
||||
connectionString.append("host=");
|
||||
connectionString.append(aHost);
|
||||
connectionString.append(" ");
|
||||
|
||||
connectionString.append("user=");
|
||||
connectionString.append(aUser);
|
||||
connectionString.append(" ");
|
||||
|
||||
connectionString.append("password=");
|
||||
connectionString.append(aPassword);
|
||||
connectionString.append(" ");
|
||||
|
||||
connectionString.append("dbname=");
|
||||
connectionString.append(aDatabase);
|
||||
connectionString.append(" ");
|
||||
|
||||
connectionString.append("port=");
|
||||
Poco::NumberFormatter::append(connectionString, aPort);
|
||||
connectionString.append(" ");
|
||||
|
||||
connectionString.append("connect_timeout=");
|
||||
Poco::NumberFormatter::append(connectionString, aConnectionTimeout);
|
||||
|
||||
connect(connectionString);
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::disconnect()
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (isConnectedNoLock())
|
||||
{
|
||||
PQfinish(_pConnection);
|
||||
|
||||
_pConnection = 0;
|
||||
|
||||
_connectionString = std::string();
|
||||
_inTransaction= false;
|
||||
_isAutoCommit = true;
|
||||
_isAsynchronousCommit = false;
|
||||
_tranactionIsolationLevel = Session::TRANSACTION_READ_COMMITTED;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Figure out what happens if a connection is reset with a pending transaction
|
||||
bool SessionHandle::reset()
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (_pConnection)
|
||||
{
|
||||
PQreset(_pConnection);
|
||||
}
|
||||
|
||||
if (isConnectedNoLock())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
std::string SessionHandle::lastError() const
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
return std::string();
|
||||
}
|
||||
|
||||
return lastErrorNoLock();
|
||||
}
|
||||
|
||||
|
||||
std::string SessionHandle::lastErrorNoLock() const
|
||||
{
|
||||
// DO NOT ACQUIRE THE MUTEX IN PRIVATE METHODS
|
||||
std::string lastErrorString (0 != _pConnection ? PQerrorMessage(_pConnection) : "not connected");
|
||||
|
||||
return lastErrorString;
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::startTransaction()
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
if (_inTransaction)
|
||||
{
|
||||
return; // NO-OP
|
||||
}
|
||||
|
||||
PGresult* pPQResult = PQexec(_pConnection, "BEGIN");
|
||||
|
||||
PQResultClear resultClearer(pPQResult);
|
||||
|
||||
if (PQresultStatus(pPQResult) != PGRES_COMMAND_OK)
|
||||
{
|
||||
throw StatementException(std::string("BEGIN statement failed:: ") + lastErrorNoLock());
|
||||
}
|
||||
|
||||
_inTransaction = true;
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::commit()
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
PGresult* pPQResult = PQexec(_pConnection, "COMMIT");
|
||||
|
||||
PQResultClear resultClearer(pPQResult);
|
||||
|
||||
if (PQresultStatus(pPQResult) != PGRES_COMMAND_OK)
|
||||
{
|
||||
throw StatementException(std::string("COMMIT statement failed:: ") + lastErrorNoLock());
|
||||
}
|
||||
|
||||
_inTransaction = false;
|
||||
|
||||
deallocateStoredPreparedStatements();
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::rollback()
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
PGresult* pPQResult = PQexec(_pConnection, "ROLLBACK");
|
||||
|
||||
PQResultClear resultClearer(pPQResult);
|
||||
|
||||
if (PQresultStatus(pPQResult) != PGRES_COMMAND_OK)
|
||||
{
|
||||
throw StatementException(std::string("ROLLBACK statement failed:: ") + lastErrorNoLock());
|
||||
}
|
||||
|
||||
_inTransaction = false;
|
||||
|
||||
deallocateStoredPreparedStatements();
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::setAutoCommit(bool aShouldAutoCommit)
|
||||
{
|
||||
if (aShouldAutoCommit == _isAutoCommit)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (aShouldAutoCommit)
|
||||
{
|
||||
commit(); // end any in process transaction
|
||||
}
|
||||
else
|
||||
{
|
||||
startTransaction(); // start a new transaction
|
||||
}
|
||||
|
||||
_isAutoCommit = aShouldAutoCommit;
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::setAsynchronousCommit(bool aShouldAsynchronousCommit)
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
if (aShouldAsynchronousCommit == _isAsynchronousCommit)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PGresult* pPQResult = PQexec(_pConnection, aShouldAsynchronousCommit ? "SET SYNCHRONOUS COMMIT TO OFF" : "SET SYNCHRONOUS COMMIT TO ON");
|
||||
|
||||
PQResultClear resultClearer(pPQResult);
|
||||
|
||||
if (PQresultStatus(pPQResult) != PGRES_COMMAND_OK)
|
||||
{
|
||||
throw StatementException(std::string("SET SYNCHRONUS COMMIT statement failed:: ") + lastErrorNoLock());
|
||||
}
|
||||
|
||||
_isAsynchronousCommit = aShouldAsynchronousCommit;
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::cancel()
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
PGcancel* ptrPGCancel = PQgetCancel(_pConnection);
|
||||
|
||||
PGCancelFree cancelFreer(ptrPGCancel);
|
||||
|
||||
PQcancel(ptrPGCancel, 0, 0); // no error buffer
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::setTransactionIsolation(Poco::UInt32 aTI)
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
if (aTI == _tranactionIsolationLevel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (! hasTransactionIsolation(aTI))
|
||||
{
|
||||
throw Poco::InvalidArgumentException("setTransactionIsolation()");
|
||||
}
|
||||
|
||||
std::string isolationLevel;
|
||||
|
||||
switch (aTI)
|
||||
{
|
||||
case Session::TRANSACTION_READ_COMMITTED:
|
||||
isolationLevel = POSTGRESQL_READ_COMMITTED; break;
|
||||
case Session::TRANSACTION_REPEATABLE_READ:
|
||||
isolationLevel = POSTGRESQL_REPEATABLE_READ; break;
|
||||
case Session::TRANSACTION_SERIALIZABLE:
|
||||
isolationLevel = POSTGRESQL_SERIALIZABLE; break;
|
||||
}
|
||||
|
||||
PGresult* pPQResult = PQexec(_pConnection, Poco::format("SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL %s", isolationLevel).c_str());
|
||||
|
||||
PQResultClear resultClearer(pPQResult);
|
||||
|
||||
if (PQresultStatus(pPQResult) != PGRES_COMMAND_OK)
|
||||
{
|
||||
throw StatementException(std::string("set transaction isolation statement failed: ") + lastErrorNoLock());
|
||||
}
|
||||
|
||||
_tranactionIsolationLevel = aTI;
|
||||
}
|
||||
|
||||
|
||||
Poco::UInt32
|
||||
SessionHandle::transactionIsolation()
|
||||
{
|
||||
return _tranactionIsolationLevel;
|
||||
}
|
||||
|
||||
|
||||
bool SessionHandle::hasTransactionIsolation(Poco::UInt32 aTI)
|
||||
{
|
||||
return Session::TRANSACTION_READ_COMMITTED == aTI
|
||||
|| Session::TRANSACTION_REPEATABLE_READ == aTI
|
||||
|| Session::TRANSACTION_SERIALIZABLE == aTI;
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::deallocatePreparedStatement(const std::string& aPreparedStatementToDeAllocate)
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
if (! _inTransaction)
|
||||
{
|
||||
deallocatePreparedStatementNoLock(aPreparedStatementToDeAllocate);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
_preparedStatementsToBeDeallocated.push_back(aPreparedStatementToDeAllocate);
|
||||
}
|
||||
catch (std::bad_alloc&)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::deallocatePreparedStatementNoLock(const std::string& aPreparedStatementToDeAllocate)
|
||||
{
|
||||
PGresult* pPQResult = PQexec(_pConnection, (std::string("DEALLOCATE ") + aPreparedStatementToDeAllocate).c_str());
|
||||
|
||||
PQResultClear resultClearer(pPQResult);
|
||||
|
||||
if (PQresultStatus(pPQResult) != PGRES_COMMAND_OK)
|
||||
{
|
||||
throw StatementException(std::string("DEALLOCATE statement failed: ") + lastErrorNoLock());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SessionHandle::deallocateStoredPreparedStatements()
|
||||
{
|
||||
// DO NOT ACQUIRE THE MUTEX IN PRIVATE METHODS
|
||||
while (! _preparedStatementsToBeDeallocated.empty())
|
||||
{
|
||||
deallocatePreparedStatementNoLock(_preparedStatementsToBeDeallocated.back());
|
||||
|
||||
_preparedStatementsToBeDeallocated.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int SessionHandle::serverVersion() const
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
return PQserverVersion(_pConnection);
|
||||
}
|
||||
|
||||
|
||||
int SessionHandle::serverProcessID() const
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
return PQbackendPID(_pConnection);
|
||||
}
|
||||
|
||||
|
||||
int SessionHandle::protocoVersion() const
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
return PQprotocolVersion(_pConnection);
|
||||
}
|
||||
|
||||
|
||||
std::string SessionHandle::clientEncoding() const
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
if (! isConnectedNoLock())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
return pg_encoding_to_char(PQclientEncoding(_pConnection));
|
||||
}
|
||||
|
||||
|
||||
int SessionHandle::libpqVersion() const
|
||||
{
|
||||
return PQlibVersion();
|
||||
}
|
||||
|
||||
|
||||
SessionParametersMap SessionHandle::setConnectionInfoParameters(PQconninfoOption* pConnInfOpt)
|
||||
{
|
||||
SessionParametersMap sessionParametersMap;
|
||||
|
||||
while (0 != pConnInfOpt->keyword)
|
||||
{
|
||||
try
|
||||
{
|
||||
std::string keyword = pConnInfOpt->keyword ? pConnInfOpt->keyword : std::string();
|
||||
std::string environmentVariableVersion = pConnInfOpt->envvar ? pConnInfOpt->envvar : std::string();
|
||||
std::string compiledVersion = pConnInfOpt->compiled ? pConnInfOpt->compiled : std::string();
|
||||
std::string currentValue = pConnInfOpt->val ? pConnInfOpt->val : std::string();
|
||||
std::string dialogLabel = pConnInfOpt->label? pConnInfOpt->label: std::string();
|
||||
std::string dialogDisplayCharacter = pConnInfOpt->dispchar ? pConnInfOpt->dispchar : std::string();
|
||||
int dialogDisplaysize = pConnInfOpt->dispsize;
|
||||
|
||||
SessionParameters connParams(keyword, environmentVariableVersion, compiledVersion,
|
||||
currentValue, dialogLabel, dialogDisplayCharacter, dialogDisplaysize);
|
||||
|
||||
sessionParametersMap.insert(SessionParametersMap::value_type(connParams.keyword(), connParams));
|
||||
}
|
||||
catch (std::bad_alloc&)
|
||||
{
|
||||
}
|
||||
|
||||
++pConnInfOpt;
|
||||
}
|
||||
|
||||
return sessionParametersMap;
|
||||
}
|
||||
|
||||
|
||||
SessionParametersMap SessionHandle::connectionDefaultParameters()
|
||||
{
|
||||
PQconninfoOption* ptrConnInfoOptions = PQconndefaults();
|
||||
|
||||
PQConnectionInfoOptionsFree connectionOptionsFreeer(ptrConnInfoOptions);
|
||||
|
||||
return setConnectionInfoParameters(ptrConnInfoOptions);
|
||||
}
|
||||
|
||||
|
||||
SessionParametersMap SessionHandle::connectionParameters() const
|
||||
{
|
||||
if (! isConnected())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
PQconninfoOption* ptrConnInfoOptions = 0;
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
|
||||
|
||||
ptrConnInfoOptions = PQconninfo(_pConnection);
|
||||
}
|
||||
|
||||
PQConnectionInfoOptionsFree connectionOptionsFreeer(ptrConnInfoOptions);
|
||||
|
||||
return setConnectionInfoParameters(ptrConnInfoOptions);
|
||||
}
|
||||
|
||||
|
||||
}}} // Poco::SQL::PostgreSQL
|
||||
240
SQL/PostgreSQL/src/SessionImpl.cpp
Normal file
240
SQL/PostgreSQL/src/SessionImpl.cpp
Normal file
@@ -0,0 +1,240 @@
|
||||
//
|
||||
// SessionImpl.cpp
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: SessionImpl
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/SessionImpl.h"
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLException.h"
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLStatementImpl.h"
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLTypes.h"
|
||||
#include "Poco/SQL/Session.h"
|
||||
#include "Poco/NumberParser.h"
|
||||
#include "Poco/String.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace
|
||||
{
|
||||
std::string copyStripped(std::string::const_iterator aFromStringCItr, std::string::const_iterator aToStringCItr)
|
||||
{
|
||||
// skip leading spaces
|
||||
while ((aFromStringCItr != aToStringCItr) && isspace(*aFromStringCItr)) aFromStringCItr++;
|
||||
// skip trailing spaces
|
||||
while ((aFromStringCItr != aToStringCItr) && isspace(*(aToStringCItr - 1))) aToStringCItr--;
|
||||
|
||||
return std::string(aFromStringCItr, aToStringCItr);
|
||||
}
|
||||
|
||||
std::string createConnectionStringFromOptionsMap(const std::map <std::string, std::string> anOptionsMap)
|
||||
{
|
||||
std::string connectionString;
|
||||
|
||||
for (std::map<std::string, std::string>::const_iterator citr = anOptionsMap.begin(); citr != anOptionsMap.end(); ++citr)
|
||||
{
|
||||
connectionString.append(citr->first);
|
||||
connectionString.append("=");
|
||||
connectionString.append(citr->second);
|
||||
connectionString.append(" ");
|
||||
}
|
||||
|
||||
return connectionString;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
SessionImpl::SessionImpl(const std::string& aConnectionString, std::size_t aLoginTimeout):
|
||||
Poco::SQL::AbstractSessionImpl<SessionImpl>(aConnectionString, aLoginTimeout)
|
||||
{
|
||||
setProperty("handle", static_cast<SessionHandle*>(&_sessionHandle));
|
||||
setConnectionTimeout(CONNECTION_TIMEOUT_DEFAULT);
|
||||
open();
|
||||
}
|
||||
|
||||
|
||||
SessionImpl::~SessionImpl()
|
||||
{
|
||||
try
|
||||
{
|
||||
close();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::setConnectionTimeout(std::size_t aTimeout)
|
||||
{
|
||||
_timeout = aTimeout;
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::open(const std::string& aConnectionString)
|
||||
{
|
||||
if (connectionString() != aConnectionString)
|
||||
{
|
||||
if (isConnected())
|
||||
{
|
||||
throw ConnectionException("Session already connected");
|
||||
}
|
||||
|
||||
if (! aConnectionString.empty())
|
||||
{
|
||||
setConnectionString(aConnectionString);
|
||||
}
|
||||
}
|
||||
|
||||
poco_assert_dbg (! connectionString().empty());
|
||||
|
||||
unsigned int timeout = static_cast<unsigned int>(getLoginTimeout());
|
||||
|
||||
// PostgreSQL connections can use environment variables for connection parameters.
|
||||
// As such it is not an error if they are not part of the connection string
|
||||
|
||||
std::map <std::string, std::string> optionsMap;
|
||||
|
||||
// Default values
|
||||
optionsMap["connect_timeout"] = Poco::NumberFormatter::format(timeout);
|
||||
|
||||
const std::string& connString = connectionString();
|
||||
|
||||
for (std::string::const_iterator start = connString.begin();;)
|
||||
{
|
||||
std::string::const_iterator finish = std::find(start, connString.end(), ' '); // space is the separator between keyword=value pairs
|
||||
std::string::const_iterator middle = std::find(start, finish, '=');
|
||||
|
||||
if (middle == finish)
|
||||
{
|
||||
throw PostgreSQLException("create session: bad connection string format, cannot find '='");
|
||||
}
|
||||
|
||||
optionsMap[ copyStripped(start, middle) ] = copyStripped(middle + 1, finish);
|
||||
|
||||
if ((finish == connString.end()) || (finish + 1 == connString.end())) break;
|
||||
|
||||
start = finish + 1;
|
||||
}
|
||||
|
||||
// Real connect
|
||||
_sessionHandle.connect(createConnectionStringFromOptionsMap(optionsMap));
|
||||
|
||||
addFeature("autoCommit",
|
||||
&SessionImpl::setAutoCommit,
|
||||
&SessionImpl::isAutoCommit);
|
||||
|
||||
addFeature("asynchronousCommit",
|
||||
&SessionImpl::setAutoCommit,
|
||||
&SessionImpl::isAutoCommit);
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::close()
|
||||
{
|
||||
if (isConnected())
|
||||
{
|
||||
_sessionHandle.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool SessionImpl::isConnected() const
|
||||
{
|
||||
return _sessionHandle.isConnected();
|
||||
}
|
||||
|
||||
|
||||
StatementImpl::Ptr SessionImpl::createStatementImpl()
|
||||
{
|
||||
return new PostgreSQLStatementImpl (*this);
|
||||
}
|
||||
|
||||
|
||||
bool SessionImpl::isTransaction() const
|
||||
{
|
||||
return _sessionHandle.isTransaction();
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::begin()
|
||||
{
|
||||
if (isTransaction())
|
||||
{
|
||||
throw Poco::InvalidAccessException("Already in transaction.");
|
||||
}
|
||||
|
||||
_sessionHandle.startTransaction();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::commit()
|
||||
{
|
||||
// Not an error to issue a COMMIT without a preceding BEGIN
|
||||
_sessionHandle.commit();
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::rollback()
|
||||
{
|
||||
// Not an error to issue a ROLLBACK without a preceding BEGIN
|
||||
_sessionHandle.rollback();
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::setAutoCommit(const std::string&, bool aValue)
|
||||
{
|
||||
_sessionHandle.setAutoCommit(aValue);
|
||||
}
|
||||
|
||||
|
||||
bool SessionImpl::isAutoCommit(const std::string&) const
|
||||
{
|
||||
return _sessionHandle.isAutoCommit();
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::setAsynchronousCommit(const std::string&, bool aValue)
|
||||
{
|
||||
_sessionHandle.setAsynchronousCommit(aValue);
|
||||
}
|
||||
|
||||
|
||||
bool SessionImpl::isAsynchronousCommit(const std::string&) const
|
||||
{
|
||||
return _sessionHandle.isAsynchronousCommit();
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::setTransactionIsolation(Poco::UInt32 aTI)
|
||||
{
|
||||
return _sessionHandle.setTransactionIsolation(aTI);
|
||||
}
|
||||
|
||||
|
||||
Poco::UInt32 SessionImpl::getTransactionIsolation() const
|
||||
{
|
||||
return _sessionHandle.transactionIsolation();
|
||||
}
|
||||
|
||||
|
||||
bool SessionImpl::hasTransactionIsolation(Poco::UInt32 aTI) const
|
||||
{
|
||||
return _sessionHandle.hasTransactionIsolation(aTI);
|
||||
}
|
||||
|
||||
|
||||
}}} // namespace Poco::SQL::PostgreSQL
|
||||
487
SQL/PostgreSQL/src/StatementExecutor.cpp
Normal file
487
SQL/PostgreSQL/src/StatementExecutor.cpp
Normal file
@@ -0,0 +1,487 @@
|
||||
//
|
||||
// StatementExecutor.cpp
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: StatementExecutor
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/StatementExecutor.h"
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQLTypes.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/UUID.h"
|
||||
#include "Poco/UUIDGenerator.h"
|
||||
#include "Poco/NumberParser.h"
|
||||
#include "Poco/NumberParser.h"
|
||||
#include "Poco/RegularExpression.h" // TODO: remove after C++ 11 implementation
|
||||
//#include <regex> // saved for C++ 11 implementation
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
std::size_t countOfPlaceHoldersInSQLStatement(const std::string& aSQLStatement)
|
||||
{
|
||||
|
||||
// Find unique placeholders.
|
||||
// Unique placeholders allow the same placeholder to be used multiple times in the same statement.
|
||||
|
||||
// NON C++11 implementation
|
||||
|
||||
//if (aSQLStatement.empty())
|
||||
//{
|
||||
//return 0;
|
||||
//}
|
||||
|
||||
// set to hold the unique placeholders ($1, $2, $3, etc.).
|
||||
// A set is used because the same placeholder can be used muliple times
|
||||
std::set<std::string> placeholderSet;
|
||||
|
||||
Poco::RegularExpression placeholderRE("[$][0-9]+");
|
||||
Poco::RegularExpression::Match match = { 0 , 0 }; // Match is a struct, not a class :-(
|
||||
|
||||
std::size_t startingPosition = 0;
|
||||
|
||||
while (match.offset != std::string::npos)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (placeholderRE.match(aSQLStatement, startingPosition, match))
|
||||
{
|
||||
placeholderSet.insert(aSQLStatement.substr(match.offset, match.length));
|
||||
startingPosition = match.offset + match.length;
|
||||
}
|
||||
}
|
||||
catch (Poco::RegularExpressionException &)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* C++ 11 implementation
|
||||
|
||||
std::regex const expression("[$][0-9]+"); // match literal dollar signs followed directly by one or more digits
|
||||
|
||||
std::sregex_iterator itr(aSQLStatement.begin(), aSQLStatement.end(), expression);
|
||||
std::sregex_iterator eItr;
|
||||
|
||||
// set to hold the unique placeholders ($1, $2, $3, etc.).
|
||||
// A set is used because the same placeholder can be used muliple times
|
||||
std::set<std::string> placeholderSet;
|
||||
|
||||
while (itr != eItr)
|
||||
{
|
||||
placeholderSet.insert(itr->str());
|
||||
++itr;
|
||||
}
|
||||
*/
|
||||
return placeholderSet.size();
|
||||
}
|
||||
} // namespace
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
StatementExecutor::StatementExecutor(SessionHandle& sessionHandle):_sessionHandle(sessionHandle),
|
||||
_state(STMT_INITED),
|
||||
_pResultHandle(0),
|
||||
_countPlaceholdersInSQLStatement(0),
|
||||
_currentRow(0),
|
||||
_affectedRowCount(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
StatementExecutor::~StatementExecutor()
|
||||
{
|
||||
try
|
||||
{
|
||||
// remove the prepared statement from the session
|
||||
if ( _sessionHandle.isConnected()
|
||||
&& _state >= STMT_COMPILED
|
||||
)
|
||||
{
|
||||
_sessionHandle.deallocatePreparedStatement(_preparedStatementName);
|
||||
}
|
||||
|
||||
PQResultClear resultClearer(_pResultHandle);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
StatementExecutor::State StatementExecutor::state() const
|
||||
{
|
||||
return _state;
|
||||
}
|
||||
|
||||
|
||||
void StatementExecutor::prepare(const std::string& aSQLStatement)
|
||||
{
|
||||
if (! _sessionHandle.isConnected())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
if (_state >= STMT_COMPILED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// clear out the metadata. One way or another it is now obsolete.
|
||||
_countPlaceholdersInSQLStatement = 0;
|
||||
_SQLStatement= std::string();
|
||||
_preparedStatementName = std::string();
|
||||
_resultColumns.clear();
|
||||
|
||||
// clear out any result data. One way or another it is now obsolete.
|
||||
clearResults();
|
||||
|
||||
// prepare parameters for the call to PQprepare
|
||||
const char* ptrCSQLStatement = aSQLStatement.c_str();
|
||||
std::size_t countPlaceholdersInSQLStatement = countOfPlaceHoldersInSQLStatement(aSQLStatement);
|
||||
|
||||
Poco::UUIDGenerator& generator = Poco::UUIDGenerator::defaultGenerator();
|
||||
Poco::UUID uuid(generator.create()); // time based
|
||||
std::string statementName = uuid.toString();
|
||||
statementName.insert(0, 1, 'p'); // prepared statement names can't start with a number
|
||||
std::replace(statementName.begin(), statementName.end(), '-', 'p'); // PostgreSQL doesn't like dashes in prepared statement names
|
||||
const char* pStatementName = statementName.c_str();
|
||||
|
||||
PGresult* ptrPGResult = 0;
|
||||
|
||||
{
|
||||
// lock the session
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionHandle.mutex());
|
||||
|
||||
// prepare the statement - temporary PGresult returned
|
||||
ptrPGResult = PQprepare(_sessionHandle, pStatementName, ptrCSQLStatement, countPlaceholdersInSQLStatement, 0);
|
||||
}
|
||||
|
||||
{
|
||||
// setup to clear the result from PQprepare
|
||||
PQResultClear resultClearer(ptrPGResult);
|
||||
|
||||
if ( ! ptrPGResult
|
||||
|| PQresultStatus(ptrPGResult) != PGRES_COMMAND_OK
|
||||
)
|
||||
{
|
||||
throw StatementException(std::string("postgresql_stmt_prepare error: ") + PQresultErrorMessage (ptrPGResult) + " " + aSQLStatement);
|
||||
}
|
||||
}
|
||||
|
||||
// Determine what the structure of a statement result will look like
|
||||
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionHandle.mutex());
|
||||
|
||||
ptrPGResult = PQdescribePrepared(_sessionHandle, pStatementName);
|
||||
}
|
||||
|
||||
{
|
||||
PQResultClear resultClearer(ptrPGResult);
|
||||
|
||||
if (! ptrPGResult
|
||||
|| PQresultStatus(ptrPGResult) != PGRES_COMMAND_OK
|
||||
)
|
||||
{
|
||||
throw StatementException(std::string("postgresql_stmt_describe error: ") +
|
||||
PQresultErrorMessage (ptrPGResult) + " " + aSQLStatement);
|
||||
}
|
||||
|
||||
// remember the structure of the statement result
|
||||
|
||||
int fieldCount = PQnfields(ptrPGResult);
|
||||
if (fieldCount < 0) fieldCount = 0;
|
||||
|
||||
for (int i = 0; i < fieldCount; ++i)
|
||||
{
|
||||
_resultColumns.push_back(
|
||||
MetaColumn(i, // position
|
||||
PQfname(ptrPGResult, i), // name
|
||||
oidToColumnDataType(PQftype(ptrPGResult, i)), // Poco::SQL::MetaColumn type
|
||||
0, // column data lengths are not correct as returned by PQfsize() for the various column types
|
||||
0, // column precisions are not correct as returned by PQfmod() for the various column types
|
||||
true // nullable? - no efficient way to tell at this point, so assume yes
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
_SQLStatement = aSQLStatement;
|
||||
_preparedStatementName = statementName;
|
||||
_countPlaceholdersInSQLStatement = countPlaceholdersInSQLStatement;
|
||||
_state = STMT_COMPILED; // must be last
|
||||
}
|
||||
|
||||
|
||||
void StatementExecutor::bindParams(const InputParameterVector& anInputParameterVector)
|
||||
{
|
||||
if (! _sessionHandle.isConnected())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
if (_state < STMT_COMPILED)
|
||||
{
|
||||
throw StatementException("Statement is not compiled yet");
|
||||
}
|
||||
|
||||
if (anInputParameterVector.size() != _countPlaceholdersInSQLStatement)
|
||||
{
|
||||
throw StatementException(std::string("incorrect bind parameters count for SQL Statement: ") + _SQLStatement);
|
||||
}
|
||||
|
||||
// Just record the input vector for later execution
|
||||
_inputParameterVector = anInputParameterVector;
|
||||
}
|
||||
|
||||
|
||||
void StatementExecutor::execute()
|
||||
{
|
||||
if (! _sessionHandle.isConnected())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
if (_state < STMT_COMPILED)
|
||||
{
|
||||
throw StatementException("Statement is not compiled yet");
|
||||
}
|
||||
|
||||
if ( _countPlaceholdersInSQLStatement != 0
|
||||
&& _inputParameterVector.size() != _countPlaceholdersInSQLStatement
|
||||
)
|
||||
{
|
||||
throw StatementException("Count of Parameters in Statement different than supplied parameters");
|
||||
}
|
||||
|
||||
// "transmogrify" the _inputParameterVector to the C format required by PQexecPrepared
|
||||
|
||||
/* - from example
|
||||
const char *paramValues[1];
|
||||
int paramLengths[1];
|
||||
int paramFormats[1];
|
||||
*/
|
||||
|
||||
std::vector<const char *> pParameterVector;
|
||||
std::vector<int> parameterLengthVector;
|
||||
std::vector<int> parameterFormatVector;
|
||||
|
||||
InputParameterVector::const_iterator cItr = _inputParameterVector.begin();
|
||||
InputParameterVector::const_iterator cItrEnd = _inputParameterVector.end();
|
||||
|
||||
for (; cItr != cItrEnd; ++cItr)
|
||||
{
|
||||
try
|
||||
{
|
||||
pParameterVector.push_back (static_cast<const char*>(cItr->pInternalRepresentation()));
|
||||
parameterLengthVector.push_back(cItr->size());
|
||||
parameterFormatVector.push_back(cItr->isBinary() ? 1 : 0);
|
||||
}
|
||||
catch (std::bad_alloc&)
|
||||
{
|
||||
throw StatementException("Memory Allocation Error");
|
||||
}
|
||||
}
|
||||
|
||||
// clear out any result data. One way or another it is now obsolete.
|
||||
clearResults();
|
||||
|
||||
PGresult* ptrPGResult = 0;
|
||||
|
||||
{
|
||||
Poco::FastMutex::ScopedLock mutexLocker(_sessionHandle.mutex());
|
||||
|
||||
/* - from api doc
|
||||
PGresult *PQexecPrepared(PGconn *conn,
|
||||
const char *stmtName,
|
||||
int nParams,
|
||||
const char * const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
*/
|
||||
ptrPGResult = PQexecPrepared (_sessionHandle,
|
||||
_preparedStatementName.c_str(),
|
||||
_countPlaceholdersInSQLStatement,
|
||||
_inputParameterVector.size() != 0 ? &pParameterVector[ 0 ] : 0,
|
||||
_inputParameterVector.size() != 0 ? ¶meterLengthVector[ 0 ] : 0,
|
||||
_inputParameterVector.size() != 0 ? ¶meterFormatVector[ 0 ] : 0,
|
||||
0 // text based result please!
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
// Don't setup to auto clear the result (ptrPGResult). It is required to retrieve the results later.
|
||||
|
||||
if (!ptrPGResult || (PQresultStatus(ptrPGResult) != PGRES_COMMAND_OK &&
|
||||
PQresultStatus(ptrPGResult) != PGRES_TUPLES_OK))
|
||||
{
|
||||
PQResultClear resultClearer(ptrPGResult);
|
||||
|
||||
const char* pSeverity = PQresultErrorField(ptrPGResult, PG_DIAG_SEVERITY);
|
||||
const char* pSQLState = PQresultErrorField(ptrPGResult, PG_DIAG_SQLSTATE);
|
||||
const char* pDetail = PQresultErrorField(ptrPGResult, PG_DIAG_MESSAGE_DETAIL);
|
||||
const char* pHint = PQresultErrorField(ptrPGResult, PG_DIAG_MESSAGE_HINT);
|
||||
const char* pConstraint = PQresultErrorField(ptrPGResult, PG_DIAG_CONSTRAINT_NAME);
|
||||
|
||||
throw StatementException(std::string("postgresql_stmt_execute error: ")
|
||||
+ PQresultErrorMessage (ptrPGResult)
|
||||
+ " Severity: " + (pSeverity ? pSeverity : "N/A")
|
||||
+ " State: " + (pSQLState ? pSQLState : "N/A")
|
||||
+ " Detail: " + (pDetail ? pDetail : "N/A")
|
||||
+ " Hint: " + (pHint ? pHint : "N/A")
|
||||
+ " Constraint: " + (pConstraint ? pConstraint : "N/A"));
|
||||
}
|
||||
|
||||
_pResultHandle = ptrPGResult;
|
||||
|
||||
// are there any results?
|
||||
|
||||
int affectedRowCount = 0;
|
||||
|
||||
if (PGRES_TUPLES_OK == PQresultStatus(_pResultHandle))
|
||||
{
|
||||
affectedRowCount = PQntuples(_pResultHandle);
|
||||
|
||||
if (affectedRowCount >= 0)
|
||||
{
|
||||
_affectedRowCount = static_cast<std::size_t>(affectedRowCount);
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // non Select DML statments also have an affected row count.
|
||||
// unfortunately PostgreSQL offers up this count as a char * - go figure!
|
||||
const char * pNonSelectAffectedRowCountString = PQcmdTuples(_pResultHandle);
|
||||
if (0 != pNonSelectAffectedRowCountString)
|
||||
{
|
||||
if ( Poco::NumberParser::tryParse(pNonSelectAffectedRowCountString, affectedRowCount)
|
||||
&& affectedRowCount >= 0
|
||||
)
|
||||
{
|
||||
_affectedRowCount = static_cast<std::size_t>(affectedRowCount);
|
||||
_currentRow = _affectedRowCount; // no fetching on these statements!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_state = STMT_EXECUTED;
|
||||
}
|
||||
|
||||
|
||||
bool StatementExecutor::fetch()
|
||||
{
|
||||
if (! _sessionHandle.isConnected())
|
||||
{
|
||||
throw NotConnectedException();
|
||||
}
|
||||
|
||||
if (_state < STMT_EXECUTED)
|
||||
{
|
||||
throw StatementException("Statement is not yet executed");
|
||||
}
|
||||
|
||||
std::size_t countColumns = columnsReturned();
|
||||
|
||||
// first time to fetch?
|
||||
if (0 == _outputParameterVector.size())
|
||||
{
|
||||
// setup a output vector for the results
|
||||
_outputParameterVector.resize(countColumns);
|
||||
}
|
||||
|
||||
// already retrieved last row?
|
||||
if (_currentRow == getAffectedRowCount())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (0 == countColumns
|
||||
|| PGRES_TUPLES_OK != PQresultStatus(_pResultHandle)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < countColumns; ++i)
|
||||
{
|
||||
int fieldLength = PQgetlength(_pResultHandle, static_cast<int> (_currentRow), static_cast<int> (i));
|
||||
|
||||
Oid columnInternalDataType = PQftype(_pResultHandle, i); // Oid of column
|
||||
|
||||
_outputParameterVector.at(i).setValues(oidToColumnDataType(columnInternalDataType), // Poco::SQL::MetaData version of the Column Data Type
|
||||
columnInternalDataType, // Postgres Version
|
||||
_currentRow, // the row number of the result
|
||||
PQgetvalue(_pResultHandle, _currentRow, i), // a pointer to the data
|
||||
(-1 == fieldLength ? 0 : fieldLength), // the length of the data returned
|
||||
PQgetisnull(_pResultHandle, _currentRow, i) == 1 ? true : false); // is the column value null?
|
||||
}
|
||||
|
||||
++_currentRow;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
std::size_t StatementExecutor::getAffectedRowCount() const
|
||||
{
|
||||
return _affectedRowCount;
|
||||
}
|
||||
|
||||
|
||||
std::size_t StatementExecutor::columnsReturned() const
|
||||
{
|
||||
return static_cast<std::size_t> (_resultColumns.size());
|
||||
}
|
||||
|
||||
|
||||
const MetaColumn& StatementExecutor::metaColumn(std::size_t aPosition) const
|
||||
{
|
||||
if (aPosition >= columnsReturned())
|
||||
{
|
||||
throw StatementException("Invalid column number for metaColumn");
|
||||
}
|
||||
|
||||
return _resultColumns.at(aPosition);
|
||||
}
|
||||
|
||||
|
||||
const OutputParameter& StatementExecutor::resultColumn(std::size_t aPosition) const
|
||||
{
|
||||
if (aPosition >= columnsReturned())
|
||||
{
|
||||
throw StatementException("Invalid column number for resultColumn");
|
||||
}
|
||||
|
||||
return _outputParameterVector.at(aPosition);
|
||||
}
|
||||
|
||||
|
||||
void StatementExecutor::clearResults()
|
||||
{
|
||||
// clear out any old result first
|
||||
{
|
||||
PQResultClear resultClearer(_pResultHandle);
|
||||
}
|
||||
|
||||
_outputParameterVector.clear();
|
||||
_affectedRowCount = 0;
|
||||
_currentRow = 0;
|
||||
}
|
||||
|
||||
|
||||
}}} // Poco::SQL::PostgreSQL
|
||||
91
SQL/PostgreSQL/src/Utility.cpp
Normal file
91
SQL/PostgreSQL/src/Utility.cpp
Normal file
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// Utility.cpp
|
||||
//
|
||||
// Library: Data/PostgreSQL
|
||||
// Package: PostgreSQL
|
||||
// Module: Utility
|
||||
//
|
||||
// Implementation of Utility
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/Utility.h"
|
||||
#include "Poco/SQL/PostgreSQL/SessionImpl.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace SQL {
|
||||
namespace PostgreSQL {
|
||||
|
||||
|
||||
std::string Utility::serverInfo(SessionHandle* aHandlePtr)
|
||||
{
|
||||
std::string srvrInfo = "Process ID: ";
|
||||
|
||||
srvrInfo.append(Poco::NumberFormatter::format(aHandlePtr->serverProcessID()));
|
||||
|
||||
srvrInfo.append(" Protocol Version: ");
|
||||
|
||||
srvrInfo.append(Poco::NumberFormatter::format(aHandlePtr->protocoVersion()));
|
||||
|
||||
return srvrInfo;
|
||||
}
|
||||
|
||||
|
||||
std::string Utility::serverInfo(Session& aSession)
|
||||
{
|
||||
return serverInfo(handle(aSession));
|
||||
}
|
||||
|
||||
|
||||
int Utility::serverVersion(SessionHandle* aHandlePtr)
|
||||
{
|
||||
return aHandlePtr->serverVersion();
|
||||
}
|
||||
|
||||
|
||||
int Utility::serverVersion(Session& aSession)
|
||||
{
|
||||
return serverVersion(handle(aSession));
|
||||
}
|
||||
|
||||
|
||||
std::string Utility::hostInfo(SessionHandle* aHandlePtr)
|
||||
{
|
||||
SessionParametersMap parametersMap = aHandlePtr->connectionParameters();
|
||||
|
||||
SessionParametersMap::const_iterator cItr = parametersMap.find("host");
|
||||
|
||||
if (parametersMap.end() == cItr)
|
||||
{
|
||||
return std::string();
|
||||
}
|
||||
|
||||
return cItr->second.currentValue();
|
||||
}
|
||||
|
||||
|
||||
std::string Utility::hostInfo(Session& aSession)
|
||||
{
|
||||
return hostInfo(handle(aSession));
|
||||
}
|
||||
|
||||
|
||||
std::string Utility::sessionEncoding(SessionHandle* aHandlePtr)
|
||||
{
|
||||
return aHandlePtr->clientEncoding();
|
||||
}
|
||||
|
||||
|
||||
std::string Utility::sessionEncoding(Poco::SQL::Session& aSession)
|
||||
{
|
||||
return sessionEncoding(handle(aSession));
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::SQL::PostgreSQL
|
||||
17
SQL/PostgreSQL/testsuite/CMakeLists.txt
Normal file
17
SQL/PostgreSQL/testsuite/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoSQLPostgreSQL PocoSQL PocoFoundation CppUnit ${PostgreSQL_LIBRARIES})
|
||||
22
SQL/PostgreSQL/testsuite/Makefile
Normal file
22
SQL/PostgreSQL/testsuite/Makefile
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# Makefile for Poco PostgreSQL testsuite
|
||||
#
|
||||
|
||||
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
|
||||
|
||||
# Note: linking order is important, do not change it.
|
||||
SYSLIBS += -lz -lpthread -ldl
|
||||
|
||||
objects = PostgreSQLTestSuite Driver PostgreSQLTest SQLExecutor
|
||||
|
||||
target = testrunner
|
||||
target_version = 1
|
||||
target_libs = PocoSQLPostgreSQL PocoSQL PocoFoundation PocoCppUnit
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
319
SQL/PostgreSQL/testsuite/TestSuite_vs140.vcxproj
Normal file
319
SQL/PostgreSQL/testsuite/TestSuite_vs140.vcxproj
Normal file
@@ -0,0 +1,319 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.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>TestSuite</ProjectName>
|
||||
<ProjectGuid>{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</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>14.0.23107.0</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<OutDir>bin\static_mt\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<OutDir>bin\static_mt\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<OutDir>bin\static_md\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<OutDir>bin\static_md\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(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>PocoCppUnitd.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(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>PocoCppUnit.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;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/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmtd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_mt\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;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>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmt.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_mt\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;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/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmdd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_md\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;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>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_md\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\PostgreSQLTest.h"/>
|
||||
<ClInclude Include="src\PostgreSQLTestSuite.h"/>
|
||||
<ClInclude Include="src\SQLExecutor.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Driver.cpp"/>
|
||||
<ClCompile Include="src\PostgreSQLTest.cpp"/>
|
||||
<ClCompile Include="src\PostgreSQLTestSuite.cpp"/>
|
||||
<ClCompile Include="src\SQLExecutor.cpp"/>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
54
SQL/PostgreSQL/testsuite/TestSuite_vs140.vcxproj.filters
Normal file
54
SQL/PostgreSQL/testsuite/TestSuite_vs140.vcxproj.filters
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="PostgreSQL">
|
||||
<UniqueIdentifier>{ce383d39-86c9-41ce-b469-a7c0a2971ea4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="PostgreSQL\Header Files">
|
||||
<UniqueIdentifier>{75cea721-0048-46a2-a2dd-4bc7bc55330c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="PostgreSQL\Source Files">
|
||||
<UniqueIdentifier>{5ed3e193-9b1c-4f16-8f62-d373e1831fb1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite">
|
||||
<UniqueIdentifier>{fc32ba8a-cb9c-46d6-adc8-1fc140e3f134}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Header Files">
|
||||
<UniqueIdentifier>{21bb6fe9-b21c-4a82-a5d1-6a8708d3bb45}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Source Files">
|
||||
<UniqueIdentifier>{c4a7d106-b3ae-4224-ad83-827190831237}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver">
|
||||
<UniqueIdentifier>{016d6a14-186e-4fb5-88a5-dd222cf16b6a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver\Source Files">
|
||||
<UniqueIdentifier>{9d2193d4-05c8-4c11-a848-9c656c0b393f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\PostgreSQLTest.h">
|
||||
<Filter>PostgreSQL\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SQLExecutor.h">
|
||||
<Filter>PostgreSQL\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\PostgreSQLTestSuite.h">
|
||||
<Filter>_Suite\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\PostgreSQLTest.cpp">
|
||||
<Filter>PostgreSQL\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SQLExecutor.cpp">
|
||||
<Filter>PostgreSQL\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PostgreSQLTestSuite.cpp">
|
||||
<Filter>_Suite\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<Filter>_Driver\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
319
SQL/PostgreSQL/testsuite/TestSuite_vs150.vcxproj
Normal file
319
SQL/PostgreSQL/testsuite/TestSuite_vs150.vcxproj
Normal file
@@ -0,0 +1,319 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.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>TestSuite</ProjectName>
|
||||
<ProjectGuid>{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</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>14.0.23107.0</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<OutDir>bin\static_mt\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<OutDir>bin\static_mt\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<OutDir>bin\static_md\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<OutDir>bin\static_md\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(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>PocoCppUnitd.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(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>PocoCppUnit.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;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/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmtd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_mt\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;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>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmt.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_mt\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;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/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmdd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_md\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;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>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_md\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\PostgreSQLTest.h"/>
|
||||
<ClInclude Include="src\PostgreSQLTestSuite.h"/>
|
||||
<ClInclude Include="src\SQLExecutor.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Driver.cpp"/>
|
||||
<ClCompile Include="src\PostgreSQLTest.cpp"/>
|
||||
<ClCompile Include="src\PostgreSQLTestSuite.cpp"/>
|
||||
<ClCompile Include="src\SQLExecutor.cpp"/>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
54
SQL/PostgreSQL/testsuite/TestSuite_vs150.vcxproj.filters
Normal file
54
SQL/PostgreSQL/testsuite/TestSuite_vs150.vcxproj.filters
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="PostgreSQL">
|
||||
<UniqueIdentifier>{ce383d39-86c9-41ce-b469-a7c0a2971ea4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="PostgreSQL\Header Files">
|
||||
<UniqueIdentifier>{75cea721-0048-46a2-a2dd-4bc7bc55330c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="PostgreSQL\Source Files">
|
||||
<UniqueIdentifier>{5ed3e193-9b1c-4f16-8f62-d373e1831fb1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite">
|
||||
<UniqueIdentifier>{fc32ba8a-cb9c-46d6-adc8-1fc140e3f134}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Header Files">
|
||||
<UniqueIdentifier>{21bb6fe9-b21c-4a82-a5d1-6a8708d3bb45}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Source Files">
|
||||
<UniqueIdentifier>{c4a7d106-b3ae-4224-ad83-827190831237}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver">
|
||||
<UniqueIdentifier>{016d6a14-186e-4fb5-88a5-dd222cf16b6a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver\Source Files">
|
||||
<UniqueIdentifier>{9d2193d4-05c8-4c11-a848-9c656c0b393f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\PostgreSQLTest.h">
|
||||
<Filter>PostgreSQL\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SQLExecutor.h">
|
||||
<Filter>PostgreSQL\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\PostgreSQLTestSuite.h">
|
||||
<Filter>_Suite\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\PostgreSQLTest.cpp">
|
||||
<Filter>PostgreSQL\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SQLExecutor.cpp">
|
||||
<Filter>PostgreSQL\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PostgreSQLTestSuite.cpp">
|
||||
<Filter>_Suite\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<Filter>_Driver\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
319
SQL/PostgreSQL/testsuite/TestSuite_x64_vs140.vcxproj
Normal file
319
SQL/PostgreSQL/testsuite/TestSuite_x64_vs140.vcxproj
Normal file
@@ -0,0 +1,319 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.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>TestSuite</ProjectName>
|
||||
<ProjectGuid>{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</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>14.0.23107.0</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(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>PocoCppUnitd.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(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>PocoCppUnit.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;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/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmtd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_mt\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;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>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmt.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_mt\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;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/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmdd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_md\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;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>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_md\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\PostgreSQLTest.h"/>
|
||||
<ClInclude Include="src\PostgreSQLTestSuite.h"/>
|
||||
<ClInclude Include="src\SQLExecutor.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Driver.cpp"/>
|
||||
<ClCompile Include="src\PostgreSQLTest.cpp"/>
|
||||
<ClCompile Include="src\PostgreSQLTestSuite.cpp"/>
|
||||
<ClCompile Include="src\SQLExecutor.cpp"/>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
54
SQL/PostgreSQL/testsuite/TestSuite_x64_vs140.vcxproj.filters
Normal file
54
SQL/PostgreSQL/testsuite/TestSuite_x64_vs140.vcxproj.filters
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="PostgreSQL">
|
||||
<UniqueIdentifier>{5a5e9f18-8535-483d-9bc6-b3a482e2cf4d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="PostgreSQL\Header Files">
|
||||
<UniqueIdentifier>{61b2e4d0-e74e-418f-ac7d-c5c84b41c747}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="PostgreSQL\Source Files">
|
||||
<UniqueIdentifier>{f556d67d-6b8f-4ad6-a09b-1cf05debe1d4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite">
|
||||
<UniqueIdentifier>{894b43f7-0c0c-4bfb-a11c-2b327e58aa23}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Header Files">
|
||||
<UniqueIdentifier>{a8b81a0f-e683-4e58-bbf1-669fd67b4c0d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Source Files">
|
||||
<UniqueIdentifier>{42750c12-5981-48e8-baec-7bcccaa0bd67}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver">
|
||||
<UniqueIdentifier>{01b7af2a-626f-4441-9134-47003a2169fd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver\Source Files">
|
||||
<UniqueIdentifier>{27715cc7-b928-4f59-a2db-387c701d47c7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\PostgreSQLTest.h">
|
||||
<Filter>PostgreSQL\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SQLExecutor.h">
|
||||
<Filter>PostgreSQL\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\PostgreSQLTestSuite.h">
|
||||
<Filter>_Suite\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\PostgreSQLTest.cpp">
|
||||
<Filter>PostgreSQL\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SQLExecutor.cpp">
|
||||
<Filter>PostgreSQL\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PostgreSQLTestSuite.cpp">
|
||||
<Filter>_Suite\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<Filter>_Driver\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
319
SQL/PostgreSQL/testsuite/TestSuite_x64_vs150.vcxproj
Normal file
319
SQL/PostgreSQL/testsuite/TestSuite_x64_vs150.vcxproj
Normal file
@@ -0,0 +1,319 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.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>TestSuite</ProjectName>
|
||||
<ProjectGuid>{45528A81-2523-48DD-AEB3-6B6BD73A2C5D}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</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>14.0.23107.0</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(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>PocoCppUnitd.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(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>PocoCppUnit.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;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/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmtd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_mt\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;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>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmt.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_mt\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;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/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmdd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_md\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</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;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;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>
|
||||
<Link>
|
||||
<AdditionalDependencies>PocoCppUnitmd.lib;iphlpapi.lib;winmm.lib;libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_md\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\PostgreSQLTest.h"/>
|
||||
<ClInclude Include="src\PostgreSQLTestSuite.h"/>
|
||||
<ClInclude Include="src\SQLExecutor.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Driver.cpp"/>
|
||||
<ClCompile Include="src\PostgreSQLTest.cpp"/>
|
||||
<ClCompile Include="src\PostgreSQLTestSuite.cpp"/>
|
||||
<ClCompile Include="src\SQLExecutor.cpp"/>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
54
SQL/PostgreSQL/testsuite/TestSuite_x64_vs150.vcxproj.filters
Normal file
54
SQL/PostgreSQL/testsuite/TestSuite_x64_vs150.vcxproj.filters
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="PostgreSQL">
|
||||
<UniqueIdentifier>{5a5e9f18-8535-483d-9bc6-b3a482e2cf4d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="PostgreSQL\Header Files">
|
||||
<UniqueIdentifier>{61b2e4d0-e74e-418f-ac7d-c5c84b41c747}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="PostgreSQL\Source Files">
|
||||
<UniqueIdentifier>{f556d67d-6b8f-4ad6-a09b-1cf05debe1d4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite">
|
||||
<UniqueIdentifier>{894b43f7-0c0c-4bfb-a11c-2b327e58aa23}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Header Files">
|
||||
<UniqueIdentifier>{a8b81a0f-e683-4e58-bbf1-669fd67b4c0d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Source Files">
|
||||
<UniqueIdentifier>{42750c12-5981-48e8-baec-7bcccaa0bd67}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver">
|
||||
<UniqueIdentifier>{01b7af2a-626f-4441-9134-47003a2169fd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver\Source Files">
|
||||
<UniqueIdentifier>{27715cc7-b928-4f59-a2db-387c701d47c7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\PostgreSQLTest.h">
|
||||
<Filter>PostgreSQL\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SQLExecutor.h">
|
||||
<Filter>PostgreSQL\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\PostgreSQLTestSuite.h">
|
||||
<Filter>_Suite\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\PostgreSQLTest.cpp">
|
||||
<Filter>PostgreSQL\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SQLExecutor.cpp">
|
||||
<Filter>PostgreSQL\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PostgreSQLTestSuite.cpp">
|
||||
<Filter>_Suite\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<Filter>_Driver\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
17
SQL/PostgreSQL/testsuite/src/Driver.cpp
Normal file
17
SQL/PostgreSQL/testsuite/src/Driver.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// Driver.cpp
|
||||
//
|
||||
// Console-based test driver for Poco PostgreSQL.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/CppUnit/TestRunner.h"
|
||||
#include "PostgreSQLTestSuite.h"
|
||||
|
||||
|
||||
CppUnitMain(PostgreSQLTestSuite)
|
||||
1109
SQL/PostgreSQL/testsuite/src/PostgreSQLTest.cpp
Normal file
1109
SQL/PostgreSQL/testsuite/src/PostgreSQLTest.cpp
Normal file
File diff suppressed because it is too large
Load Diff
141
SQL/PostgreSQL/testsuite/src/PostgreSQLTest.h
Normal file
141
SQL/PostgreSQL/testsuite/src/PostgreSQLTest.h
Normal file
@@ -0,0 +1,141 @@
|
||||
//
|
||||
// PostgreSQLTest.h
|
||||
//
|
||||
// Definition of the PostgreSQLTest class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef PostgreSQLTest_INCLUDED
|
||||
#define PostgreSQLTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQL.h"
|
||||
#include "Poco/SQL/Session.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/CppUnit/TestCase.h"
|
||||
#include "SQLExecutor.h"
|
||||
|
||||
|
||||
class PostgreSQLTest: public CppUnit::TestCase
|
||||
/// PostgreSQL test class
|
||||
/// Tested:
|
||||
///
|
||||
/// Driver | DB | OS
|
||||
/// ----------------+---------------------------+------------------------------------------
|
||||
/// 03.51.12.00 | PostgreSQL 9.3.1.0(18) | Mac OSX 10.9.1
|
||||
///
|
||||
|
||||
{
|
||||
public:
|
||||
PostgreSQLTest(const std::string& name);
|
||||
~PostgreSQLTest();
|
||||
|
||||
void testConnectNoDB();
|
||||
void testPostgreSQLOIDs();
|
||||
void testBarebonePostgreSQL();
|
||||
|
||||
void testSimpleAccess();
|
||||
void testComplexType();
|
||||
void testSimpleAccessVector();
|
||||
void testComplexTypeVector();
|
||||
void testInsertVector();
|
||||
void testInsertEmptyVector();
|
||||
|
||||
void testInsertSingleBulk();
|
||||
void testInsertSingleBulkVec();
|
||||
|
||||
void testLimit();
|
||||
void testLimitOnce();
|
||||
void testLimitPrepare();
|
||||
void testLimitZero();
|
||||
void testPrepare();
|
||||
|
||||
void testSetSimple();
|
||||
void testSetComplex();
|
||||
void testSetComplexUnique();
|
||||
void testMultiSetSimple();
|
||||
void testMultiSetComplex();
|
||||
void testMapComplex();
|
||||
void testMapComplexUnique();
|
||||
void testMultiMapComplex();
|
||||
void testSelectIntoSingle();
|
||||
void testSelectIntoSingleStep();
|
||||
void testSelectIntoSingleFail();
|
||||
void testLowerLimitOk();
|
||||
void testLowerLimitFail();
|
||||
void testCombinedLimits();
|
||||
void testCombinedIllegalLimits();
|
||||
void testRange();
|
||||
void testIllegalRange();
|
||||
void testSingleSelect();
|
||||
void testEmptyDB();
|
||||
void testDateTime();
|
||||
void testBLOB();
|
||||
void testBLOBStmt();
|
||||
void testCLOBStmt();
|
||||
|
||||
void testUnsignedInts();
|
||||
void testFloat();
|
||||
void testDouble();
|
||||
|
||||
void testTuple();
|
||||
void testTupleVector();
|
||||
|
||||
void testInternalExtraction();
|
||||
|
||||
void testNull();
|
||||
void testNullVector();
|
||||
|
||||
void testNullableInt();
|
||||
void testNullableString();
|
||||
void testTupleWithNullable();
|
||||
|
||||
void testSessionTransaction();
|
||||
void testTransaction();
|
||||
|
||||
void testReconnect();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
|
||||
void dropTable(const std::string& tableName);
|
||||
void recreatePersonTable();
|
||||
void recreatePersonBLOBTable();
|
||||
void recreatePersonCLOBTable();
|
||||
void recreatePersonDateTimeTable();
|
||||
void recreatePersonDateTable();
|
||||
void recreatePersonTimeTable();
|
||||
void recreateStringsTable();
|
||||
void recreateIntsTable();
|
||||
void recreateUnsignedIntsTable();
|
||||
void recreateFloatsTable();
|
||||
void recreateTuplesTable();
|
||||
void recreateVectorsTable();
|
||||
void recreateNullableIntTable();
|
||||
void recreateNullableStringTable();
|
||||
|
||||
static void dbInfo(Poco::SQL::Session& session);
|
||||
|
||||
static std::string getHost();
|
||||
static std::string getPort();
|
||||
static std::string getBase();
|
||||
static std::string getUser();
|
||||
static std::string getPass();
|
||||
|
||||
static std::string _dbConnString;
|
||||
static Poco::SharedPtr<Poco::SQL::Session> _pSession;
|
||||
static Poco::SharedPtr<SQLExecutor> _pExecutor;
|
||||
static const bool bindValues[8];
|
||||
};
|
||||
|
||||
|
||||
#endif // PostgreSQLTest_INCLUDED
|
||||
26
SQL/PostgreSQL/testsuite/src/PostgreSQLTestSuite.cpp
Normal file
26
SQL/PostgreSQL/testsuite/src/PostgreSQLTestSuite.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// PostgreSQLTestSuite.cpp
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "PostgreSQLTestSuite.h"
|
||||
#include "PostgreSQLTest.h"
|
||||
|
||||
CppUnit::Test* PostgreSQLTestSuite::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("PostgreSQLTestSuite");
|
||||
|
||||
addTest(pSuite, PostgreSQLTest::suite());
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
|
||||
void PostgreSQLTestSuite::addTest(CppUnit::TestSuite* pSuite, CppUnit::Test* pT)
|
||||
{
|
||||
if (pSuite && pT) pSuite->addTest(pT);
|
||||
}
|
||||
27
SQL/PostgreSQL/testsuite/src/PostgreSQLTestSuite.h
Normal file
27
SQL/PostgreSQL/testsuite/src/PostgreSQLTestSuite.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// PostgreSQLTestSuite.h
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef PostgreSQLTestSuite_INCLUDED
|
||||
#define PostgreSQLTestSuite_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/CppUnit/TestSuite.h"
|
||||
|
||||
class PostgreSQLTestSuite
|
||||
{
|
||||
public:
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
static void addTest(CppUnit::TestSuite* pSuite, CppUnit::Test* pT);
|
||||
};
|
||||
|
||||
|
||||
#endif // PostgreSQLTestSuite_INCLUDED
|
||||
2133
SQL/PostgreSQL/testsuite/src/SQLExecutor.cpp
Normal file
2133
SQL/PostgreSQL/testsuite/src/SQLExecutor.cpp
Normal file
File diff suppressed because it is too large
Load Diff
110
SQL/PostgreSQL/testsuite/src/SQLExecutor.h
Normal file
110
SQL/PostgreSQL/testsuite/src/SQLExecutor.h
Normal file
@@ -0,0 +1,110 @@
|
||||
//
|
||||
// SQLExecutor.h
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SQLExecutor_PostgreSQL_INCLUDED
|
||||
#define SQLExecutor_PostgreSQL_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/SQL/PostgreSQL/PostgreSQL.h"
|
||||
#include "Poco/SQL/Session.h"
|
||||
|
||||
#include <libpq-fe.h>
|
||||
|
||||
class SQLExecutor: public CppUnit::TestCase
|
||||
{
|
||||
public:
|
||||
enum DataBinding
|
||||
{
|
||||
PB_IMMEDIATE,
|
||||
PB_AT_EXEC
|
||||
};
|
||||
|
||||
enum DataExtraction
|
||||
{
|
||||
DE_MANUAL,
|
||||
DE_BOUND
|
||||
};
|
||||
|
||||
SQLExecutor(const std::string& name, Poco::SQL::Session* _pSession);
|
||||
~SQLExecutor();
|
||||
|
||||
void oidPostgreSQLTest(std::string host, std::string user, std::string pwd, std::string db, std::string port, const char* tableCreateString, const Oid anOIDArray[]);
|
||||
/// This function verifies the PostgreSQL Column type OIDs are consistent between releases
|
||||
|
||||
void barebonePostgreSQLTest(std::string host, std::string user, std::string pwd, std::string db, std::string port, const char* tableCreateString);
|
||||
/// This function uses "bare bone" API calls (i.e. calls are not
|
||||
/// "wrapped" in PocoData framework structures).
|
||||
/// The purpose of the function is to verify that driver behaves
|
||||
/// correctly. If this test passes, subsequent tests failures are likely ours.
|
||||
|
||||
void simpleAccess();
|
||||
void complexType();
|
||||
void simpleAccessVector();
|
||||
void complexTypeVector();
|
||||
void insertVector();
|
||||
void insertEmptyVector();
|
||||
|
||||
void insertSingleBulk();
|
||||
void insertSingleBulkVec();
|
||||
|
||||
void limits();
|
||||
void limitOnce();
|
||||
void limitPrepare();
|
||||
void limitZero();
|
||||
void prepare();
|
||||
|
||||
void setSimple();
|
||||
void setComplex();
|
||||
void setComplexUnique();
|
||||
void multiSetSimple();
|
||||
void multiSetComplex();
|
||||
void mapComplex();
|
||||
void mapComplexUnique();
|
||||
void multiMapComplex();
|
||||
void selectIntoSingle();
|
||||
void selectIntoSingleStep();
|
||||
void selectIntoSingleFail();
|
||||
void lowerLimitOk();
|
||||
void lowerLimitFail();
|
||||
void combinedLimits();
|
||||
void combinedIllegalLimits();
|
||||
void ranges();
|
||||
void illegalRange();
|
||||
void singleSelect();
|
||||
void emptyDB();
|
||||
|
||||
void blob(unsigned int bigSize = 1024000); // size value will have to go into an int in the end
|
||||
void clobStmt();
|
||||
void blobStmt();
|
||||
void dateTime();
|
||||
void date();
|
||||
void time();
|
||||
void unsignedInts();
|
||||
void floats();
|
||||
void doubles();
|
||||
void tuples();
|
||||
void tupleVector();
|
||||
|
||||
void internalExtraction();
|
||||
void doNull();
|
||||
|
||||
void sessionTransaction(const std::string& connect);
|
||||
void transaction(const std::string& connect);
|
||||
|
||||
void reconnect();
|
||||
|
||||
private:
|
||||
void setTransactionIsolation(Poco::SQL::Session& session, Poco::UInt32 ti);
|
||||
|
||||
Poco::SQL::Session* _pSession;
|
||||
};
|
||||
|
||||
|
||||
#endif // SQLExecutor_PostgreSQL_INCLUDED
|
||||
28
SQL/PostgreSQL/testsuite/src/WinDriver.cpp
Normal file
28
SQL/PostgreSQL/testsuite/src/WinDriver.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// WinDriver.cpp
|
||||
//
|
||||
// Windows test driver for Poco PostgreSQL.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "WinTestRunner/WinTestRunner.h"
|
||||
#include "PostgreSQLTestSuite.h"
|
||||
|
||||
|
||||
class TestDriver: public CppUnit::WinTestRunnerApp
|
||||
{
|
||||
void TestMain()
|
||||
{
|
||||
CppUnit::WinTestRunner runner;
|
||||
runner.addTest(PostgreSQLTestSuite::suite());
|
||||
runner.run();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
TestDriver theDriver;
|
||||
Reference in New Issue
Block a user