[fdo-commits] r2611 - in trunk/Providers/KingOracle/src: . Provider
svn_fdo at osgeo.org
svn_fdo at osgeo.org
Fri Feb 23 16:13:21 EST 2007
Author: haris
Date: 2007-02-23 16:13:21 -0500 (Fri, 23 Feb 2007)
New Revision: 2611
Modified:
trunk/Providers/KingOracle/src/FDO KingOracle Provider.sln
trunk/Providers/KingOracle/src/Provider/FDO_31_Types.h
trunk/Providers/KingOracle/src/Provider/KgOraProvider.aps
trunk/Providers/KingOracle/src/Provider/KgOraProvider.h
trunk/Providers/KingOracle/src/Provider/KgOraProvider.rc
trunk/Providers/KingOracle/src/Provider/KingOracleProvider.vcproj
trunk/Providers/KingOracle/src/Provider/KingOracleProvider.vcproj.HARIS4.Haris.user
trunk/Providers/KingOracle/src/Provider/c_FdoOra_API.cpp
trunk/Providers/KingOracle/src/Provider/c_FdoOra_API.h
trunk/Providers/KingOracle/src/Provider/c_FgfToSdoGeom.cpp
trunk/Providers/KingOracle/src/Provider/c_FgfToSdoGeom.h
trunk/Providers/KingOracle/src/Provider/c_KgOraApplySchema.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraApplySchema.h
trunk/Providers/KingOracle/src/Provider/c_KgOraCommandCapabilities.h
trunk/Providers/KingOracle/src/Provider/c_KgOraConnection.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraConnection.h
trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionCapabilities.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionCapabilities.h
trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionInfo.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionInfo.h
trunk/Providers/KingOracle/src/Provider/c_KgOraDescribeSchemaCommand.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraDescribeSchemaCommand.h
trunk/Providers/KingOracle/src/Provider/c_KgOraExpressionCapabilities.h
trunk/Providers/KingOracle/src/Provider/c_KgOraExpressionProcessor.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraFdoCommand.h
trunk/Providers/KingOracle/src/Provider/c_KgOraFdoFeatureCommand.h
trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReader.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReader.h
trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReaderInsert.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraFilterCapabilities.h
trunk/Providers/KingOracle/src/Provider/c_KgOraGeometryCapabilities.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraGeometryCapabilities.h
trunk/Providers/KingOracle/src/Provider/c_KgOraInsert.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraReader.h
trunk/Providers/KingOracle/src/Provider/c_KgOraSQLCommand.h
trunk/Providers/KingOracle/src/Provider/c_KgOraSQLDataReader.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraSQLDataReader.h
trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaCapabilities.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaCapabilities.h
trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaDesc.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaDesc.h
trunk/Providers/KingOracle/src/Provider/c_KgOraSelectCommand.cpp
trunk/Providers/KingOracle/src/Provider/c_KgOraSpatialContext.h
trunk/Providers/KingOracle/src/Provider/c_KgOraSqlParamDesc.cpp
trunk/Providers/KingOracle/src/Provider/c_OCCI_API.cpp
trunk/Providers/KingOracle/src/Provider/c_OCCI_API.h
trunk/Providers/KingOracle/src/Provider/c_SdoGeomToAGF.cpp
Log:
Modified: trunk/Providers/KingOracle/src/FDO KingOracle Provider.sln
===================================================================
--- trunk/Providers/KingOracle/src/FDO KingOracle Provider.sln 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/FDO KingOracle Provider.sln 2007-02-23 21:13:21 UTC (rev 2611)
@@ -11,10 +11,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KingOracleMessage", "Message\KingOracleMessage.vcproj", "{655D105C-2C30-484D-80F8-556772000572}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FdoCommon", "..\..\FdoCommon\FdoCommon.vcproj", "{9037A345-04EB-418C-98D0-3D5B19FC9D55}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GisCommon", "..\..\..\fdo\Unmanaged\GisCommon.vcproj", "{BFE59F23-B20D-4469-B263-52E233A2FC01}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CAA921BB-9AAB-49BF-B30F-756B55282D65}"
ProjectSection(SolutionItems) = preProject
CopyDebug.bat = CopyDebug.bat
@@ -22,43 +18,72 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest", "UnitTest\UnitTest.vcproj", "{07E40766-1E29-499A-A333-76435DA1E7C0}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\..\..\Utilities\Common\FdoCommon.vcproj", "{9037A345-04EB-418C-98D0-3D5B19FC9D55}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- InstantClient_Release|Win32 = InstantClient_Release|Win32
- Release|Win32 = Release|Win32
+ Debug_Fdo_3_1|Win32 = Debug_Fdo_3_1|Win32
+ Debug_Fdo_3_2|Win32 = Debug_Fdo_3_2|Win32
+ InstantClient_Release_Fdo_3_1|Win32 = InstantClient_Release_Fdo_3_1|Win32
+ InstantClient_Release_Fdo_3_2|Win32 = InstantClient_Release_Fdo_3_2|Win32
+ Release_Fdo_3_1|Win32 = Release_Fdo_3_1|Win32
+ Release_Fdo_3_2|Win32 = Release_Fdo_3_2|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Debug|Win32.ActiveCfg = Debug|Win32
- {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Debug|Win32.Build.0 = Debug|Win32
- {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.InstantClient_Release|Win32.ActiveCfg = InstantClient_Release|Win32
- {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.InstantClient_Release|Win32.Build.0 = InstantClient_Release|Win32
- {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Release|Win32.ActiveCfg = Release|Win32
- {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Release|Win32.Build.0 = Release|Win32
- {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Debug|Win32.ActiveCfg = Debug|Win32
- {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Debug|Win32.Build.0 = Debug|Win32
- {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.InstantClient_Release|Win32.ActiveCfg = InstantClient_Release|Win32
- {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.InstantClient_Release|Win32.Build.0 = InstantClient_Release|Win32
- {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Release|Win32.ActiveCfg = Release|Win32
- {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Release|Win32.Build.0 = Release|Win32
- {655D105C-2C30-484D-80F8-556772000572}.Debug|Win32.ActiveCfg = Debug|Win32
- {655D105C-2C30-484D-80F8-556772000572}.Debug|Win32.Build.0 = Debug|Win32
- {655D105C-2C30-484D-80F8-556772000572}.InstantClient_Release|Win32.ActiveCfg = InstantClient_Release|Win32
- {655D105C-2C30-484D-80F8-556772000572}.InstantClient_Release|Win32.Build.0 = InstantClient_Release|Win32
- {655D105C-2C30-484D-80F8-556772000572}.Release|Win32.ActiveCfg = Release|Win32
- {655D105C-2C30-484D-80F8-556772000572}.Release|Win32.Build.0 = Release|Win32
- {9037A345-04EB-418C-98D0-3D5B19FC9D55}.Debug|Win32.ActiveCfg = Release|Win32
- {9037A345-04EB-418C-98D0-3D5B19FC9D55}.InstantClient_Release|Win32.ActiveCfg = InstantClient_Release|Win32
- {9037A345-04EB-418C-98D0-3D5B19FC9D55}.Release|Win32.ActiveCfg = Release|Win32
- {BFE59F23-B20D-4469-B263-52E233A2FC01}.Debug|Win32.ActiveCfg = Release|Win32
- {BFE59F23-B20D-4469-B263-52E233A2FC01}.InstantClient_Release|Win32.ActiveCfg = InstantClient_Release|Win32
- {BFE59F23-B20D-4469-B263-52E233A2FC01}.Release|Win32.ActiveCfg = Release|Win32
- {07E40766-1E29-499A-A333-76435DA1E7C0}.Debug|Win32.ActiveCfg = Debug|Win32
- {07E40766-1E29-499A-A333-76435DA1E7C0}.Debug|Win32.Build.0 = Debug|Win32
- {07E40766-1E29-499A-A333-76435DA1E7C0}.InstantClient_Release|Win32.ActiveCfg = Release|Win32
- {07E40766-1E29-499A-A333-76435DA1E7C0}.InstantClient_Release|Win32.Build.0 = Release|Win32
- {07E40766-1E29-499A-A333-76435DA1E7C0}.Release|Win32.ActiveCfg = Release|Win32
- {07E40766-1E29-499A-A333-76435DA1E7C0}.Release|Win32.Build.0 = Release|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Debug_Fdo_3_1|Win32.ActiveCfg = Debug_Fdo_3_1|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Debug_Fdo_3_1|Win32.Build.0 = Debug_Fdo_3_1|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Debug_Fdo_3_2|Win32.ActiveCfg = Debug_Fdo_3_2|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Debug_Fdo_3_2|Win32.Build.0 = Debug_Fdo_3_2|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.InstantClient_Release_Fdo_3_1|Win32.ActiveCfg = InstantClient_Release_Fdo_3_1|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.InstantClient_Release_Fdo_3_1|Win32.Build.0 = InstantClient_Release_Fdo_3_1|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.InstantClient_Release_Fdo_3_2|Win32.ActiveCfg = InstantClient_Release_Fdo_3_2|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.InstantClient_Release_Fdo_3_2|Win32.Build.0 = InstantClient_Release_Fdo_3_2|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Release_Fdo_3_1|Win32.ActiveCfg = Release_Fdo_3_1|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Release_Fdo_3_1|Win32.Build.0 = Release_Fdo_3_1|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Release_Fdo_3_2|Win32.ActiveCfg = Release_Fdo_3_2|Win32
+ {A8CAD4E4-5C05-4D3F-B8CC-96D862110278}.Release_Fdo_3_2|Win32.Build.0 = Release_Fdo_3_2|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Debug_Fdo_3_1|Win32.ActiveCfg = Debug_Fdo_3_1|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Debug_Fdo_3_1|Win32.Build.0 = Debug_Fdo_3_1|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Debug_Fdo_3_2|Win32.ActiveCfg = Debug_Fdo_3_2|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Debug_Fdo_3_2|Win32.Build.0 = Debug_Fdo_3_2|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.InstantClient_Release_Fdo_3_1|Win32.ActiveCfg = InstantClient_Release_Fdo_3_1|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.InstantClient_Release_Fdo_3_1|Win32.Build.0 = InstantClient_Release_Fdo_3_1|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.InstantClient_Release_Fdo_3_2|Win32.ActiveCfg = InstantClient_Release_Fdo_3_2|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.InstantClient_Release_Fdo_3_2|Win32.Build.0 = InstantClient_Release_Fdo_3_2|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Release_Fdo_3_1|Win32.ActiveCfg = Release_Fdo_3_1|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Release_Fdo_3_1|Win32.Build.0 = Release_Fdo_3_1|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Release_Fdo_3_2|Win32.ActiveCfg = Release_Fdo_3_2|Win32
+ {5B5F49A3-7760-4171-9F3C-47BB775EC4FE}.Release_Fdo_3_2|Win32.Build.0 = Release_Fdo_3_2|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.Debug_Fdo_3_1|Win32.ActiveCfg = Debug_Fdo_3_1|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.Debug_Fdo_3_1|Win32.Build.0 = Debug_Fdo_3_1|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.Debug_Fdo_3_2|Win32.ActiveCfg = Debug_Fdo_3_2|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.Debug_Fdo_3_2|Win32.Build.0 = Debug_Fdo_3_2|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.InstantClient_Release_Fdo_3_1|Win32.ActiveCfg = InstantClient_Release_Fdo_3_1|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.InstantClient_Release_Fdo_3_1|Win32.Build.0 = InstantClient_Release_Fdo_3_1|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.InstantClient_Release_Fdo_3_2|Win32.ActiveCfg = InstantClient_Release_Fdo_3_2|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.InstantClient_Release_Fdo_3_2|Win32.Build.0 = InstantClient_Release_Fdo_3_2|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.Release_Fdo_3_1|Win32.ActiveCfg = Release_Fdo_3_1|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.Release_Fdo_3_1|Win32.Build.0 = Release_Fdo_3_1|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.Release_Fdo_3_2|Win32.ActiveCfg = Release_Fdo_3_2|Win32
+ {655D105C-2C30-484D-80F8-556772000572}.Release_Fdo_3_2|Win32.Build.0 = Release_Fdo_3_2|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.Debug_Fdo_3_1|Win32.ActiveCfg = Debug_Fdo_3_1|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.Debug_Fdo_3_1|Win32.Build.0 = Debug_Fdo_3_1|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.Debug_Fdo_3_2|Win32.ActiveCfg = Debug_Fdo_3_2|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.Debug_Fdo_3_2|Win32.Build.0 = Debug_Fdo_3_2|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.InstantClient_Release_Fdo_3_1|Win32.ActiveCfg = Release_Fdo_3_1|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.InstantClient_Release_Fdo_3_1|Win32.Build.0 = Release_Fdo_3_1|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.InstantClient_Release_Fdo_3_2|Win32.ActiveCfg = Release_Fdo_3_2|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.InstantClient_Release_Fdo_3_2|Win32.Build.0 = Release_Fdo_3_2|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.Release_Fdo_3_1|Win32.ActiveCfg = Release_Fdo_3_1|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.Release_Fdo_3_1|Win32.Build.0 = Release_Fdo_3_1|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.Release_Fdo_3_2|Win32.ActiveCfg = Release_Fdo_3_2|Win32
+ {07E40766-1E29-499A-A333-76435DA1E7C0}.Release_Fdo_3_2|Win32.Build.0 = Release_Fdo_3_2|Win32
+ {9037A345-04EB-418C-98D0-3D5B19FC9D55}.Debug_Fdo_3_1|Win32.ActiveCfg = Release|Win32
+ {9037A345-04EB-418C-98D0-3D5B19FC9D55}.Debug_Fdo_3_2|Win32.ActiveCfg = Release|Win32
+ {9037A345-04EB-418C-98D0-3D5B19FC9D55}.InstantClient_Release_Fdo_3_1|Win32.ActiveCfg = Release|Win32
+ {9037A345-04EB-418C-98D0-3D5B19FC9D55}.InstantClient_Release_Fdo_3_2|Win32.ActiveCfg = Release|Win32
+ {9037A345-04EB-418C-98D0-3D5B19FC9D55}.Release_Fdo_3_1|Win32.ActiveCfg = Release|Win32
+ {9037A345-04EB-418C-98D0-3D5B19FC9D55}.Release_Fdo_3_2|Win32.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/Providers/KingOracle/src/Provider/FDO_31_Types.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/FDO_31_Types.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/FDO_31_Types.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -1,6 +1,9 @@
#pragma once
// new 3.2 naming
-#define D_FDO_3_1
+#ifdef _FDO_3_1
+ #define D_FDO_3_1
+#endif
+
#ifdef D_FDO_3_1
#define FdoPtr GisPtr
@@ -43,6 +46,7 @@
#define FdoGeometryType_MultiCurvePolygon GisGeometryType_MultiCurvePolygon
#define FdoGeometryComponentType_LinearRing GisGeometryComponentType_LinearRing
#define FdoGeometryComponentType_LineStringSegment GisGeometryComponentType_LineStringSegment
+#define FdoGeometryComponentType_CircularArcSegment GisGeometryComponentType_CircularArcSegment
#define FdoGeometryComponentType_Ring GisGeometryComponentType_Ring
#define FdoGeometryType GisGeometryType
#define FdoGeometryComponentType GisGeometryComponentType
@@ -52,4 +56,19 @@
#define FdoNamedCollection GisNamedCollection
+#define FdoXmlSaxContext GisXmlSaxContext
+#define FdoXmlSaxHandler GisXmlSaxHandler
+#define FdoXmlAttributeCollection GisXmlAttributeCollection
+#define FdoXmlWriter GisXmlWriter
+#define FdoDisposable GisDisposable
+#define FdoXmlAttributeP GisXmlAttributeP
+#define FdoXml GisXml
+#define FDO_NLSID GIS_NLSID
+//#define FdoException GisException
+
+#define FDO_100_COMMAND_TIMEOUT_NOT_SUPPORTED GIS_100_COMMAND_TIMEOUT_NOT_SUPPORTED
+#define FDO_103_CONNECTION_ALREADY_OPEN GIS_103_CONNECTION_ALREADY_OPEN
+#define FDO_102_COMMAND_NOT_SUPPORTED GIS_102_COMMAND_NOT_SUPPORTED
+#define FDO_68_COMMAND_PARAMETERS_NOT_SUPPORTED GIS_68_COMMAND_PARAMETERS_NOT_SUPPORTED
+
#endif
\ No newline at end of file
Modified: trunk/Providers/KingOracle/src/Provider/KgOraProvider.aps
===================================================================
(Binary files differ)
Modified: trunk/Providers/KingOracle/src/Provider/KgOraProvider.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/KgOraProvider.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/KgOraProvider.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -36,6 +36,7 @@
//#define D_CONN_PROPERTY_SERVICE_NAME L"ServiceName"
#define D_CONN_PROPERTY_SERVICE_NAME L"Service"
#define D_CONN_PROPERTY_ORACLE_SCHEMA L"OracleSchema"
+#define D_CONN_PROPERTY_KING_FDO_CLASS L"KingFdoClass"
Modified: trunk/Providers/KingOracle/src/Provider/KgOraProvider.rc
===================================================================
--- trunk/Providers/KingOracle/src/Provider/KgOraProvider.rc 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/KgOraProvider.rc 2007-02-23 21:13:21 UTC (rev 2611)
@@ -65,8 +65,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,3,0,0
- PRODUCTVERSION 3,3,0,0
+ FILEVERSION 0,1,1,0
+ PRODUCTVERSION 0,1,1,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -84,9 +84,9 @@
VALUE "Comments", "King FDO Provider for Oracle Spatial"
VALUE "CompanyName", "SL-King"
VALUE "FileDescription", "King FDO Provider for Oracle Spatial Component"
- VALUE "FileVersion", "3.3.0.R000"
+ VALUE "FileVersion", "3.1.0.R000"
VALUE "InternalName", "KingOracleprovider"
- VALUE "LegalCopyright", "Copyright © 2007"
+ VALUE "LegalCopyright", "Copyright © 2006"
VALUE "OriginalFilename", "KingOracleProvider.dll"
VALUE "ProductName", "Feature Data Objects"
VALUE "ProductVersion", "0.1.1.0"
Modified: trunk/Providers/KingOracle/src/Provider/KingOracleProvider.vcproj
===================================================================
--- trunk/Providers/KingOracle/src/Provider/KingOracleProvider.vcproj 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/KingOracleProvider.vcproj 2007-02-23 21:13:21 UTC (rev 2611)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="8.00"
+ Version="8,00"
Name="KingOracleProvider"
ProjectGUID="{A8CAD4E4-5C05-4D3F-B8CC-96D862110278}"
RootNamespace="KingOracleProvider"
@@ -15,8 +15,8 @@
</ToolFiles>
<Configurations>
<Configuration
- Name="Debug|Win32"
- OutputDirectory="Dbg"
+ Name="Debug_Fdo_3_2|Win32"
+ OutputDirectory="..\..\Bin\Win32\$(ConfigurationName)"
IntermediateDirectory="Dbg"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
@@ -40,8 +40,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=".\;..\..\inc;..\..\..\..\Fdo\Unmanaged\inc;..\..\..\FdoCommon\inc;..\..\..\..\Fdo\Unmanaged\inc\fdo\Expression;d:\oracle\product\10.2.0\client_1\oci\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FDOKGORA_EXPORTS;GISSPATIAL_STATIC;_CRT_SECURE_NO_DEPRECATE"
+ AdditionalIncludeDirectories="..\..\..\..\FDO\Unmanaged\inc;..\..\..\..\Utilities\Common\inc;..\..\inc;.\;..\..\..\..\Fdo\Unmanaged\inc\fdo\Expression;d:\oracle\product\10.2.0\client_1\oci\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FDOKGORA_EXPORTS;GISSPATIAL_STATIC;_CRT_SECURE_NO_DEPRECATE;_FDO_3_2"
GeneratePreprocessedFile="0"
MinimalRebuild="true"
RuntimeLibrary="3"
@@ -63,8 +63,8 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="oraocci10d.lib oci.lib Fdo.lib GisCommon.lib GisGeometry.lib GisSpatial.lib GisNls.lib FdoCommon.lib KingOracleOverrides.lib"
- AdditionalLibraryDirectories="d:\oracle\product\10.2.0\client_1\oci\lib\msvc\vc8;D:\oracle\product\10.2.0\client_1\oci\lib\msvc;..\..\..\..\Fdo\Unmanaged\lib\iwins\debug;..\..\..\FdoCommon\lib\iwins\debug;..\Overrides\Dbg"
+ AdditionalDependencies="oraocci10d.lib oci.lib FDO.lib FDOCommon.lib FDOGeometry.lib FDOSpatial.lib FDONls.lib ProvidersCommon.lib KingOracleOverrides.lib"
+ AdditionalLibraryDirectories="d:\oracle\product\10.2.0\client_1\oci\lib\msvc\vc8;d:\oracle\product\10.2.0\client_1\oci\lib\msvc;..\..\..\..\Fdo\Unmanaged\Lib\Win32\Debug\;..\..\..\..\Utilities\Common\Lib\Win32\Debug;..\Overrides\Dbg"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
TargetMachine="1"
@@ -93,12 +93,12 @@
<Tool
Name="VCPostBuildEventTool"
Description="Versioning $(ProjectName).dll"
- CommandLine="..\..\..\..\thirdparty\util\stampver\StampVer.exe -v"..\..\..\SubDoc\Providers.version" -f"0.4.4.0%PROVIDERS_VERSION%" $(OutDir)\$(ProjectName).dll
..\copydebug.bat
..\copyunittest.bat
"
+ CommandLine="..\..\..\..\thirdparty\util\stampver\StampVer.exe -v"..\..\..\SubDoc\Providers.version" -f"0.6.1.0%PROVIDERS_VERSION%" $(OutDir)\$(ProjectName).dll
copy /y "$(OutDir)\*.dll" "..\UnitTest\DebuG_FDO_3_2\"
copy /y "$(OutDir)\*.pdb" "..\UnitTest\DebuG_FDO_3_2\"
CopyDebug_FDO_3_2.bat
"
/>
</Configuration>
<Configuration
- Name="Release|Win32"
- OutputDirectory="Rel"
+ Name="Release_Fdo_3_2|Win32"
+ OutputDirectory="..\..\Bin\Win32\$(ConfigurationName)"
IntermediateDirectory="Rel"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
@@ -121,8 +121,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="d:\oracle\product\10.2.0\client_1\oci\include;.\;..\..\inc;..\..\..\..\Fdo\Unmanaged\inc;..\..\..\FdoCommon\inc;..\..\..\..\Fdo\Unmanaged\inc\fdo\Expression"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FDOKGORA_EXPORTS;GISSPATIAL_STATIC;_CRT_SECURE_NO_DEPRECATE"
+ AdditionalIncludeDirectories="..\..\..\..\FDO\Unmanaged\inc;..\..\..\..\Utilities\Common\inc;..\..\inc;.\;..\..\..\..\Fdo\Unmanaged\inc\fdo\Expression;d:\oracle\product\10.2.0\client_1\oci\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FDOKGORA_EXPORTS;GISSPATIAL_STATIC;_CRT_SECURE_NO_DEPRECATE;_FDO_3_2"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="true"
RuntimeTypeInfo="true"
@@ -140,8 +140,246 @@
/>
<Tool
Name="VCLinkerTool"
+ LinkLibraryDependencies="false"
+ AdditionalDependencies="oraocci10.lib FDO.lib FDOCommon.lib FDOGeometry.lib FDOSpatial.lib FDONls.lib ProvidersCommon.lib KingOracleOverrides.lib"
+ AdditionalLibraryDirectories="d:\oracle\product\10.2.0\client_1\oci\lib\msvc\vc8;..\..\..\..\Fdo\Unmanaged\Lib\Win32\Release\;..\..\..\..\Utilities\Common\Lib\Win32\Release\;..\Overrides\Rel"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Versioning $(ProjectName).dll"
+ CommandLine="..\..\..\..\thirdparty\util\stampver\StampVer.exe -v"..\..\..\SubDoc\Providers.version" -f"0.6.1.0%PROVIDERS_VERSION%" $(OutDir)\$(ProjectName).dll

"
+ />
+ </Configuration>
+ <Configuration
+ Name="InstantClient_Release_Fdo_3_2|Win32"
+ OutputDirectory="..\..\Bin\Win32\$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\..\FDO\Unmanaged\inc;..\..\..\..\Utilities\Common\inc;..\..\inc;.\;..\..\..\..\Fdo\Unmanaged\inc\fdo\Expression;d:\oracle\product\10.2.0\client_1\oci\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FDOKGORA_EXPORTS;GISSPATIAL_STATIC;_CRT_SECURE_NO_DEPRECATE;_FDO_3_2"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oraocci10.lib FDO.lib FDOCommon.lib FDOGeometry.lib FDOSpatial.lib FDONls.lib ProvidersCommon.lib KingOracleOverrides.lib"
+ AdditionalLibraryDirectories="D:\oracle\product\10.2.0\client_1\instantclient_10_2\sdk\lib\msvc;..\..\..\..\Fdo\Unmanaged\Lib\Win32\Release\;..\..\..\..\Utilities\Common\Lib\Win32\Release\;..\Overrides\Rel"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Versioning $(ProjectName).dll"
+ CommandLine="..\..\..\..\thirdparty\util\stampver\StampVer.exe -v"..\..\..\SubDoc\Providers.version" -f"0.6.1.0%PROVIDERS_VERSION%" $(OutDir)\$(ProjectName).dll

"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_Fdo_3_1|Win32"
+ OutputDirectory="..\..\Bin\Win32\$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\inc;"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\fdo\Unmanaged\inc";"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\providers\FdoCommon\inc";.\;"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\fdo\Unmanaged\inc\fdo\Expression";d:\oracle\product\10.2.0\client_1\oci\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FDOKGORA_EXPORTS;GISSPATIAL_STATIC;_CRT_SECURE_NO_DEPRECATE;_FDO_3_1"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="true"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oraocci10d.lib oci.lib Fdo.lib GisCommon.lib GisGeometry.lib GisSpatial.lib GisNls.lib FdoCommon.lib KingOracleOverrides.lib"
+ AdditionalLibraryDirectories="d:\oracle\product\10.2.0\client_1\oci\lib\msvc\vc8;D:\oracle\product\10.2.0\client_1\oci\lib\msvc;"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\fdo\Unmanaged\lib\iwins\debug";"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\providers\FdoCommon\lib\iwins\debug";..\Overrides\Debug_Fdo_3_1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Versioning $(ProjectName).dll"
+ CommandLine="..\..\..\..\thirdparty\util\stampver\StampVer.exe -v"..\..\..\SubDoc\Providers.version" -f"0.6.1.0%PROVIDERS_VERSION%" $(OutDir)\$(ProjectName).dll
copy /y "$(OutDir)\*.dll" "..\UnitTest\DebuG_FDO_3_1\"
copy /y "$(OutDir)\*.pdb" "..\UnitTest\DebuG_FDO_3_1\"
CopyDebug_FDO_3_1.bat
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release_Fdo_3_1|Win32"
+ OutputDirectory="..\..\Bin\Win32\$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\fdo\Unmanaged\inc";"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\providers\FdoCommon\inc";..\..\inc;.\;"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\fdo\Unmanaged\inc\fdo\Expression";d:\oracle\product\10.2.0\client_1\oci\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FDOKGORA_EXPORTS;GISSPATIAL_STATIC;_CRT_SECURE_NO_DEPRECATE;_FDO_3_1"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkLibraryDependencies="false"
AdditionalDependencies="oraocci10.lib Fdo.lib GisCommon.lib GisGeometry.lib GisSpatial.lib GisNls.lib FdoCommon.lib KingOracleOverrides.lib"
- AdditionalLibraryDirectories="d:\oracle\product\10.2.0\client_1\oci\lib\msvc\vc8;..\..\..\..\Fdo\Unmanaged\lib\iwins\release;..\..\..\FdoCommon\lib\iwins\release;..\Overrides\Rel"
+ AdditionalLibraryDirectories="d:\oracle\product\10.2.0\client_1\oci\lib\msvc\vc8;"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\fdo\Unmanaged\lib\iwins\release";"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\providers\FdoCommon\lib\iwins\release";..\Overrides\Release_Fdo_3_1"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
TargetMachine="1"
@@ -170,12 +408,12 @@
<Tool
Name="VCPostBuildEventTool"
Description="Versioning $(ProjectName).dll"
- CommandLine="..\..\..\..\thirdparty\util\stampver\StampVer.exe -v"..\..\..\SubDoc\Providers.version" -f"0.4.4.0%PROVIDERS_VERSION%" $(OutDir)\$(ProjectName).dll
..\copyunittest.bat
"
+ CommandLine="..\..\..\..\thirdparty\util\stampver\StampVer.exe -v"..\..\..\SubDoc\Providers.version" -f"0.6.1.0%PROVIDERS_VERSION%" $(OutDir)\$(ProjectName).dll

"
/>
</Configuration>
<Configuration
- Name="InstantClient_Release|Win32"
- OutputDirectory="$(ConfigurationName)"
+ Name="InstantClient_Release_Fdo_3_1|Win32"
+ OutputDirectory="..\..\Bin\Win32\$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
@@ -198,8 +436,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="D:\oracle\product\10.2.0\client_1\instantclient_10_2\sdk\include;.\;..\..\inc;..\..\..\..\Fdo\Unmanaged\inc;..\..\..\FdoCommon\inc;..\..\..\..\Fdo\Unmanaged\inc\fdo\Expression"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FDOKGORA_EXPORTS;GISSPATIAL_STATIC;_CRT_SECURE_NO_DEPRECATE"
+ AdditionalIncludeDirectories=""D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\fdo\Unmanaged\inc";"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\providers\FdoCommon\inc";..\..\inc;.\;"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\fdo\Unmanaged\inc\fdo\Expression";d:\oracle\product\10.2.0\client_1\oci\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FDOKGORA_EXPORTS;GISSPATIAL_STATIC;_CRT_SECURE_NO_DEPRECATE;_FDO_3_1"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="true"
RuntimeTypeInfo="true"
@@ -218,7 +456,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="oraocci10.lib Fdo.lib GisCommon.lib GisGeometry.lib GisSpatial.lib GisNls.lib FdoCommon.lib KingOracleOverrides.lib"
- AdditionalLibraryDirectories="D:\oracle\product\10.2.0\client_1\instantclient_10_2\sdk\lib\msvc;..\..\..\..\Fdo\Unmanaged\lib\iwins\release;..\..\..\FdoCommon\lib\iwins\release;..\Overrides\Rel"
+ AdditionalLibraryDirectories="D:\oracle\product\10.2.0\client_1\instantclient_10_2\sdk\lib\msvc;"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\fdo\Unmanaged\lib\iwins\release";"D:\Development\MapGuide OpenSource\v1.0.2\OpenSource_FDO\providers\FdoCommon\lib\iwins\release";..\Overrides\Release_Fdo_3_1"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
TargetMachine="1"
@@ -247,7 +485,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Versioning $(ProjectName).dll"
- CommandLine="..\..\..\..\thirdparty\util\stampver\StampVer.exe -v"..\..\..\SubDoc\Providers.version" -f"0.4.4.0%PROVIDERS_VERSION%" $(OutDir)\$(ProjectName).dll
..\copyfdo2fdo.bat
"
+ CommandLine="..\..\..\..\thirdparty\util\stampver\StampVer.exe -v"..\..\..\SubDoc\Providers.version" -f"0.6.1.0%PROVIDERS_VERSION%" $(OutDir)\$(ProjectName).dll

"
/>
</Configuration>
</Configurations>
@@ -265,7 +503,7 @@
RelativePath="stdafx.cpp"
>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug_Fdo_3_2|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -273,7 +511,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Release_Fdo_3_2|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -281,13 +519,37 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="InstantClient_Release|Win32"
+ Name="InstantClient_Release_Fdo_3_2|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Fdo_3_1|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Fdo_3_1|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="InstantClient_Release_Fdo_3_1|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="stdafx.h"
Modified: trunk/Providers/KingOracle/src/Provider/KingOracleProvider.vcproj.HARIS4.Haris.user
===================================================================
--- trunk/Providers/KingOracle/src/Provider/KingOracleProvider.vcproj.HARIS4.Haris.user 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/KingOracleProvider.vcproj.HARIS4.Haris.user 2007-02-23 21:13:21 UTC (rev 2611)
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
- Version="8.00"
+ Version="8,00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
- Name="Debug|Win32"
+ Name="Debug_Fdo_3_2|Win32"
>
<DebugSettings
Command=""
@@ -34,7 +34,7 @@
/>
</Configuration>
<Configuration
- Name="Release|Win32"
+ Name="Release_Fdo_3_2|Win32"
>
<DebugSettings
Command=""
@@ -62,7 +62,7 @@
/>
</Configuration>
<Configuration
- Name="InstantClient_Release|Win32"
+ Name="InstantClient_Release_Fdo_3_2|Win32"
>
<DebugSettings
Command=""
@@ -89,5 +89,89 @@
MPIAcceptFilter=""
/>
</Configuration>
+ <Configuration
+ Name="Debug_Fdo_3_1|Win32"
+ >
+ <DebugSettings
+ Command=""
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="HARIS4"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release_Fdo_3_1|Win32"
+ >
+ <DebugSettings
+ Command=""
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="HARIS4"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="InstantClient_Release_Fdo_3_1|Win32"
+ >
+ <DebugSettings
+ Command=""
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="HARIS4"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
</Configurations>
</VisualStudioUserFile>
Modified: trunk/Providers/KingOracle/src/Provider/c_FdoOra_API.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_FdoOra_API.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_FdoOra_API.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -41,8 +41,8 @@
case oracle::occi::OCCI_SQLT_NUM: // NUMBER
case oracle::occi::OCCINUMBER: // NUMBER
- if( Scale > 0 ) FdoType = FdoDataType_Decimal;
- else FdoType = FdoDataType_Int32;
+ if( Scale == 0 ) FdoType = FdoDataType_Int32;
+ else FdoType = FdoDataType_Decimal;
break;
case oracle::occi::OCCI_SQLT_AFC: // char
@@ -81,67 +81,67 @@
{
switch( DataType )
{
- case FdoDataType_Boolean:
- OraType = oracle::occi::OCCISTRING;
- break;
-
- /// Represents unsigned 8-bit integers with values between 0 and 255.
- case FdoDataType_Byte:
- OraType = oracle::occi::OCCISTRING;
- break;
-
- /// Represents a date and time value.
- case FdoDataType_DateTime:
- OraType = oracle::occi::OCCIDATE;
- break;
-
- /// Represents values ranging from 1.0 x 10^-28 to approximately 7.9 x 10^28
- /// with 28-29 significant digits.
- case FdoDataType_Decimal:
- OraType = oracle::occi::OCCINUMBER;
- break;
-
- /// Represents a floating point value ranging from approximately 5.0
- /// x 10^-324 to 1.7 x 10^308 with a precision of 15-16 digits.
- case FdoDataType_Double:
- OraType = oracle::occi::OCCIDOUBLE;
- break;
-
- /// Represents signed 16-bit integers with values between -32768 and 32767.
- case FdoDataType_Int16:
- OraType = oracle::occi::OCCIINT;
- break;
-
- /// Represents signed 32-bit integers with values between -2147483648
- /// and 2147483647.
- case FdoDataType_Int32:
- OraType = oracle::occi::OCCIINT;
- break;
-
- /// Represents signed 64-bit integers with values
- /// between -9223372036854775808 and 9223372036854775807.
- case FdoDataType_Int64:
- OraType = oracle::occi::OCCINUMBER;
- break;
-
- /// Represents floating point values ranging from approximately 1.5 x 10^-45
- /// to 3.4 x 10^38, with a precision of 7 digits.
- case FdoDataType_Single:
- OraType = oracle::occi::OCCIFLOAT;
- break;
-
- /// Represents a Unicode character strings.
- case FdoDataType_String:
- OraType = oracle::occi::OCCISTRING;
- break;
-
- /// Represents a binary large object stored as a collection of bytes.
- case FdoDataType_BLOB:
- OraType = oracle::occi::OCCIBLOB;
- break;
-
- /// Represents a character large object stored as a collection of
- /// characters.
+ case FdoDataType_Boolean:
+ OraType = oracle::occi::OCCISTRING;
+ break;
+
+ /// Represents unsigned 8-bit integers with values between 0 and 255.
+ case FdoDataType_Byte:
+ OraType = oracle::occi::OCCISTRING;
+ break;
+
+ /// Represents a date and time value.
+ case FdoDataType_DateTime:
+ OraType = oracle::occi::OCCIDATE;
+ break;
+
+ /// Represents values ranging from 1.0 x 10^-28 to approximately 7.9 x 10^28
+ /// with 28-29 significant digits.
+ case FdoDataType_Decimal:
+ OraType = oracle::occi::OCCINUMBER;
+ break;
+
+ /// Represents a floating point value ranging from approximately 5.0
+ /// x 10^-324 to 1.7 x 10^308 with a precision of 15-16 digits.
+ case FdoDataType_Double:
+ OraType = oracle::occi::OCCIDOUBLE;
+ break;
+
+ /// Represents signed 16-bit integers with values between -32768 and 32767.
+ case FdoDataType_Int16:
+ OraType = oracle::occi::OCCIINT;
+ break;
+
+ /// Represents signed 32-bit integers with values between -2147483648
+ /// and 2147483647.
+ case FdoDataType_Int32:
+ OraType = oracle::occi::OCCIINT;
+ break;
+
+ /// Represents signed 64-bit integers with values
+ /// between -9223372036854775808 and 9223372036854775807.
+ case FdoDataType_Int64:
+ OraType = oracle::occi::OCCINUMBER;
+ break;
+
+ /// Represents floating point values ranging from approximately 1.5 x 10^-45
+ /// to 3.4 x 10^38, with a precision of 7 digits.
+ case FdoDataType_Single:
+ OraType = oracle::occi::OCCIFLOAT;
+ break;
+
+ /// Represents a Unicode character strings.
+ case FdoDataType_String:
+ OraType = oracle::occi::OCCISTRING;
+ break;
+
+ /// Represents a binary large object stored as a collection of bytes.
+ case FdoDataType_BLOB:
+ OraType = oracle::occi::OCCIBLOB;
+ break;
+
+ /// Represents a character large object stored as a collection of
+ /// characters.
case FdoDataType_CLOB:
OraType = oracle::occi::OCCICLOB;
break;
@@ -162,186 +162,186 @@
switch( DataValue->GetDataType() )
{
- case FdoDataType_Boolean:
- {
-
- if( DataValue->IsNull() )
- Statement->setNull(SqlParamNum,oracle::occi::OCCISTRING);
- else
- {
- FdoBooleanValue * boolval = (FdoBooleanValue*)DataValue;
- string val;
- if( boolval->GetBoolean() )
- val = "1";
- else
- val = "0";
- Statement->setString(SqlParamNum,val);
- }
- }
- break;
-
- /// Represents unsigned 8-bit integers with values between 0 and 255.
- case FdoDataType_Byte:
- {
-
- if( DataValue->IsNull() )
- Statement->setNull(SqlParamNum,oracle::occi::OCCISTRING);
- else
- {
- FdoByteValue * byteval = (FdoByteValue*)DataValue;
- char chstr[2];
- chstr[0] = byteval->GetByte();
- chstr[1] = 0;
- string val(chstr);
-
- Statement->setString(SqlParamNum,val);
- }
- }
- break;
-
- /// Represents a date and time value.
- case FdoDataType_DateTime:
- {
-
- if( DataValue->IsNull() )
- Statement->setNull(SqlParamNum,oracle::occi::OCCIDATE);
- else
- {
- FdoDateTimeValue * dateval = (FdoDateTimeValue*)DataValue;
-
- FdoDateTime date = dateval->GetDateTime();
- oracle::occi::Date val;
- val.setDate(date.year,date.month,date.day,date.hour,date.minute,date.seconds);
- Statement->setDate(SqlParamNum,val);
- }
- }
- break;
-
- /// Represents values ranging from 1.0 x 10^-28 to approximately 7.9 x 10^28
- /// with 28-29 significant digits.
- case FdoDataType_Decimal:
- {
-
- if( DataValue->IsNull() )
- Statement->setNull(SqlParamNum,oracle::occi::OCCINUMBER);
- else
- {
- FdoDecimalValue * dval = (FdoDecimalValue*)DataValue;
-
- oracle::occi::Number num;
- num = dval->GetDecimal();
- Statement->setNumber(SqlParamNum,num);
- }
- }
- break;
-
- /// Represents a floating point value ranging from approximately 5.0
- /// x 10^-324 to 1.7 x 10^308 with a precision of 15-16 digits.
- case FdoDataType_Double:
- {
-
- if( DataValue->IsNull() )
- Statement->setNull(SqlParamNum,oracle::occi::OCCIDOUBLE);
- else
- {
- FdoDoubleValue * dval = (FdoDoubleValue*)DataValue;
- Statement->setDouble(SqlParamNum,dval->GetDouble());
- }
- }
- break;
-
- /// Represents signed 16-bit integers with values between -32768 and 32767.
- case FdoDataType_Int16:
- {
-
- if( DataValue->IsNull() )
- Statement->setNull(SqlParamNum,oracle::occi::OCCIINT);
- else
- {
- FdoInt16Value * dval = (FdoInt16Value*)DataValue;
- Statement->setInt(SqlParamNum,dval->GetInt16());
- }
- }
- break;
-
- /// Represents signed 32-bit integers with values between -2147483648
- /// and 2147483647.
- case FdoDataType_Int32:
- {
-
- if( DataValue->IsNull() )
- Statement->setNull(SqlParamNum,oracle::occi::OCCIINT);
- else
- {
- FdoInt32Value * dval = (FdoInt32Value*)DataValue;
- Statement->setInt(SqlParamNum,dval->GetInt32());
- }
- }
- break;
-
- /// Represents signed 64-bit integers with values
- /// between -9223372036854775808 and 9223372036854775807.
- case FdoDataType_Int64:
- {
-
- if( DataValue->IsNull() )
- Statement->setNull(SqlParamNum,oracle::occi::OCCINUMBER);
- else
- {
- FdoInt64Value * dval = (FdoInt64Value*)DataValue;
-
- //long dval
-
- oracle::occi::Number num;
- num = (long)dval->GetInt64();
-
- Statement->setNumber(SqlParamNum,num);
- }
- }
- break;
-
- /// Represents floating point values ranging from approximately 1.5 x 10^-45
- /// to 3.4 x 10^38, with a precision of 7 digits.
- case FdoDataType_Single:
- {
-
- if( DataValue->IsNull() )
- Statement->setNull(SqlParamNum,oracle::occi::OCCIDOUBLE);
- else
- {
- FdoSingleValue * dval = (FdoSingleValue*)DataValue;
- Statement->setDouble(SqlParamNum,dval->GetSingle());
- }
- }
- break;
-
- /// Represents a Unicode character strings.
- case FdoDataType_String:
- {
-
- if( DataValue->IsNull() )
- Statement->setNull(SqlParamNum,oracle::occi::OCCISTRING);
- else
- {
- FdoStringValue * dval = (FdoStringValue*)DataValue;
-
- string sval;
- FdoStringP usval = dval->GetString();
- sval = usval;
- Statement->setString(SqlParamNum,sval);
- }
- }
- break;
-
- /// Represents a binary large object stored as a collection of bytes.
- case FdoDataType_BLOB:
- {
- Statement->setNull(SqlParamNum,oracle::occi::OCCIBLOB);
- }
- break;
-
- /// Represents a character large object stored as a collection of
- /// characters.
+ case FdoDataType_Boolean:
+ {
+
+ if( DataValue->IsNull() )
+ Statement->setNull(SqlParamNum,oracle::occi::OCCISTRING);
+ else
+ {
+ FdoBooleanValue * boolval = (FdoBooleanValue*)DataValue;
+ string val;
+ if( boolval->GetBoolean() )
+ val = "1";
+ else
+ val = "0";
+ Statement->setString(SqlParamNum,val);
+ }
+ }
+ break;
+
+ /// Represents unsigned 8-bit integers with values between 0 and 255.
+ case FdoDataType_Byte:
+ {
+
+ if( DataValue->IsNull() )
+ Statement->setNull(SqlParamNum,oracle::occi::OCCISTRING);
+ else
+ {
+ FdoByteValue * byteval = (FdoByteValue*)DataValue;
+ char chstr[2];
+ chstr[0] = byteval->GetByte();
+ chstr[1] = 0;
+ string val(chstr);
+
+ Statement->setString(SqlParamNum,val);
+ }
+ }
+ break;
+
+ /// Represents a date and time value.
+ case FdoDataType_DateTime:
+ {
+
+ if( DataValue->IsNull() )
+ Statement->setNull(SqlParamNum,oracle::occi::OCCIDATE);
+ else
+ {
+ FdoDateTimeValue * dateval = (FdoDateTimeValue*)DataValue;
+
+ FdoDateTime date = dateval->GetDateTime();
+ oracle::occi::Date val(c_OCCI_API::GetEnvironment(),date.year,date.month,date.day,date.hour,date.minute,date.seconds);
+ //val.setDate(date.year,date.month,date.day,date.hour,date.minute,date.seconds);
+ Statement->setDate(SqlParamNum,val);
+ }
+ }
+ break;
+
+ /// Represents values ranging from 1.0 x 10^-28 to approximately 7.9 x 10^28
+ /// with 28-29 significant digits.
+ case FdoDataType_Decimal:
+ {
+
+ if( DataValue->IsNull() )
+ Statement->setNull(SqlParamNum,oracle::occi::OCCINUMBER);
+ else
+ {
+ FdoDecimalValue * dval = (FdoDecimalValue*)DataValue;
+
+ oracle::occi::Number num;
+ num = dval->GetDecimal();
+ Statement->setNumber(SqlParamNum,num);
+ }
+ }
+ break;
+
+ /// Represents a floating point value ranging from approximately 5.0
+ /// x 10^-324 to 1.7 x 10^308 with a precision of 15-16 digits.
+ case FdoDataType_Double:
+ {
+
+ if( DataValue->IsNull() )
+ Statement->setNull(SqlParamNum,oracle::occi::OCCIDOUBLE);
+ else
+ {
+ FdoDoubleValue * dval = (FdoDoubleValue*)DataValue;
+ Statement->setDouble(SqlParamNum,dval->GetDouble());
+ }
+ }
+ break;
+
+ /// Represents signed 16-bit integers with values between -32768 and 32767.
+ case FdoDataType_Int16:
+ {
+
+ if( DataValue->IsNull() )
+ Statement->setNull(SqlParamNum,oracle::occi::OCCIINT);
+ else
+ {
+ FdoInt16Value * dval = (FdoInt16Value*)DataValue;
+ Statement->setInt(SqlParamNum,dval->GetInt16());
+ }
+ }
+ break;
+
+ /// Represents signed 32-bit integers with values between -2147483648
+ /// and 2147483647.
+ case FdoDataType_Int32:
+ {
+
+ if( DataValue->IsNull() )
+ Statement->setNull(SqlParamNum,oracle::occi::OCCIINT);
+ else
+ {
+ FdoInt32Value * dval = (FdoInt32Value*)DataValue;
+ Statement->setInt(SqlParamNum,dval->GetInt32());
+ }
+ }
+ break;
+
+ /// Represents signed 64-bit integers with values
+ /// between -9223372036854775808 and 9223372036854775807.
+ case FdoDataType_Int64:
+ {
+
+ if( DataValue->IsNull() )
+ Statement->setNull(SqlParamNum,oracle::occi::OCCINUMBER);
+ else
+ {
+ FdoInt64Value * dval = (FdoInt64Value*)DataValue;
+
+ //long dval
+
+ oracle::occi::Number num;
+ num = (long)dval->GetInt64();
+
+ Statement->setNumber(SqlParamNum,num);
+ }
+ }
+ break;
+
+ /// Represents floating point values ranging from approximately 1.5 x 10^-45
+ /// to 3.4 x 10^38, with a precision of 7 digits.
+ case FdoDataType_Single:
+ {
+
+ if( DataValue->IsNull() )
+ Statement->setNull(SqlParamNum,oracle::occi::OCCIDOUBLE);
+ else
+ {
+ FdoSingleValue * dval = (FdoSingleValue*)DataValue;
+ Statement->setDouble(SqlParamNum,dval->GetSingle());
+ }
+ }
+ break;
+
+ /// Represents a Unicode character strings.
+ case FdoDataType_String:
+ {
+
+ if( DataValue->IsNull() )
+ Statement->setNull(SqlParamNum,oracle::occi::OCCISTRING);
+ else
+ {
+ FdoStringValue * dval = (FdoStringValue*)DataValue;
+
+ string sval;
+ FdoStringP usval = dval->GetString();
+ sval = usval;
+ Statement->setString(SqlParamNum,sval);
+ }
+ }
+ break;
+
+ /// Represents a binary large object stored as a collection of bytes.
+ case FdoDataType_BLOB:
+ {
+ Statement->setNull(SqlParamNum,oracle::occi::OCCIBLOB);
+ }
+ break;
+
+ /// Represents a character large object stored as a collection of
+ /// characters.
case FdoDataType_CLOB:
{
Statement->setNull(SqlParamNum,oracle::occi::OCCICLOB);
@@ -373,8 +373,8 @@
} else
if( strcmpi(OraType,"NUMBER") == 0 )
{
- if( Scale > 0 ) FdoType = FdoDataType_Decimal;
- else FdoType = FdoDataType_Int32;
+ if( Scale == 0 ) FdoType = FdoDataType_Int32;
+ else FdoType = FdoDataType_Decimal;
isfdotype=true;
} else
if( strcmpi(OraType,"CHAR") == 0 )
@@ -458,7 +458,10 @@
{
scale = occi_rs->getInt(5);
}
- else scale = 0;
+ else
+ {
+ scale = -1;
+ }
if( !occi_rs->isNull(2) )
{
@@ -510,7 +513,7 @@
//FdoPtr<FdoFeatureSchemaCollection> g_FeatureSchemas(NULL);
//FdoPtr<FdoKgOraPhysicalSchemaMapping> g_PhysicalSchemaMapping(NULL);
-c_KgOraSchemaDesc* c_FdoOra_API::DescribeSchema(c_KgOraConnection* KgOraConn,const char* OraSchema)
+c_KgOraSchemaDesc* c_FdoOra_API::DescribeSchema(c_KgOraConnection* KgOraConn,const char* OraSchema,const char* KingFdoViews)
{
FdoPtr<FdoFeatureSchemaCollection> fschema=NULL;
@@ -522,9 +525,12 @@
fschema = FdoFeatureSchemaCollection::Create(NULL);
phschema = FdoKgOraPhysicalSchemaMapping::Create();
+ long aliasnum=0;
FdoPtr<c_KgOraSpatialContextCollection> sc_collection = new c_KgOraSpatialContextCollection();
-
+
+// Create FDO classes from tables in SDO_GEOM_METADATA
+{
FdoPtr<FdoFeatureSchema> schema = FdoFeatureSchema::Create(L"KingOra", L"");
fschema->Add(schema.p);
@@ -532,16 +538,13 @@
FdoPtr<FdoKgOraClassCollection> phys_classes = phschema->GetClasses();
- oracle::occi::Statement* occi_stm = NULL;
- oracle::occi::ResultSet* occi_rs = NULL;
+
+ oracle::occi::Statement* occi_stm = NULL;
try
{
- /* Query Oracle for geometry tables
- */
occi_stm = occi_conn->createStatement();
-
//occi_stm->setSQL("select owner, table_name,column_name,srid,diminfo from all_sdo_geom_metadata where owner=:1 order by owner,table_name");
//occi_stm->setString(1,"OSE");
@@ -572,6 +575,7 @@
*/
occi_stm->setSQL(
" select a.owner, a.table_name, a.column_name, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name, d.SDO_ROOT_MBR "
+ " ,NULL o1 ,NULL o2 ,NULL o3 ,NULL o4 ,NULL o5 ,NULL o6 ,NULL o7 ,NULL o8 ,NULL o9 ,NULL o10, NULL o111 ,NULL o12 "
" from all_tab_columns t, all_sdo_geom_metadata a "
" LEFT JOIN MDSYS.CS_SRS b ON a.srid = b.srid "
" LEFT JOIN ALL_SDO_INDEX_INFO c ON a.owner = c.table_owner and a.table_name = c.table_name "
@@ -595,7 +599,8 @@
*/
occi_stm->setSQL(
- " select a.owner, a.table_name, a.column_name, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name "
+ " select a.owner, a.table_name, a.column_name, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name, NULL SDO_ROOT_MBR "
+ " ,NULL o1 ,NULL o2 ,NULL o3 ,NULL o4 ,NULL o5 ,NULL o6 ,NULL o7 ,NULL o8 ,NULL o9 ,NULL o10, NULL o111 ,NULL o12 "
" from all_tab_columns t, all_sdo_geom_metadata a "
" LEFT JOIN MDSYS.CS_SRS b ON a.srid = b.srid "
" LEFT JOIN ALL_SDO_INDEX_INFO c ON a.table_name = c.table_name "
@@ -624,6 +629,7 @@
occi_stm->setSQL(
" select a.owner, a.table_name, a.column_name, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name, d.SDO_ROOT_MBR "
+ " ,NULL o1 ,NULL o2 ,NULL o3 ,NULL o4 ,NULL o5 ,NULL o6 ,NULL o7 ,NULL o8 ,NULL o9 ,NULL o10, NULL o111 ,NULL o12 "
" from all_tab_columns t, all_sdo_geom_metadata a "
" LEFT JOIN MDSYS.CS_SRS b ON a.srid = b.srid "
" LEFT JOIN ALL_SDO_INDEX_INFO c ON a.owner = c.table_owner and a.table_name = c.table_name "
@@ -645,7 +651,8 @@
);
*/
occi_stm->setSQL(
- " select a.owner, a.table_name, a.column_name, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name "
+ " select a.owner, a.table_name, a.column_name, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name, NULL SDO_ROOT_MBR "
+ " ,NULL o1 ,NULL o2 ,NULL o3 ,NULL o4 ,NULL o5 ,NULL o6 ,NULL o7 ,NULL o8 ,NULL o9 ,NULL o10, NULL o111 ,NULL o12 "
" from all_tab_columns t, all_sdo_geom_metadata a "
" LEFT JOIN MDSYS.CS_SRS b ON a.srid = b.srid "
" LEFT JOIN ALL_SDO_INDEX_INFO c ON a.table_name = c.table_name "
@@ -659,39 +666,330 @@
}
+
+
+ c_FdoOra_API::DescribeSchemaSQL(occi_conn,occi_stm,classes,phys_classes,sc_collection,aliasnum);
+
+
+ }
+ catch(FdoException* e)
+ {
+ FDO_SAFE_RELEASE(e);
+ if( occi_stm )
+ {
+ occi_conn->terminateStatement(occi_stm);
+ occi_stm=NULL;
+ }
+ }
+ catch(oracle::occi::SQLException& ea)
+ {
+ if( occi_stm )
+ {
+ occi_conn->terminateStatement(occi_stm);
+ occi_stm=NULL;
+ }
+ FdoStringP gstr = ea.what();
+ throw FdoException::Create( gstr );
+ }
+
+ if( occi_stm )
+ {
+ occi_conn->terminateStatement(occi_stm);
+ occi_stm=NULL;
+ }
+}
+// Create FDO classes from tables in KingFDOViews table
+if( KingFdoViews && *KingFdoViews )
+{
+ FdoPtr<FdoFeatureSchema> schema = FdoFeatureSchema::Create(L"KingFdoClass", L"");
+ fschema->Add(schema.p);
+
+ FdoPtr<FdoClassCollection> classes = schema->GetClasses();
+
+ FdoPtr<FdoKgOraClassCollection> phys_classes = phschema->GetClasses();
+
+
+ oracle::occi::Statement* occi_stm = NULL;
+ try
+ {
+ occi_stm = occi_conn->createStatement();
+
+
+
+ // For FDO classes created from FDO View Table (king metadata table)
+ // Oracle Schema connection parameter is irrelevant and not used
+ //if( !OraSchema || (*OraSchema == 0) )
+ {
+ if( KgOraConn->GetOracleMainVersion() >= 10 )
+ {
+ string sqlstr,sqljoin;
+
+ sqlstr = " select k.fdo_ora_owner, k.fdo_ora_name, k.fdo_ora_geomcolumn, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name, d.SDO_ROOT_MBR "
+ " ,k.fdo_class_name, k.fdo_srid, k.fdo_diminfo, k.fdo_cs_name, k.fdo_wktext, k.fdo_layer_gtype, k.fdo_sequence_name, k.fdo_identity, k.fdo_sdo_root_mbr "
+ " ,k.fdo_point_x_column ,k.fdo_point_y_column ,k.fdo_point_z_column ";
+
+ char sqlfrom[512];
+ sprintf(sqlfrom," FROM %s k ", KingFdoViews );
+
+ sqljoin = " LEFT JOIN all_sdo_geom_metadata a ON k.fdo_spatialtable_owner = a.owner and k.fdo_spatialtable_name = a.table_name and k.fdo_spatialtable_geomcolumn = a.column_name "
+ " LEFT JOIN MDSYS.CS_SRS b ON a.srid = b.srid "
+ " LEFT JOIN ALL_SDO_INDEX_INFO c ON a.owner = c.table_owner and a.table_name = c.table_name "
+ " LEFT JOIN ALL_SDO_INDEX_METADATA d ON c.sdo_index_owner = d.sdo_index_owner and c.index_name = d.sdo_index_name "
+ " LEFT JOIN all_sequences s on s.sequence_name = CONCAT(a.table_name,'_FDOSEQ') "
+ " order by k.fdo_ora_owner, k.fdo_ora_name ";
+
+ sqlstr = sqlstr + sqlfrom + sqljoin;
+ occi_stm->setSQL( sqlstr );
+ /*
+ occi_stm->setSQL(
+ " select k.fdo_ora_owner, k.fdo_ora_name, k.fdo_ora_geomcolumn, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name, d.SDO_ROOT_MBR "
+ " ,k.fdo_class_name, k.fdo_srid, k.fdo_diminfo, k.fdo_cs_name, k.fdo_wktext, k.fdo_layer_gtype, k.fdo_sequence_name, k.fdo_identity, k.fdo_sdo_root_mbr "
+ " ,k.fdo_point_x_column ,k.fdo_point_y_column ,k.fdo_point_z_column "
+ " from fdoclass k "
+ " LEFT JOIN all_sdo_geom_metadata a ON k.fdo_spatialtable_owner = a.owner and k.fdo_spatialtable_name = a.table_name and k.fdo_spatialtable_geomcolumn = a.column_name "
+ " LEFT JOIN MDSYS.CS_SRS b ON a.srid = b.srid "
+ " LEFT JOIN ALL_SDO_INDEX_INFO c ON a.owner = c.table_owner and a.table_name = c.table_name "
+ " LEFT JOIN ALL_SDO_INDEX_METADATA d ON c.sdo_index_owner = d.sdo_index_owner and c.index_name = d.sdo_index_name "
+ " LEFT JOIN all_sequences s on s.sequence_name = CONCAT(a.table_name,'_FDOSEQ') "
+ " order by k.fdo_ora_owner, k.fdo_ora_name "
+ );
+ */
+
+
+ }
+ else
+ {
+ string sqlstr,sqljoin;
+
+ sqlstr = " select k.fdo_ora_owner, k.fdo_ora_name, k.fdo_ora_geomcolumn, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name, NULL SDO_ROOT_MBR "
+ " ,k.fdo_class_name, k.fdo_srid, k.fdo_diminfo, k.fdo_cs_name, k.fdo_wktext, k.fdo_layer_gtype, k.fdo_sequence_name, k.fdo_identity, k.fdo_sdo_root_mbr "
+ " ,k.fdo_point_x_column ,k.fdo_point_y_column ,k.fdo_point_z_column ";
+
+ char sqlfrom[512];
+ sprintf(sqlfrom," FROM %s k ", KingFdoViews );
+
+ sqljoin = " LEFT JOIN all_sdo_geom_metadata a ON k.fdo_spatialtable_owner = a.owner and k.fdo_spatialtable_name = a.table_name and k.fdo_spatialtable_geomcolumn = a.column_name "
+ " LEFT JOIN MDSYS.CS_SRS b ON a.srid = b.srid "
+ " LEFT JOIN ALL_SDO_INDEX_INFO c ON a.table_name = c.table_name "
+ " LEFT JOIN ALL_SDO_INDEX_METADATA d ON c.sdo_index_owner = d.sdo_index_owner and c.index_name = d.sdo_index_name "
+ " LEFT JOIN all_sequences s on s.sequence_name = CONCAT(a.table_name,'_FDOSEQ') "
+ " order by k.fdo_ora_owner, k.fdo_ora_name ";
+
+ sqlstr = sqlstr + sqlfrom + sqljoin;
+ occi_stm->setSQL( sqlstr );
+
+ /*
+ occi_stm->setSQL(
+ " select k.fdo_ora_owner, k.fdo_ora_name, k.fdo_ora_geomcolumn, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name, NULL SDO_ROOT_MBR "
+ " ,k.fdo_class_name, k.fdo_srid, k.fdo_diminfo, k.fdo_cs_name, k.fdo_wktext, k.fdo_layer_gtype, k.fdo_sequence_name, k.fdo_identity, k.fdo_sdo_root_mbr "
+ " ,k.fdo_point_x_column ,k.fdo_point_y_column ,k.fdo_point_z_column "
+ " from fdoclass k "
+ " LEFT JOIN all_sdo_geom_metadata a ON k.fdo_spatialtable_owner = a.owner and k.fdo_spatialtable_name = a.table_name and k.fdo_spatialtable_geomcolumn = a.column_name "
+ " LEFT JOIN MDSYS.CS_SRS b ON a.srid = b.srid "
+ " LEFT JOIN ALL_SDO_INDEX_INFO c ON a.table_name = c.table_name "
+ " LEFT JOIN ALL_SDO_INDEX_METADATA d ON c.sdo_index_owner = d.sdo_index_owner and c.index_name = d.sdo_index_name "
+ " LEFT JOIN all_sequences s on s.sequence_name = CONCAT(a.table_name,'_FDOSEQ') "
+ " order by k.fdo_ora_owner, k.fdo_ora_name "
+ );
+ */
+ }
+ }
+ /*
+ else
+ {
+ if( KgOraConn->GetOracleMainVersion() >= 10 )
+ {
+ occi_stm->setSQL(
+ " select k.fdo_ora_owner, k.fdo_ora_name, k.fdo_ora_geomcolumn, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name, d.SDO_ROOT_MBR "
+ " ,k.fdo_class_name, k.fdo_srid, k.fdo_diminfo, k.fdo_cs_name, k.fdo_wktext, k.fdo_layer_gtype, k.fdo_sequence_name, k.fdo_identity, k.fdo_sdo_root_mbr "
+ " ,k.fdo_point_x_column ,k.fdo_point_y_column ,k.fdo_point_z_column "
+ " from fdoclass k "
+ " LEFT JOIN all_sdo_geom_metadata a ON k.fdo_spatialtable_owner = a.owner and k.fdo_spatialtable_name = a.table_name and k.fdo_spatialtable_geomcolumn = a.column_name "
+ " LEFT JOIN MDSYS.CS_SRS b ON a.srid = b.srid "
+ " LEFT JOIN ALL_SDO_INDEX_INFO c ON a.owner = c.table_owner and a.table_name = c.table_name "
+ " LEFT JOIN ALL_SDO_INDEX_METADATA d ON c.sdo_index_owner = d.sdo_index_owner and c.index_name = d.sdo_index_name "
+ " LEFT JOIN all_sequences s on s.sequence_name = CONCAT(a.table_name,'_FDOSEQ') "
+ " order by k.fdo_ora_owner, k.fdo_ora_name "
+ );
+ }
+ else
+ {
+ occi_stm->setSQL(
+ " select k.fdo_ora_owner, k.fdo_ora_name, k.fdo_ora_geomcolumn, a.srid, a.diminfo, b.CS_NAME, b.WKTEXT, c.index_name, d.sdo_layer_gtype, s.sequence_name, NULL SDO_ROOT_MBR "
+ " ,k.fdo_class_name, k.fdo_srid, k.fdo_diminfo, k.fdo_cs_name, k.fdo_wktext, k.fdo_layer_gtype, k.fdo_sequence_name, k.fdo_identity, k.fdo_sdo_root_mbr "
+ " ,k.fdo_point_x_column ,k.fdo_point_y_column ,k.fdo_point_z_column "
+ " from fdoclass k "
+ " LEFT JOIN all_sdo_geom_metadata a ON k.fdo_spatialtable_owner = a.owner and k.fdo_spatialtable_name = a.table_name and k.fdo_spatialtable_geomcolumn = a.column_name "
+ " LEFT JOIN MDSYS.CS_SRS b ON a.srid = b.srid "
+ " LEFT JOIN ALL_SDO_INDEX_INFO c ON a.table_name = c.table_name "
+ " LEFT JOIN ALL_SDO_INDEX_METADATA d ON c.sdo_index_owner = d.sdo_index_owner and c.index_name = d.sdo_index_name "
+ " LEFT JOIN all_sequences s on s.sequence_name = CONCAT(a.table_name,'_FDOSEQ') "
+ " order by k.fdo_ora_owner, k.fdo_ora_name "
+ );
+ }
+ //occi_stm->setString(1,OraSchema);
+
+ }
+ */
+
+ c_FdoOra_API::DescribeSchemaSQL(occi_conn,occi_stm,classes,phys_classes,sc_collection,aliasnum);
+ }
+ catch(FdoException* e)
+ {
+ FDO_SAFE_RELEASE(e);
+ if( occi_stm )
+ {
+ occi_conn->terminateStatement(occi_stm);
+ occi_stm=NULL;
+ }
+ }
+ catch(oracle::occi::SQLException& ea)
+ {
+ if( occi_stm )
+ {
+ occi_conn->terminateStatement(occi_stm);
+ occi_stm=NULL;
+ }
+
+ // Just ignore any errors
+
+ //FdoStringP gstr = ea.what();
+ //throw FdoException::Create( gstr );
+ }
+
+ if( occi_stm )
+ {
+ occi_conn->terminateStatement(occi_stm);
+ occi_stm=NULL;
+ }
+}
+
+ c_KgOraSchemaDesc* schemadata = c_KgOraSchemaDesc::Create();
+
+ schemadata->SetDesc(fschema,phschema,sc_collection);
+
+
+ return schemadata;
+}//end of c_KgOraConnection::DescribeSchema
+
+
+/*
+ Creates FDO classes and adds them into FdoClassCollection.
+
+ Classes are created based on records returned by sql statement 'OcciStm'.
+ SQL statement is different in two cases (but returned columns are same):
+ 1. SQL statement which combines tables from SDO_GEOM_METADATA with dat from spatial indexes, primarykeys etc..
+ 2. SQL statement which combines data from table 'FdoViews' with other data from spatial index or
+
+
+ Meaning of coulmns and they order as should returnd by SQL statement (OcciStm):
+
+ 1. Oracle Owner (varchar2, not null ) - oracle owner ftom table/view which is used for querying fdo class data
+ 2. Oracle Name (varchar2, not null ) - oracle name of table/view used to query fdo class data
+ 3. Oracle Geometry Column ( varchar2, null ) - oracle name of column used to retrieve geometry for fdo class,can be NULLL.
+
+ 4. SRID ( number, null ) - SRID coming from SDO_GEOM_METADATA or NULL
+ 5. Dimension list (SDO_DIM_INFO_ARRAY, null) - Dimension info coming from SDO_GEOM_METADATA or NULL
+
+ 6. CS Name ( varchar2 , null ) - Coordinate system name coming from SDO_GEOM_METADATA or NULL
+ 7. CS WkText ( varchar2 , null ) - Coordinate system well known text coming from SDO_GEOM_METADATA or NULL
+
+ 8. SpatialIndexName ( varchar2, null ) - name of spatial index created on table or null
+
+ 9. LayerGType (varchar2, null ) - coming from spatial index metadata or null
+
+ 10. SequenceName ( varchar2, null ) - name of Oracle sequence is defined which is used for inserting new rows
+
+ 11. MBR ( SDO_GEOMETRY, null ) - extent of geometry, comes from spatial index or null
+
+ < From FDOVIEWS Table >
+
+ 12. Override FDO Class Name ( varchar2, null ) - name of the class which will be used as fdo class
+
+ 13. Override SRID ( number, null ) - override srid
+
+ 14. Override Dimension list ( number, null ) - override srid
+
+ 15. Override CS Name ( varchar2 , null ) - Coordinate system name or NULL
+ 16. Override CS WkText ( varchar2 , null ) - Coordinate system or NULL
+
+ 17. Override LayerGType (varchar2, null ) - coming from spatial index metadata or null
+
+ 18. Override SequenceName ( varchar2, null ) - name of Oracle sequence is defined which is used for inserting new rows
+
+ 19. Override Identity Coolumns ( varchar2, null ) - list of columns to be used for as identiy for class
+
+ 20. Override MBR ( SDO_GEOMETRY, null ) - extent of geometry or null
+
+ 21. FDO_POINT_X_COLUMN (varchar2, null ) this column defines names of column with values for point geometry where values are stored as numbers in columns
+ 22. FDO_POINT_Y_COLUMN (varchar2, null ) x,y must be define to be used and "3. Oracle Geometry Column" must be NULL
+ 23. FDO_POINT_Z_COLUMN (varchar2, null ) if 3d point then it is defined
+
+*/
+
+void c_FdoOra_API::DescribeSchemaSQL(oracle::occi::Connection * OraConn,oracle::occi::Statement* OcciStm
+ ,FdoClassCollection* FdoClasses,FdoKgOraClassCollection* PhysClasses
+ ,c_KgOraSpatialContextCollection* SC_Collection,long& AliasNum )
+{
+
+ oracle::occi::ResultSet* occi_rs = NULL;
+ try
+ {
+ /* Query Oracle for geometry tables
+ */
- occi_stm->setPrefetchRowCount(50);
- occi_rs = occi_stm->executeQuery();
+ OcciStm->setPrefetchRowCount(50);
+ occi_rs = OcciStm->executeQuery();
bool ora_srid_isnull;
- string ora_tablename,ora_colname,ora_tableowner,ora_fdo_classname,ora_index_name;
+ string ora_tablename,ora_geom_colname,ora_tableowner,ora_fdo_classname,ora_index_name;
oracle::occi::Number ora_srid;
- SDO_GEOMETRY *ora_geom;
+ SDO_GEOMETRY *ora_mbr;
string ora_coord_sys_name,ora_coord_sys_wktext,ora_layer_gtype;
string ora_fullname,ora_sequence_name;
+ // override's
+ string override_fdo_classname;
+ bool override_srid_isnull;
+ oracle::occi::Number override_srid;
+ SDO_GEOMETRY *override_mbr;
+ string override_identity,override_sequence_name;
+ string override_coord_sys_name,override_coord_sys_wktext,override_layer_gtype;
+ string override_point_x_col,override_point_y_col,override_point_z_col;
+
+ occi_rs->setMaxColumnSize(12,512);
+ occi_rs->setMaxColumnSize(13,512);
+ occi_rs->setMaxColumnSize(14,512);
+ occi_rs->setMaxColumnSize(15,512);
+ occi_rs->setMaxColumnSize(16,512);
+ occi_rs->setMaxColumnSize(17,512);
+ occi_rs->setMaxColumnSize(18,512);
+ occi_rs->setMaxColumnSize(19,512);
+ occi_rs->setMaxColumnSize(20,512);
+ occi_rs->setMaxColumnSize(21,512);
+ occi_rs->setMaxColumnSize(22,512);
+ occi_rs->setMaxColumnSize(23,512);
-
while( occi_rs->next() != oracle::occi::ResultSet::END_OF_FETCH )
{
ora_tableowner = occi_rs->getString(1);
ora_tablename = occi_rs->getString(2);
- ora_colname = occi_rs->getString(3);
+ ora_geom_colname = occi_rs->getString(3);
// check if dot is in table or column name
// in thisversion of rpovider skip those tables because fdo doesn't allow dots in names
// TODO: change table name or column name so it doen't have dots
- if( (ora_tablename.find(".") != string::npos) || (ora_colname.find(".") != string::npos) )
+ if( (ora_tablename.find(".") != string::npos) || (ora_geom_colname.find(".") != string::npos) )
{
continue;
}
-
+
ora_srid_isnull = occi_rs->isNull(4);
if( !ora_srid_isnull ) ora_srid = occi_rs->getNumber(4);
else ora_srid = 0;
- OCCI_STD_NAMESPACE::vector< SDO_DIM_ELEMENT* > dimlist;
- oracle::occi::getVector(occi_rs,5,dimlist);
+ OCCI_STD_NAMESPACE::vector< SDO_DIM_ELEMENT* > ora_dimlist;
+ if( !occi_rs->isNull(5) ) oracle::occi::getVector(occi_rs,5,ora_dimlist);
ora_coord_sys_name = occi_rs->getString(6);
ora_coord_sys_wktext = occi_rs->getString(7);
@@ -702,15 +1000,45 @@
ora_sequence_name = occi_rs->getString(10);
-
- if( ( KgOraConn->GetOracleMainVersion() >= 10 ) && (!occi_rs->isNull(11) ) )
- ora_geom = (SDO_GEOMETRY*)occi_rs->getObject(11); // oracle is 1 based - our index is 0 based
+ if( !occi_rs->isNull(11) )
+ ora_mbr = (SDO_GEOMETRY*)occi_rs->getObject(11);
else
- ora_geom = NULL;
- if(ora_geom )
+ ora_mbr = NULL;
+ if(ora_mbr )
{
}
+ override_fdo_classname = occi_rs->getString(12); // 12. Override FDO Class Name ( varchar2, null ) - name of the class which will be used as fdo class
+
+ override_srid_isnull = occi_rs->isNull(13); // 13. Override SRID ( number, null ) - override srid
+ if( !override_srid_isnull ) override_srid = occi_rs->getNumber(13);
+ else override_srid = 0;
+
+ OCCI_STD_NAMESPACE::vector< SDO_DIM_ELEMENT* > override_dimlist;
+ if( !occi_rs->isNull(14) )
+ oracle::occi::getVector(occi_rs,14,override_dimlist); // 14. Override Dimension list ( number, null ) - override srid
+
+ override_coord_sys_name = occi_rs->getString(15); // 15. Override CS Name ( varchar2 , null ) - Coordinate system name or NULL
+ override_coord_sys_wktext = occi_rs->getString(16); // 16. Override CS WkText ( varchar2 , null ) - Coordinate system or NULL
+
+ override_layer_gtype = occi_rs->getString(17); // 17. Override LayerGType (varchar2, null ) - coming from spatial index metadata or null
+
+ override_sequence_name = occi_rs->getString(18); // 18. Override SequenceName ( varchar2, null ) - name of Oracle sequence is defined which is used for inserting new rows
+
+ override_identity = occi_rs->getString(19); // 19. Override Identity Coolumns ( varchar2, null ) - list of columns to be used for as identiy for class
+
+ if( !occi_rs->isNull(20) ) // 20. Override MBR ( SDO_GEOMETRY, null ) - extent of geometry or null
+ override_mbr = (SDO_GEOMETRY*)occi_rs->getObject(20);
+ else
+ override_mbr = NULL;
+
+ override_point_x_col = occi_rs->getString(21); //21. FDO_POINT_X_COLUMN (varchar2, null ) this column defines names of column with values for point geometry where values are stored as numbers in columns
+ override_point_y_col = occi_rs->getString(22); //22. FDO_POINT_Y_COLUMN (varchar2, null ) x,y must be define to be used and "3. Oracle Geometry Column" must be NULL
+ override_point_z_col = occi_rs->getString(23); //23. FDO_POINT_Z_COLUMN (varchar2, null ) if 3d point then it is defined
+
+
+
+
c_KgOraSridDesc orasriddesc;
orasriddesc.m_OraSrid = (long)ora_srid;
@@ -721,9 +1049,8 @@
FdoPtr<c_KgOraSpatialContext> spatial_context;
if( (long)ora_srid >= 0 )
{
- //FdoStringP cname = ora_coord_sys_name.c_str();
FdoStringP cname = FdoStringP::Format(L"OracleSrid%ld",(long)ora_srid);
- spatial_context = sc_collection->FindItem(cname);
+ spatial_context = SC_Collection->FindItem(cname);
if( !spatial_context )
{
spatial_context = new c_KgOraSpatialContext();
@@ -737,10 +1064,10 @@
spatial_context->SetOraSridDesc(orasriddesc);
- long dimcount = dimlist.size();
+ long dimcount = ora_dimlist.size();
for(long ind=0;ind<dimcount;ind++)
{
- SDO_DIM_ELEMENT * dimelem = dimlist[ind];
+ SDO_DIM_ELEMENT * dimelem = ora_dimlist[ind];
string dimname = dimelem->getSdo_dimname();
double tol = dimelem->getSdo_tolerance();
@@ -748,7 +1075,7 @@
double ub = (double)dimelem->getSdo_ub();
}
- sc_collection->Insert(0,spatial_context);
+ SC_Collection->Insert(0,spatial_context);
}
}
@@ -756,31 +1083,30 @@
{
// this is no coordinate system
// then I use DEFAULT spatial context
- if( ora_geom )
+ if( ora_mbr )
{
- spatial_context = sc_collection->FindItem(D_SPATIALCONTEXT_DEFAULT_NAME);
-
+ spatial_context = SC_Collection->FindItem(D_SPATIALCONTEXT_DEFAULT_NAME);
}
}
// Now set extents for spatial context
double minx,miny,maxx,maxy;
- bool is_extent = false;
bool isminmax = false;
if( c_Ora_API::IsGeodeticCoordSystem(ora_coord_sys_wktext.c_str())
||
- (KgOraConn->GetOracleMainVersion() < 10)
+ (ora_mbr == NULL)
+ //(KgOraConn->GetOracleMainVersion() < 10)
)
{
// read extents from user_sdo_geom_metada
- if( dimlist.size() >= 2 )
+ if( ora_dimlist.size() >= 2 )
{
SDO_DIM_ELEMENT * dimelem;
- dimelem = dimlist[0];
+ dimelem = ora_dimlist[0];
minx = (double)dimelem->getSdo_lb();
maxx = (double)dimelem->getSdo_ub();
- dimelem = dimlist[1];
+ dimelem = ora_dimlist[1];
miny = (double)dimelem->getSdo_lb();
maxy = (double)dimelem->getSdo_ub();
@@ -790,42 +1116,42 @@
else
{
// this is
- if( ora_geom )
+ if( ora_mbr )
{
// extend
// ora_geom should be of type 2003 elem_info_array (1,1003,3)
// and 4 ordinates for lower/upper bounds
#ifdef _DEBUG
- long gtype = (long)ora_geom->getSdo_gtype();
+ long gtype = (long)ora_mbr->getSdo_gtype();
long ei;
- for(int ind=0;ind<ora_geom->getSdo_elem_info().size();ind++)
+ for(int ind=0;ind<ora_mbr->getSdo_elem_info().size();ind++)
{
- ei = (long)ora_geom->getSdo_elem_info()[ind];
+ ei = (long)ora_mbr->getSdo_elem_info()[ind];
}
double dval;
- for(int ind=0;ind<ora_geom->getSdo_ordinates().size();ind++)
+ for(int ind=0;ind<ora_mbr->getSdo_ordinates().size();ind++)
{
- dval = (double)ora_geom->getSdo_ordinates()[ind];
+ dval = (double)ora_mbr->getSdo_ordinates()[ind];
}
#endif
- if( ( (long)ora_geom->getSdo_gtype() == 2003) && ((long)ora_geom->getSdo_elem_info()[1] == 1003) )
+ if( ( (long)ora_mbr->getSdo_gtype() == 2003) && ((long)ora_mbr->getSdo_elem_info()[1] == 1003) )
{
- minx = (double)ora_geom->getSdo_ordinates()[0];
- miny = (double)ora_geom->getSdo_ordinates()[1];
- maxx = (double)ora_geom->getSdo_ordinates()[2];
- maxy = (double)ora_geom->getSdo_ordinates()[3];
+ minx = (double)ora_mbr->getSdo_ordinates()[0];
+ miny = (double)ora_mbr->getSdo_ordinates()[1];
+ maxx = (double)ora_mbr->getSdo_ordinates()[2];
+ maxy = (double)ora_mbr->getSdo_ordinates()[3];
isminmax = true;
}
else
{
- if( ( (long)ora_geom->getSdo_gtype() == 3003) && ((long)ora_geom->getSdo_elem_info()[1] == 1003) )
+ if( ( (long)ora_mbr->getSdo_gtype() == 3003) && ((long)ora_mbr->getSdo_elem_info()[1] == 1003) )
{
- minx = (double)ora_geom->getSdo_ordinates()[0];
- miny = (double)ora_geom->getSdo_ordinates()[1];
- maxx = (double)ora_geom->getSdo_ordinates()[3];
- maxy = (double)ora_geom->getSdo_ordinates()[4];
+ minx = (double)ora_mbr->getSdo_ordinates()[0];
+ miny = (double)ora_mbr->getSdo_ordinates()[1];
+ maxx = (double)ora_mbr->getSdo_ordinates()[3];
+ maxy = (double)ora_mbr->getSdo_ordinates()[4];
isminmax = true;
}
@@ -844,27 +1170,46 @@
// Delete ora objects as there are not needed any more
- if(ora_geom )
+ if(ora_mbr )
{
- delete ora_geom;
+ delete ora_mbr;
}
- for( int i=0;i<dimlist.size();i++)
+ for( int i=0;i<ora_dimlist.size();i++)
{
- if( dimlist[i] ) delete dimlist[i];
+ if( ora_dimlist[i] ) delete ora_dimlist[i];
}
- dimlist.clear();
+ ora_dimlist.clear();
+ if(override_mbr )
+ {
+ delete override_mbr;
+ }
+ for( int i=0;i<override_dimlist.size();i++)
+ {
+ if( override_dimlist[i] ) delete override_dimlist[i];
+ }
+ override_dimlist.clear();
- ora_fullname = ora_tableowner + "." + ora_tablename;
- ora_fdo_classname = ora_tableowner + "~" + ora_tablename + "~" + ora_colname;
+ if( ora_tableowner.length() > 0 )
+ ora_fullname = ora_tableowner + "." + ora_tablename;
+ else
+ ora_fullname = ora_tablename;
+
+ ora_fdo_classname = ora_tableowner + "~" + ora_tablename + "~" + ora_geom_colname;
+
FdoStringP w_fdo_classname = ora_fdo_classname.c_str();
+ if( override_fdo_classname.length() > 0 )
+ {
+ w_fdo_classname = override_fdo_classname.c_str();
+ }
+
// check if class already exist
// the previous sql can return multiple rows for same table.column because of multiple indexes on same column
// so I need to check not to duplicate classes
- if( !classes->FindItem( w_fdo_classname ) )
+ if( !FdoClasses->FindItem( w_fdo_classname ) )
{
FdoPtr<FdoFeatureClass> fc = FdoFeatureClass::Create(w_fdo_classname, L"");
@@ -873,53 +1218,117 @@
phys_class->SetName( w_fdo_classname );
phys_class->SetOracleFullTableName( FdoStringP(ora_fullname.c_str()) );
- alias_num++;
- phys_class->SetOraTableAliasNum( alias_num );
+ AliasNum++;
+ phys_class->SetOraTableAliasNum( AliasNum );
FdoPtr<FdoPropertyDefinitionCollection> pdc = fc->GetProperties();
- FdoPtr<FdoGeometricPropertyDefinition> gpd = FdoGeometricPropertyDefinition::Create(FdoStringP(ora_colname.c_str()), L"");
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ // Create Geometry Property
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ //
+ // Define Layer Geometry Type
+ //
FdoInt32 fdo_geom_type = FdoGeometricType_Point|FdoGeometricType_Curve|FdoGeometricType_Surface;
- if( (ora_layer_gtype.compare("POINT")==0) || (ora_layer_gtype.compare("MULTIPOINT")==0) )
+
+ // check if layer type has been override
+ string comb_layer_gtype;
+ comb_layer_gtype = ora_layer_gtype;
+ if( override_layer_gtype.length() > 0 ) comb_layer_gtype = override_layer_gtype;
+
+ if( (comb_layer_gtype.compare("POINT")==0) || (comb_layer_gtype.compare("MULTIPOINT")==0) )
{
fdo_geom_type = FdoGeometricType_Point;
}
else
{
- if( (ora_layer_gtype.compare("LINE")==0) || (ora_layer_gtype.compare("MULTILINE")==0)
- || (ora_layer_gtype.compare("CURVE")==0) || (ora_layer_gtype.compare("MULTICURVE")==0)
+ if( (comb_layer_gtype.compare("LINE")==0) || (comb_layer_gtype.compare("MULTILINE")==0)
+ || (comb_layer_gtype.compare("CURVE")==0) || (comb_layer_gtype.compare("MULTICURVE")==0)
)
{
fdo_geom_type = FdoGeometricType_Curve;
}
else
{
- if( (ora_layer_gtype.compare("POLYGON")==0) || (ora_layer_gtype.compare("MULTIPOLYGON")==0) )
+ if( (comb_layer_gtype.compare("POLYGON")==0) || (comb_layer_gtype.compare("MULTIPOLYGON")==0) )
{
fdo_geom_type = FdoGeometricType_Surface;
}
}
}
- gpd->SetGeometryTypes(fdo_geom_type);
+ if( ora_geom_colname.length() > 0 )
+ {
+ FdoPtr<FdoGeometricPropertyDefinition> gpd = FdoGeometricPropertyDefinition::Create(FdoStringP(ora_geom_colname.c_str()), L"");
- if( spatial_context )
+ gpd->SetGeometryTypes(fdo_geom_type);
+
+ if( spatial_context )
+ {
+ gpd->SetSpatialContextAssociation( spatial_context->GetName() );
+ }
+
+ pdc->Add(gpd);
+
+ fc->SetGeometryProperty(gpd);
+ }
+ else
{
- gpd->SetSpatialContextAssociation( spatial_context->GetName() );
+ // Geometry property is not defined - check if x,y columns are
+ if( (override_point_x_col.length() > 0) && (override_point_y_col.length() > 0) )
+ {
+ FdoStringP pointproperty = L"KING_FDO_POINT";
+ FdoPtr<FdoGeometricPropertyDefinition> gpd = FdoGeometricPropertyDefinition::Create(pointproperty, L"");
+
+ fdo_geom_type = FdoGeometricType_Point;
+ gpd->SetGeometryTypes(fdo_geom_type);
+
+ if( spatial_context )
+ {
+ gpd->SetSpatialContextAssociation( spatial_context->GetName() );
+ }
+
+ pdc->Add(gpd);
+
+ fc->SetGeometryProperty(gpd);
+
+ FdoStringP xcol = override_point_x_col.c_str();
+ FdoStringP ycol = override_point_y_col.c_str();
+ FdoStringP zcol = override_point_z_col.c_str();
+ phys_class->SetPointGeometry(pointproperty,xcol,ycol,zcol);
+ }
}
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ // Add other non-geometry sttributes from table
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ DescribeTableProperties(OraConn,ora_tableowner.c_str(),ora_tablename.c_str(),pdc);
- pdc->Add(gpd);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ // Check for primary keys
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ vector<string> pcols;
- fc->SetGeometryProperty(gpd);
-
- /* Query table column names */
- //DescribeTableProperties(m_OcciConnectionUserName.c_str(),ora_tablename.c_str(),pdc);
- DescribeTableProperties(occi_conn,ora_tableowner.c_str(),ora_tablename.c_str(),pdc);
-
-
- /* Check for primary keys */
-
- vector<string> pcols;
- c_OCCI_API::GetTablePkeyColumns(occi_conn,ora_tableowner.c_str(),ora_tablename.c_str(),pcols);
+ // ckeck for user defined column for identity
+ // if defined use it - if not look for primary keys on table
+ if( override_identity.length() > 0 )
+ {
+ // transfering from string to FdoStrinCollection and then back to string
+ // this was written in a hurry - could be better
+ FdoPtr<FdoStringCollection> strcol = FdoStringCollection::Create(override_identity.c_str(),L",");
+ long cnt = strcol->GetCount();
+ for(long ind=0;ind<cnt;ind++)
+ {
+ FdoStringP fdostr = strcol->GetString(ind);
+ string ss;
+ ss = fdostr;
+ pcols.push_back(ss);
+ }
+ }
+ else
+ {
+ c_OCCI_API::GetTablePkeyColumns(OraConn,ora_tableowner.c_str(),ora_tablename.c_str(),pcols);
+ }
if( pcols.size() > 0 )
{
bool isidentity_int=true;
@@ -952,8 +1361,7 @@
{
FdoStringP fdostr = ora_sequence_name.c_str();
phys_class->SetUseSequenceForIdentity(fdostr);
- }
-
+ }
}
else
{
@@ -963,12 +1371,11 @@
{
FdoPtr<FdoDataPropertyDefinitionCollection> ic = fc->GetIdentityProperties();
ic->Add( entid );
- }
-
+ }
}
- classes->Add(fc);
- phys_classes->Add( phys_class );
+ FdoClasses->Add(fc);
+ PhysClasses->Add( phys_class );
}
}
@@ -976,37 +1383,25 @@
//g_FeatureSchemas = FDO_SAFE_ADDREF(m_FeatureSchemas.p);
//g_PhysicalSchemaMapping = FDO_SAFE_ADDREF(m_PhysicalSchemaMapping.p);
- occi_stm->closeResultSet(occi_rs);
- occi_conn->terminateStatement (occi_stm);
+ OcciStm->closeResultSet(occi_rs);
+
}
catch(oracle::occi::SQLException& ea)
{
- if( occi_stm )
+ if( OcciStm )
{
if( occi_rs )
{
- occi_stm->closeResultSet(occi_rs);
+ OcciStm->closeResultSet(occi_rs);
occi_rs=NULL;
}
- occi_conn->terminateStatement(occi_stm);
- occi_stm=NULL;
+
}
FdoStringP gstr = ea.what();
throw FdoException::Create( gstr );
}
-
- c_KgOraSchemaDesc* schemadata = c_KgOraSchemaDesc::Create();
-
- schemadata->SetDesc(fschema,phschema,sc_collection);
-
+}//end of c_FdoOra_API::DescribeSchemaSQL
-
-
- return schemadata;
-}//end of c_KgOraConnection::DescribeSchema
-
-
-
bool c_FdoOra_API::FdoPropertyToOraDataType(FdoPropertyDefinition* Property,FdoStringP& OraType)
{
switch( Property->GetPropertyType() )
@@ -1052,14 +1447,14 @@
OraType = "VARCHAR(5)";
break;
- case FdoDataType_Int16:
- OraType = "NUMBER(10,0)";
- break;
-
- case FdoDataType_Int32:
- OraType = "NUMBER(10,0)";
- break;
-
+ case FdoDataType_Int16:
+ OraType = "NUMBER(10,0)";
+ break;
+
+ case FdoDataType_Int32:
+ OraType = "NUMBER(10,0)";
+ break;
+
case FdoDataType_Int64:
OraType = "NUMBER(10,0)";
break;
Modified: trunk/Providers/KingOracle/src/Provider/c_FdoOra_API.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_FdoOra_API.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_FdoOra_API.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -25,7 +25,7 @@
public:
~c_FdoOra_API(void);
- static c_KgOraSchemaDesc* c_FdoOra_API::DescribeSchema(c_KgOraConnection* KgOraConn,const char* OraSchema);
+ static c_KgOraSchemaDesc* c_FdoOra_API::DescribeSchema(c_KgOraConnection* KgOraConn,const char* OraSchema,const char* KingFdoViews);
static bool c_FdoOra_API::OraTypeToFdoDataType(const char* OraType,int Scale,int Length,FdoDataType & FdoType);
static bool OraTypeToFdoDataType(oracle::occi::Type OraType,int Scale,int Length,FdoDataType & FdoType);
@@ -36,6 +36,8 @@
static bool SetOracleStatementData(oracle::occi::Statement* Statement,int SqlParamNum,FdoDataValue* DataValue);
protected:
+ static void c_FdoOra_API::DescribeSchemaSQL(oracle::occi::Connection * OraConn,oracle::occi::Statement* OraStm
+ ,FdoClassCollection* FdoClasses,FdoKgOraClassCollection* PhysClasses,c_KgOraSpatialContextCollection* SC_Collection,long& AliasNum);
static bool DescribeTableProperties(oracle::occi::Connection * OcciConnection,const char*Schema,const char*TableName,FdoPropertyDefinitionCollection* PropCollection);
};
Modified: trunk/Providers/KingOracle/src/Provider/c_FgfToSdoGeom.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_FgfToSdoGeom.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_FgfToSdoGeom.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -177,7 +177,7 @@
fgf_coorddim = *fbuff++;
OraDim(fgf_coorddim);
- AddOrdinates(fbuff,1,1,0); // Etype 1 Interp 0
+ AddOrdinates(fbuff,1,1,1); // Etype 1 Interp 0
}
break;
Modified: trunk/Providers/KingOracle/src/Provider/c_FgfToSdoGeom.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_FgfToSdoGeom.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_FgfToSdoGeom.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -1,18 +1,18 @@
-/*
-* Copyright (C) 2006 SL-King d.o.o
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of version 2.1 of the GNU Lesser
-* General Public License as published by the Free Software Foundation.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+/*
+* Copyright (C) 2006 SL-King d.o.o
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of version 2.1 of the GNU Lesser
+* General Public License as published by the Free Software Foundation.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _c_FgfToSdoGeom_h
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraApplySchema.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraApplySchema.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraApplySchema.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -92,7 +92,7 @@
/// Returns true if elements states will be ignored, false otherwise.
///
///
-GisBoolean c_KgOraApplySchema::GetIgnoreStates()
+FdoBoolean c_KgOraApplySchema::GetIgnoreStates()
{
return m_IngoreStates;
}
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraApplySchema.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraApplySchema.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraApplySchema.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -81,7 +81,7 @@
/// Returns true if elements states will be ignored, false otherwise.
///
///
- FDOKGORA_API virtual GisBoolean GetIgnoreStates();
+ FDOKGORA_API virtual FdoBoolean GetIgnoreStates();
/// \brief
/// Changes the handling of element states by Execute().
@@ -96,7 +96,7 @@
/// \return
/// Returns nothing
///
- FDOKGORA_API virtual void SetIgnoreStates( GisBoolean ignoreStates );
+ FDOKGORA_API virtual void SetIgnoreStates( FdoBoolean ignoreStates );
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraCommandCapabilities.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraCommandCapabilities.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraCommandCapabilities.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -43,7 +43,7 @@
/// \return
/// Returns the list of commands
///
- FDOKGORA_API virtual GisInt32* GetCommands(GisInt32& Size);
+ FDOKGORA_API virtual FdoInt32* GetCommands(FdoInt32& Size);
/// \brief
/// Determines if commands support parameterization.
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraConnection.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraConnection.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraConnection.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -217,7 +217,7 @@
connDict->UpdateFromConnectionString(m_ConnectionString);
}
else
- throw GisException::Create (NlsMsgGet(M_KGORA_CONNECTION_ALREADY_OPEN, "The connection is already open."));
+ throw FdoException::Create (NlsMsgGet(M_KGORA_CONNECTION_ALREADY_OPEN, "The connection is already open."));
}
/// <summary>Gets an FdoIConnectionInfo interface that can be used to interrogate and set connection properties.</summary>
@@ -257,7 +257,7 @@
void c_KgOraConnection::SetConnectionTimeout (FdoInt32 value)
{
D_KGORA_ELOG_WRITE("c_KgOraConnection::SetConnectionTimeout ");
- throw GisException::Create (NlsMsgGet(M_KGORA_CONNECTION_TIMEOUT_UNSUPPORTED, "Connection timeout is not supported."));
+ throw FdoException::Create (NlsMsgGet(M_KGORA_CONNECTION_TIMEOUT_UNSUPPORTED, "Connection timeout is not supported."));
}
@@ -277,7 +277,11 @@
if (GetConnectionState() == FdoConnectionState_Open)
{
D_KGORA_ELOG_WRITE("c_KgOraConnection::Open Exception: Already open");
- throw GisException::Create(GisException::NLSGetMessage(GIS_NLSID(GIS_103_CONNECTION_ALREADY_OPEN)));
+ #ifdef _FDO_3_1
+ throw GisException::Create(GisException::NLSGetMessage(FDO_NLSID(FDO_103_CONNECTION_ALREADY_OPEN)));
+ #else
+ throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_103_CONNECTION_ALREADY_OPEN)));
+ #endif
}
if( !c_OCCI_API::IsInit() )
@@ -294,6 +298,7 @@
FdoStringP password = dictionary->GetProperty (D_CONN_PROPERTY_PASSWORD);
FdoStringP service = dictionary->GetProperty (D_CONN_PROPERTY_SERVICE_NAME);
FdoStringP oraschema = dictionary->GetProperty (D_CONN_PROPERTY_ORACLE_SCHEMA);
+ FdoStringP fdoviewstable = dictionary->GetProperty (D_CONN_PROPERTY_KING_FDO_CLASS);
//FdoStringP username = dictionary->GetProperty (L"Username");
@@ -310,6 +315,7 @@
m_OraConnectionPassword = password;
m_OraConnectionDbLink = service;
m_OraSchemaName = oraschema.Upper();
+ m_FdoViewsTable = fdoviewstable.Upper();
if( !c_Ora_API::GetOracleVersion(m_OcciConnection,m_OracleMainVersion,m_OracleSubVersion) )
@@ -374,7 +380,7 @@
catch(oracle::occi::SQLException& ea)
{
FdoStringP gstr = ea.getMessage().c_str();
- throw GisException::Create( gstr );
+ throw FdoException::Create( gstr );
}
// Connection is now closed:
m_ConnectionState = FdoConnectionState_Closed;
@@ -390,7 +396,7 @@
FdoITransaction* c_KgOraConnection::BeginTransaction ()
{
D_KGORA_ELOG_WRITE("c_KgOraConnection::BeginTransaction ");
- throw GisException::Create(NlsMsgGet(M_KGORA_CONNECTION_TRANSACTIONS_NOT_SUPPORTED, "King.Oracle Provider does not support transactions."));
+ throw FdoException::Create(NlsMsgGet(M_KGORA_CONNECTION_TRANSACTIONS_NOT_SUPPORTED, "King.Oracle Provider does not support transactions."));
}
/// <summary>Creates and returns the specified type of command object associated with
@@ -404,7 +410,7 @@
D_KGORA_ELOG_WRITE2("c_KgOraConnection::CreateCommand %ld '%s'",(long)CommandId,(const char*)FdoCommonMiscUtil::FdoCommandTypeToString (CommandId));
if ((GetConnectionState() == FdoConnectionState_Closed) || (GetConnectionState() == FdoConnectionState_Pending))
- throw GisException::Create(NlsMsgGet(M_KGORA_CONNECTION_INVALID, "Connection is invalid."));
+ throw FdoException::Create(NlsMsgGet(M_KGORA_CONNECTION_INVALID, "Connection is invalid."));
switch (CommandId)
{
case FdoCommandType_Select:
@@ -461,7 +467,11 @@
{
D_KGORA_ELOG_WRITE2("c_KgOraConnection::CreateCommand Unsupported command %ld '%s'",(long)CommandId,(const char*)FdoCommonMiscUtil::FdoCommandTypeToString (CommandId));
printf("\n**** Unkown Command: %d ********************",CommandId);
- throw GisException::Create (GisException::NLSGetMessage (GIS_102_COMMAND_NOT_SUPPORTED, "The command '%1$ls' is not supported.", (FdoString*)(FdoCommonMiscUtil::FdoCommandTypeToString (CommandId))));
+ #ifdef _FDO_3_1
+ throw GisException::Create (GisException::NLSGetMessage (FDO_102_COMMAND_NOT_SUPPORTED, "The command '%1$ls' is not supported.", (FdoString*)(FdoCommonMiscUtil::FdoCommandTypeToString (CommandId))));
+ #else
+ throw FdoException::Create (FdoException::NLSGetMessage (FDO_102_COMMAND_NOT_SUPPORTED, "The command '%1$ls' is not supported.", (FdoString*)(FdoCommonMiscUtil::FdoCommandTypeToString (CommandId))));
+ #endif
}
}
@@ -495,7 +505,18 @@
{
D_KGORA_ELOG_WRITE("c_KgOraConnection::SetConfiguration ");
}
-
+#ifdef _FDO_3_2
+/// \brief
+/// Forces the writes of any cached data to the targed datastore.
+///
+/// \return
+/// Returns nothing
+///
+void c_KgOraConnection::Flush()
+{
+}
+#endif
+
c_KgOraSpatialContextCollection* c_KgOraConnection::GetSpatialContexts ( bool bDynamic )
{
FdoPtr<c_KgOraSchemaDesc> schemadesc = GetSchemaDesc();
@@ -565,7 +586,7 @@
{
if( m_SchemaDesc.p == NULL )
{
- m_SchemaDesc = c_FdoOra_API::DescribeSchema(this,m_OraSchemaName.c_str());
+ m_SchemaDesc = c_FdoOra_API::DescribeSchema(this,m_OraSchemaName.c_str(),m_FdoViewsTable.c_str());
}
return FDO_SAFE_ADDREF(m_SchemaDesc.p);
}//end of c_KgOraConnection::GetSchemaDesc
@@ -678,7 +699,7 @@
/* Define properties to be included in SELECT statement */
FdoPtr<FdoPropertyDefinition> propdef;
- FdoPtr<GisStringCollection> sqlcols = GisStringCollection::Create();
+ FdoPtr<FdoStringCollection> sqlcols = FdoStringCollection::Create();
int geom_prop_sqlindex=-1;
FdoPtr<FdoPropertyDefinitionCollection> propcol = classdef->GetProperties();
@@ -831,7 +852,7 @@
FdoStringP gstr = ea.getMessage().c_str();
printf("\nTest occi exception: %s",(const char*)gstr);
//throw FdoConnectionException::Create( gstr );
- //throw GisException::Create (NlsMsgGet(KGORA_CONNECTION_ALREADY_OPEN, "The connection is already open."));
+ //throw FdoException::Create (NlsMsgGet(KGORA_CONNECTION_ALREADY_OPEN, "The connection is already open."));
//throw c_KgDbException(ea.getErrorCode(),ea.getMessage().data(),"c_KgDbBsAPI::Init");
}
@@ -841,7 +862,7 @@
FdoStringP gstr = ea->getMessage().c_str();
printf("\nTest occi exception: %s",(const char*)gstr);
//throw FdoConnectionException::Create( gstr );
- //throw GisException::Create (NlsMsgGet(KGORA_CONNECTION_ALREADY_OPEN, "The connection is already open."));
+ //throw FdoException::Create (NlsMsgGet(KGORA_CONNECTION_ALREADY_OPEN, "The connection is already open."));
//throw c_KgDbException(ea.getErrorCode(),ea.getMessage().data(),"c_KgDbBsAPI::Init");
}
catch (exception& )
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraConnection.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraConnection.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraConnection.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -69,6 +69,9 @@
string m_OraConnectionDbLink; // db link
string m_OraSchemaName; // if not empty than provider will display classes just from this oracle schema
// if empty that will display classes from all schemas
+
+ string m_FdoViewsTable;
+
int m_OracleMainVersion;
int m_OracleSubVersion;
protected:
@@ -201,8 +204,16 @@
/// <returns>Returns nothing</returns>
void SetConfiguration(FdoIoStream* configStream);
+ #ifdef _FDO_3_2
+ /// \brief
+ /// Forces the writes of any cached data to the targed datastore.
+ ///
+ /// \return
+ /// Returns nothing
+ ///
+ virtual void Flush();
+ #endif
-
////////////////////////////////////////////////////////////////////////
// Helper functions
////////////////////////////////////////////////////////////////////////
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionCapabilities.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionCapabilities.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionCapabilities.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -128,3 +128,41 @@
{
return false;
}
+
+#ifdef _FDO_3_2
+/// \brief
+/// Determines if write is supported by the provider or by the datastore depending on whether this request is at
+/// the provider or datastore level.
+///
+/// \return
+/// Returns true if write is supported by the provider or by the datastore depending on whether this request is at
+/// the provider or datastore level.
+bool c_KgOraConnectionCapabilities::SupportsWrite()
+{
+ return true;
+}
+
+/// \brief
+/// Determines if the provider or datastore can support more than one user writing to a single datastore at
+/// one time.
+///
+/// \return
+/// Returns true if the provider or datastore can support more than one user writing to a single datastore at
+/// one time.
+bool c_KgOraConnectionCapabilities::SupportsMultiUserWrite()
+{
+ return true;
+}
+
+/// \brief
+/// Determines if the provider can support the flush function. Flush is used to write any outstanding data
+/// to the datastore. This is mainly used by the file based providers to ensure that any cached data is writen to the file.
+///
+/// \return
+/// Returns true if the provider or datastore can support the flush function.
+///
+bool c_KgOraConnectionCapabilities::SupportsFlush()
+{
+ return false;
+}
+#endif
\ No newline at end of file
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionCapabilities.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionCapabilities.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionCapabilities.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -51,7 +51,7 @@
/// \return
/// Returns the list of spatial context extent types.
///
- FDOKGORA_API virtual FdoSpatialContextExtentType* GetSpatialContextTypes(GisInt32& Length);
+ FDOKGORA_API virtual FdoSpatialContextExtentType* GetSpatialContextTypes(FdoInt32& Length);
/// \brief
/// Determines if the feature provider supports persistent locking.
@@ -70,7 +70,7 @@
/// \return
/// Returns the list of lock types
///
- FDOKGORA_API virtual FdoLockType* GetLockTypes(GisInt32& Size);
+ FDOKGORA_API virtual FdoLockType* GetLockTypes(FdoInt32& Size);
/// \brief
/// Determines if the feature provider supports connection timeout.
@@ -129,6 +129,35 @@
/// when creating a new spatial context.
///
FDOKGORA_API virtual bool SupportsCSysWKTFromCSysName();
+
+ #ifdef _FDO_3_2
+ /// \brief
+ /// Determines if write is supported by the provider or by the datastore depending on whether this request is at
+ /// the provider or datastore level.
+ ///
+ /// \return
+ /// Returns true if write is supported by the provider or by the datastore depending on whether this request is at
+ /// the provider or datastore level.
+ FDOKGORA_API virtual bool SupportsWrite();
+
+ /// \brief
+ /// Determines if the provider or datastore can support more than one user writing to a single datastore at
+ /// one time.
+ ///
+ /// \return
+ /// Returns true if the provider or datastore can support more than one user writing to a single datastore at
+ /// one time.
+ FDOKGORA_API virtual bool SupportsMultiUserWrite();
+
+ /// \brief
+ /// Determines if the provider can support the flush function. Flush is used to write any outstanding data
+ /// to the datastore. This is mainly used by the file based providers to ensure that any cached data is writen to the file.
+ ///
+ /// \return
+ /// Returns true if the provider or datastore can support the flush function.
+ ///
+ FDOKGORA_API virtual bool SupportsFlush();
+ #endif
};
#endif
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionInfo.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionInfo.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionInfo.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -78,7 +78,8 @@
return (D_KGORA_FDO_VERSION);
}
- /// \brief
+#ifndef _FDO_3_2
+/// \brief
/// Gets the FdoIConnectionPropertyDictionary interface that can be used to dynamically query and set the properties required to establish a connection.
///
/// \return
@@ -115,9 +116,98 @@
NlsMsgGet(M_KGORA_CONNECTION_PROPERTY_ORACLE_SCHEMA, propname),
L"", false, false, false, false, false, false, 0, NULL);
m_PropertyDictionary->AddProperty(newproperty);
+
+ wide_to_multibyte (propname, D_CONN_PROPERTY_KING_FDO_CLASS);
+ newproperty = new ConnectionProperty (D_CONN_PROPERTY_KING_FDO_CLASS,
+ NlsMsgGet(M_KGORA_CONNECTION_PROPERTY_FDO_VIEWS_TABLE, propname),
+ L"", false, false, false, false, false, false, 0, NULL);
+ m_PropertyDictionary->AddProperty(newproperty);
}
return (FDO_SAFE_ADDREF(m_PropertyDictionary.p));
}//end of c_KgOraConnectionInfo::GetConnectionProperties
+#endif
+
+#ifdef _FDO_3_2
+
+/// \brief
+/// Gets the FdoIConnectionPropertyDictionary interface that can be used to dynamically query and set the properties required to establish a connection.
+///
+/// \return
+/// Returns the property dictionary
+///
+FdoIConnectionPropertyDictionary* c_KgOraConnectionInfo::GetConnectionProperties ()
+{
+
+ if (m_PropertyDictionary == NULL)
+ {
+ m_PropertyDictionary = new FdoCommonConnPropDictionary (m_Connection);
+
+ char* propname;
+
+ wide_to_multibyte (propname, D_CONN_PROPERTY_USERNAME);
+ FdoPtr<ConnectionProperty> newproperty = new ConnectionProperty (D_CONN_PROPERTY_USERNAME
+ ,NlsMsgGet(M_KGORA_CONNECTION_PROPERTY_USERNAME, propname)
+ ,L"", false, false, false, false, false, false,false, 0, NULL);
+ m_PropertyDictionary->AddProperty(newproperty);
+
+ wide_to_multibyte (propname, D_CONN_PROPERTY_PASSWORD);
+ newproperty = new ConnectionProperty (D_CONN_PROPERTY_PASSWORD,NlsMsgGet(M_KGORA_CONNECTION_PROPERTY_PASSWORD, propname),
+ L"", false, false, false, false, false, false,false, 0, NULL);
+ m_PropertyDictionary->AddProperty(newproperty);
+
+ wide_to_multibyte (propname, D_CONN_PROPERTY_SERVICE_NAME);
+ newproperty = new ConnectionProperty (D_CONN_PROPERTY_SERVICE_NAME,
+ NlsMsgGet(M_KGORA_CONNECTION_PROPERTY_SERVICE_NAME, propname),
+ L"", false, false, false, false, false, false,false, 0, NULL);
+ m_PropertyDictionary->AddProperty(newproperty);
+
+ wide_to_multibyte (propname, D_CONN_PROPERTY_ORACLE_SCHEMA);
+ newproperty = new ConnectionProperty (D_CONN_PROPERTY_ORACLE_SCHEMA,
+ NlsMsgGet(M_KGORA_CONNECTION_PROPERTY_ORACLE_SCHEMA, propname),
+ L"", false, false, false, false, false, false,false, 0, NULL);
+ m_PropertyDictionary->AddProperty(newproperty);
+
+ wide_to_multibyte (propname, D_CONN_PROPERTY_KING_FDO_CLASS);
+ newproperty = new ConnectionProperty (D_CONN_PROPERTY_KING_FDO_CLASS,
+ NlsMsgGet(M_KGORA_CONNECTION_PROPERTY_FDO_VIEWS_TABLE, propname),
+ L"", false, false, false, false, false, false,false, 0, NULL);
+ m_PropertyDictionary->AddProperty(newproperty);
+ }
+
+ return (FDO_SAFE_ADDREF(m_PropertyDictionary.p));
+
+}//end of c_KgOraConnectionInfo::GetConnectionProperties
+
+/// \brief
+/// Returns the provider type. A provider can be a file-based, database-based or
+/// web-based provider. The valid values the function may return are defined in
+/// the enumeration FdoProviderDatastoreType. The enumeration includes the following
+/// values: FdoProviderDatastoreType_Unknown, FdoProviderDatastoreType_File,
+/// FdoProviderDatastoreType_DatabaseServer, FdoProviderDatastoreType_WebServer.
+///
+/// \return
+/// Returns the provider data store type.
+///
+FdoProviderDatastoreType c_KgOraConnectionInfo::GetProviderDatastoreType()
+{
+ return FdoProviderDatastoreType_DatabaseServer;
+}
+
+/// \brief
+/// File-based providers depend on a various files. This function returns a list
+/// of fully qualified dependend file names. The return parameter will be NULL if
+/// the provider is not a file-based provider.
+///
+/// \return
+/// Returns the list of fully-qualified dependend file names if the provider is a
+/// file-based provider, NULL otherwise.
+///
+FdoStringCollection* c_KgOraConnectionInfo::GetDependentFileNames()
+{
+ return NULL;
+}
+
+#endif
\ No newline at end of file
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionInfo.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionInfo.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraConnectionInfo.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -65,6 +65,31 @@
/// <summary>Gets the FdoIConnectionPropertyDictionary interface that can be used to dynamically query and set the properties required to establish a connection.</summary>
/// <returns>Returns the property dictionary</returns>
FDOKGORA_API FdoIConnectionPropertyDictionary* GetConnectionProperties ();
+
+ #ifdef _FDO_3_2
+ /// \brief
+ /// Returns the provider type. A provider can be a file-based, database-based or
+ /// web-based provider. The valid values the function may return are defined in
+ /// the enumeration FdoProviderDatastoreType. The enumeration includes the following
+ /// values: FdoProviderDatastoreType_Unknown, FdoProviderDatastoreType_File,
+ /// FdoProviderDatastoreType_DatabaseServer, FdoProviderDatastoreType_WebServer.
+ ///
+ /// \return
+ /// Returns the provider data store type.
+ ///
+ FDOKGORA_API virtual FdoProviderDatastoreType GetProviderDatastoreType();
+
+ /// \brief
+ /// File-based providers depend on a various files. This function returns a list
+ /// of fully qualified dependend file names. The return parameter will be NULL if
+ /// the provider is not a file-based provider.
+ ///
+ /// \return
+ /// Returns the list of fully-qualified dependend file names if the provider is a
+ /// file-based provider, NULL otherwise.
+ ///
+ FDOKGORA_API virtual FdoStringCollection* GetDependentFileNames();
+ #endif
};
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraDescribeSchemaCommand.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraDescribeSchemaCommand.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraDescribeSchemaCommand.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -114,9 +114,13 @@
/// \return
/// Returns the time (in milliseconds)
///
-GisInt32 c_KgOraDescribeSchemaCommand::GetCommandTimeout()
+FdoInt32 c_KgOraDescribeSchemaCommand::GetCommandTimeout()
{
- throw FdoException::Create (GisException::NLSGetMessage (GIS_NLSID (GIS_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #ifdef _FDO_3_1
+ throw GisException::Create (GisException::NLSGetMessage (FDO_NLSID (FDO_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #else
+ throw FdoException::Create (FdoException::NLSGetMessage (FDO_NLSID (FDO_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #endif
}
/// \brief
@@ -131,9 +135,13 @@
/// \return
/// Returns nothing
///
-void c_KgOraDescribeSchemaCommand::SetCommandTimeout(GisInt32 Timeout)
+void c_KgOraDescribeSchemaCommand::SetCommandTimeout(FdoInt32 Timeout)
{
- throw FdoCommandException::Create (GisException::NLSGetMessage (GIS_NLSID (GIS_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #ifdef _FDO_3_1
+ throw GisException::Create (GisException::NLSGetMessage (FDO_NLSID (FDO_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #else
+ throw FdoCommandException::Create (FdoException::NLSGetMessage (FDO_NLSID (FDO_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #endif
}
/// \brief
@@ -146,7 +154,11 @@
///
FdoParameterValueCollection* c_KgOraDescribeSchemaCommand::GetParameterValues()
{
- throw FdoCommandException::Create (GisException::NLSGetMessage(GIS_68_COMMAND_PARAMETERS_NOT_SUPPORTED, "Command parameters are not supported."));
+ #ifdef _FDO_3_1
+ throw FdoCommandException::Create (GisException::NLSGetMessage(FDO_68_COMMAND_PARAMETERS_NOT_SUPPORTED, "Command parameters are not supported."));
+ #else
+ throw FdoCommandException::Create (FdoException::NLSGetMessage(FDO_68_COMMAND_PARAMETERS_NOT_SUPPORTED, "Command parameters are not supported."));
+ #endif
}
/// \brief
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraDescribeSchemaCommand.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraDescribeSchemaCommand.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraDescribeSchemaCommand.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -53,7 +53,7 @@
/// \return
/// Returns the schema name
///
- FDOKGORA_API virtual GisString* GetSchemaName();
+ FDOKGORA_API virtual FdoString* GetSchemaName();
/// \brief
/// Sets the name of the schema to describe. This function is optional; if not
@@ -65,7 +65,7 @@
/// \return
/// Returns nothing
///
- FDOKGORA_API virtual void SetSchemaName(GisString* SchemaName);
+ FDOKGORA_API virtual void SetSchemaName(FdoString* SchemaName);
/// \brief
/// Executes the DescribeSchema command and returns a
@@ -121,7 +121,7 @@
/// \return
/// Returns the time (in milliseconds)
///
- FDOKGORA_API virtual GisInt32 GetCommandTimeout();
+ FDOKGORA_API virtual FdoInt32 GetCommandTimeout();
/// \brief
/// Sets the number of milliseconds to wait before terminating the attempt
@@ -135,7 +135,7 @@
/// \return
/// Returns nothing
///
- FDOKGORA_API virtual void SetCommandTimeout(GisInt32 value);
+ FDOKGORA_API virtual void SetCommandTimeout(FdoInt32 value);
/// \brief
/// Returns an FdoParameterValueCollection. If the command requires parameters, the
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraExpressionCapabilities.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraExpressionCapabilities.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraExpressionCapabilities.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -40,7 +40,7 @@
/// \return
/// Returns the list of expression types
///
- FDOKGORA_API virtual FdoExpressionType* GetExpressionTypes(GisInt32& length);
+ FDOKGORA_API virtual FdoExpressionType* GetExpressionTypes(FdoInt32& length);
/// \brief
/// Returns a collection of FdoFunctionDefinition objects the feature provider supports within expressions.
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraExpressionProcessor.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraExpressionProcessor.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraExpressionProcessor.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -1,18 +1,18 @@
-/*
-* Copyright (C) 2006 SL-King d.o.o
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of version 2.1 of the GNU Lesser
-* General Public License as published by the Free Software Foundation.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+/*
+* Copyright (C) 2006 SL-King d.o.o
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of version 2.1 of the GNU Lesser
+* General Public License as published by the Free Software Foundation.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "StdAfx.h"
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraFdoCommand.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraFdoCommand.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraFdoCommand.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -71,7 +71,11 @@
/// and generating an error.
virtual int GetCommandTimeout ()
{
- throw GisException::Create (GisException::NLSGetMessage (GIS_NLSID (GIS_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #ifdef _FDO_3_1
+ throw GisException::Create (GisException::NLSGetMessage (FDO_NLSID (FDO_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #else
+ throw FdoException::Create (FdoException::NLSGetMessage (FDO_NLSID (FDO_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #endif
}
/// Sets the wait time before terminating the attempt to execute a command
@@ -79,7 +83,11 @@
virtual void SetCommandTimeout (int value)
{
(void)value; // prevent compiler from complaining about unreferenced arguments
- throw GisException::Create (GisException::NLSGetMessage (GIS_NLSID (GIS_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #ifdef _FDO_3_1
+ throw GisException::Create (GisException::NLSGetMessage (FDO_NLSID (FDO_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #else
+ throw FdoException::Create (FdoException::NLSGetMessage (FDO_NLSID (FDO_100_COMMAND_TIMEOUT_NOT_SUPPORTED)));
+ #endif
}
/// Gets the transaction in which the command executes.
@@ -152,7 +160,7 @@
}
return FDO_SAFE_ADDREF(m_Parameters.p);
- //throw FdoCommandException::Create (GisException::NLSGetMessage(GIS_68_COMMAND_PARAMETERS_NOT_SUPPORTED, "Command parameters are not supported."));
+ //throw FdoCommandException::Create (FdoException::NLSGetMessage(GIS_68_COMMAND_PARAMETERS_NOT_SUPPORTED, "Command parameters are not supported."));
}
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraFdoFeatureCommand.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraFdoFeatureCommand.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraFdoFeatureCommand.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -94,7 +94,7 @@
/// \return
/// Returns nothing
///
- virtual void SetFilter (GisString* value);
+ virtual void SetFilter (FdoString* value);
/// \brief
/// Gets the name of the class to be operated upon as an identifier.
@@ -124,7 +124,7 @@
/// \return
/// Returns nothing
///
- virtual void SetFeatureClassName (GisString* value);
+ virtual void SetFeatureClassName (FdoString* value);
};
@@ -160,7 +160,7 @@
/// \return
/// Returns nothing
template <class FDO_COMMAND>
-void c_KgOraFdoFeatureCommand<FDO_COMMAND>::SetFilter (GisString* value)
+void c_KgOraFdoFeatureCommand<FDO_COMMAND>::SetFilter (FdoString* value)
{
FdoPtr<FdoFilter> filter = FdoFilter::Parse (value);
m_Filter = FDO_SAFE_ADDREF(filter.p);
@@ -202,7 +202,7 @@
/// \return
/// Returns nothing
template <class FDO_COMMAND>
-void c_KgOraFdoFeatureCommand<FDO_COMMAND>::SetFeatureClassName (GisString* ClassName)
+void c_KgOraFdoFeatureCommand<FDO_COMMAND>::SetFeatureClassName (FdoString* ClassName)
{
FdoPtr<FdoIdentifier> cname;
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReader.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReader.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReader.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -35,7 +35,7 @@
c_KgOraFeatureReader::c_KgOraFeatureReader(c_KgOraConnection * Connection
,oracle::occi::Statement* OcciStatement ,oracle::occi::ResultSet* OcciResultSet
,FdoClassDefinition* ClassDef
- ,int GeomPropSqlIndex, GisStringCollection* SqlColumns
+ ,int GeomPropSqlIndex, FdoStringCollection* SqlColumns
,FdoIdentifierCollection* Props)
: c_KgOraReader(Connection,OcciStatement ,OcciResultSet,GeomPropSqlIndex, SqlColumns), m_ClassDef(ClassDef)
{
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReader.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReader.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReader.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -29,7 +29,7 @@
c_KgOraFeatureReader(c_KgOraConnection * Connection
,oracle::occi::Statement* OcciStatement ,oracle::occi::ResultSet* OcciResultSet
,FdoClassDefinition* ClassDef
- ,int GeomPropSqlIndex,GisStringCollection* SqlColumns
+ ,int GeomPropSqlIndex,FdoStringCollection* SqlColumns
, FdoIdentifierCollection* Props);
protected:
@@ -72,7 +72,7 @@
/// \return
/// Returns the depth
///
- FDOKGORA_API virtual GisInt32 GetDepth();
+ FDOKGORA_API virtual FdoInt32 GetDepth();
@@ -87,7 +87,7 @@
/// \return
/// Returns the nested feature reader
///
- FDOKGORA_API virtual FdoIFeatureReader* GetFeatureObject(GisString* propertyName);
+ FDOKGORA_API virtual FdoIFeatureReader* GetFeatureObject(FdoString* propertyName);
private:
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReaderInsert.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReaderInsert.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraFeatureReaderInsert.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -122,8 +122,9 @@
if( propvalue == NULL )
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::GetDouble Property not found!" );
}
- catch ( FdoException * )
+ catch ( FdoException * e)
{
+ FDO_SAFE_RELEASE(e);
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::GetDouble Property not found!" );
}
FdoPtr<FdoValueExpression> val = propvalue->GetValue();
@@ -152,8 +153,9 @@
if( propvalue == NULL )
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::GetString Property not found!" );
}
- catch ( FdoException * )
+ catch ( FdoException * e)
{
+ FDO_SAFE_RELEASE(e);
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::GetString Property not found!" );
}
FdoPtr<FdoValueExpression> val = propvalue->GetValue();
@@ -182,8 +184,9 @@
if( propvalue == NULL )
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::GetInt16 Property not found!" );
}
- catch ( FdoException * )
+ catch ( FdoException *e )
{
+ FDO_SAFE_RELEASE(e);
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::GetInt16 Property not found!" );
}
FdoPtr<FdoValueExpression> val = propvalue->GetValue();
@@ -212,8 +215,9 @@
if( propvalue == NULL )
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::GetInt32 Property not found!" );
}
- catch ( FdoException * )
+ catch ( FdoException * e )
{
+ FDO_SAFE_RELEASE(e);
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::GetInt32 Property not found!" );
}
FdoPtr<FdoValueExpression> val = propvalue->GetValue();
@@ -242,8 +246,9 @@
if( propvalue == NULL )
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::GetInt64 Property not found!" );
}
- catch ( FdoException * )
+ catch ( FdoException *e )
{
+ FDO_SAFE_RELEASE(e);
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::GetInt64 Property not found!" );
}
FdoPtr<FdoValueExpression> val = propvalue->GetValue();
@@ -278,9 +283,9 @@
if( propval == NULL )
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::IsNull Property not found!" );
}
- catch( FdoException *exp )
+ catch( FdoException *e )
{
- exp = exp;
+ FDO_SAFE_RELEASE(e);
throw FdoCommandException::Create( L"c_KgOraFeatureReaderInsert::IsNull Property not found!" );
}
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraFilterCapabilities.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraFilterCapabilities.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraFilterCapabilities.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -40,7 +40,7 @@
/// \return
/// Returns the list of condition types
///
- FDOKGORA_API virtual FdoConditionType* GetConditionTypes(GisInt32& length);
+ FDOKGORA_API virtual FdoConditionType* GetConditionTypes(FdoInt32& length);
/// \brief
/// Returns an array of FdoSpatialOperation objects the feature provider supports.
@@ -51,7 +51,7 @@
/// \return
/// Returns the list of spartial operations
///
- FDOKGORA_API virtual FdoSpatialOperations* GetSpatialOperations(GisInt32& length);
+ FDOKGORA_API virtual FdoSpatialOperations* GetSpatialOperations(FdoInt32& length);
/// \brief
/// Returns an array of FdoDistanceOperation objects the feature provider supports.
@@ -62,7 +62,7 @@
/// \return
/// Returns the list of distance operations
///
- FDOKGORA_API virtual FdoDistanceOperations* GetDistanceOperations(GisInt32& length);
+ FDOKGORA_API virtual FdoDistanceOperations* GetDistanceOperations(FdoInt32& length);
/// \brief
/// Determines if the feature provider supports geodesic distance measurement. Returns false if the feature provider supports only linear distance measurement.
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraGeometryCapabilities.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraGeometryCapabilities.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraGeometryCapabilities.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -64,7 +64,7 @@
static const FdoGeometryComponentType geomComponentTypes[] =
{
FdoGeometryComponentType_LinearRing,
- GisGeometryComponentType_CircularArcSegment,
+ FdoGeometryComponentType_CircularArcSegment,
FdoGeometryComponentType_LineStringSegment,
FdoGeometryComponentType_Ring,
};
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraGeometryCapabilities.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraGeometryCapabilities.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraGeometryCapabilities.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -41,7 +41,7 @@
/// \return
/// Returns the list of geometry types
///
- FDOKGORA_API virtual GisGeometryType* GetGeometryTypes( GisInt32& Length);
+ FDOKGORA_API virtual FdoGeometryType* GetGeometryTypes( FdoInt32& Length);
/// \brief
/// Return the list of supported component types. For example, if a client wanted to know if circular arcs were supported
@@ -53,7 +53,7 @@
/// \return
/// Returns the list of component types
///
- FDOKGORA_API virtual GisGeometryComponentType* GetGeometryComponentTypes( GisInt32& Length );
+ FDOKGORA_API virtual FdoGeometryComponentType* GetGeometryComponentTypes( FdoInt32& Length );
/// \brief
/// Returns the supported dimensionalities which are based on the bit masks defined in the GisDimensionality enum.
@@ -62,7 +62,7 @@
/// \return
/// Returns the dimensionalities
///
- FDOKGORA_API virtual GisInt32 GetDimensionalities();
+ FDOKGORA_API virtual FdoInt32 GetDimensionalities();
};
#endif
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraInsert.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraInsert.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraInsert.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -29,202 +29,202 @@
{
}
-/// \brief
-/// Gets the name of the class to be operated upon as an FdoIdentifier.
-///
-/// \return
-/// Returns the class name.
-///
-FdoIdentifier* c_KgOraInsert::GetFeatureClassName()
-{
- return FDO_SAFE_ADDREF(m_ClassId.p);
-}
-
-/// \brief
-/// Sets the name of the class to be operated upon as an FdoIdentifier.
-///
-/// \param value
-/// Input the identifier for the class.
-///
-/// \return
-/// Returns nothing
-///
-void c_KgOraInsert::SetFeatureClassName(FdoIdentifier* ClassId)
-{
- m_ClassId = ClassId;
- FDO_SAFE_ADDREF(m_ClassId.p);
-}
-
-/// \brief
-/// Sets the name of the class to be operated upon as an FdoIdentifier.
-///
-/// \param value
-/// Input the class name.
-///
-/// \return
-/// Returns nothing
-///
-void c_KgOraInsert::SetFeatureClassName(FdoString* ClassName)
-{
-
- m_ClassId = FdoIdentifier::Create( ClassName );
-}
-
-/// \brief
-/// Gets the FdoPropertyValueCollection that specifies the names and values
-/// of the properties for the instance to be inserted.
-///
-/// \return
-/// Returns the list of properties and their values.
-///
-FdoPropertyValueCollection* c_KgOraInsert::GetPropertyValues()
-{
- if( !m_PropertyValues.p )
- {
- m_PropertyValues = FdoPropertyValueCollection::Create();
- }
+/// \brief
+/// Gets the name of the class to be operated upon as an FdoIdentifier.
+///
+/// \return
+/// Returns the class name.
+///
+FdoIdentifier* c_KgOraInsert::GetFeatureClassName()
+{
+ return FDO_SAFE_ADDREF(m_ClassId.p);
+}
- return FDO_SAFE_ADDREF( m_PropertyValues.p );
-}
-
-/// \brief
-/// Gets the FdoBatchParameterValueCollection that can be used for optimized
-/// batch inserts of multiple features with a single insert command. Batch
-/// inserts can be performed by using Parameters for each of the property
-/// values, then adding collections of parameter values to the
-/// FdoBatchParameterValueCollection. Each FdoParameterValueCollection in the
-/// FdoBatchParameterValueCollection should contain one FdoParameterValue for each
-/// of the parameters specified for property values.
-///
-/// \return
-/// Returns FdoBatchParameterValueCollection
-///
-FdoBatchParameterValueCollection* c_KgOraInsert::GetBatchParameterValues()
-{
- if( !m_BatchParameterValues.p )
- {
- m_BatchParameterValues = FdoBatchParameterValueCollection::Create();
- }
+/// \brief
+/// Sets the name of the class to be operated upon as an FdoIdentifier.
+///
+/// \param value
+/// Input the identifier for the class.
+///
+/// \return
+/// Returns nothing
+///
+void c_KgOraInsert::SetFeatureClassName(FdoIdentifier* ClassId)
+{
+ m_ClassId = ClassId;
+ FDO_SAFE_ADDREF(m_ClassId.p);
+}
- return FDO_SAFE_ADDREF( m_BatchParameterValues.p );
-}
-
-/// \brief
-/// Executes the insert command and returns a reference to an
-/// FdoIFeatureReader. Some feature providers can generate automatic identity
-/// values for features. This will happen automatically as the features are
-/// inserted. The returned FdoIFeatureReader allows the client to obtain the
-/// automatic identity property value(s) of newly inserted object(s). The
-/// returned feature reader at a minimum will read the unique identity
-/// properties of the objects just inserted. Multiple objects will be
-/// returned through the reader in the case of a batch insert.
-///
-/// \return
-/// Returns an FdoIFeatureReader
-///
-FdoIFeatureReader* c_KgOraInsert::Execute()
-{
- FdoPtr<c_KgOraSchemaDesc> schemadesc = m_Connection->GetSchemaDesc();
-
+/// \brief
+/// Sets the name of the class to be operated upon as an FdoIdentifier.
+///
+/// \param value
+/// Input the class name.
+///
+/// \return
+/// Returns nothing
+///
+void c_KgOraInsert::SetFeatureClassName(FdoString* ClassName)
+{
+
+ m_ClassId = FdoIdentifier::Create( ClassName );
+}
+
+/// \brief
+/// Gets the FdoPropertyValueCollection that specifies the names and values
+/// of the properties for the instance to be inserted.
+///
+/// \return
+/// Returns the list of properties and their values.
+///
+FdoPropertyValueCollection* c_KgOraInsert::GetPropertyValues()
+{
+ if( !m_PropertyValues.p )
+ {
+ m_PropertyValues = FdoPropertyValueCollection::Create();
+ }
+
+ return FDO_SAFE_ADDREF( m_PropertyValues.p );
+}
+
+/// \brief
+/// Gets the FdoBatchParameterValueCollection that can be used for optimized
+/// batch inserts of multiple features with a single insert command. Batch
+/// inserts can be performed by using Parameters for each of the property
+/// values, then adding collections of parameter values to the
+/// FdoBatchParameterValueCollection. Each FdoParameterValueCollection in the
+/// FdoBatchParameterValueCollection should contain one FdoParameterValue for each
+/// of the parameters specified for property values.
+///
+/// \return
+/// Returns FdoBatchParameterValueCollection
+///
+FdoBatchParameterValueCollection* c_KgOraInsert::GetBatchParameterValues()
+{
+ if( !m_BatchParameterValues.p )
+ {
+ m_BatchParameterValues = FdoBatchParameterValueCollection::Create();
+ }
+
+ return FDO_SAFE_ADDREF( m_BatchParameterValues.p );
+}
+
+/// \brief
+/// Executes the insert command and returns a reference to an
+/// FdoIFeatureReader. Some feature providers can generate automatic identity
+/// values for features. This will happen automatically as the features are
+/// inserted. The returned FdoIFeatureReader allows the client to obtain the
+/// automatic identity property value(s) of newly inserted object(s). The
+/// returned feature reader at a minimum will read the unique identity
+/// properties of the objects just inserted. Multiple objects will be
+/// returned through the reader in the case of a batch insert.
+///
+/// \return
+/// Returns an FdoIFeatureReader
+///
+FdoIFeatureReader* c_KgOraInsert::Execute()
+{
+ FdoPtr<c_KgOraSchemaDesc> schemadesc = m_Connection->GetSchemaDesc();
+
FdoPtr<FdoClassDefinition> classdef = schemadesc->FindClassDefinition(m_ClassId);
- if( !classdef.p )
- {
- throw FdoException::Create(L"c_KgOraInsert::Execute: Unable to find class definition!");
-
- }
-
-
-
+ if( !classdef.p )
+ {
+ throw FdoException::Create(L"c_KgOraInsert::Execute: Unable to find class definition!");
+
+ }
+
+
+
FdoPtr<FdoKgOraClassDefinition> phys_class = schemadesc->FindClassMapping(m_ClassId);
FdoStringP fultablename = phys_class->GetOracleFullTableName();
- FdoStringP table_alias = phys_class->GetOraTableAlias();
-
- bool use_seq_for_identity = false;
- FdoPtr<FdoDataPropertyDefinition> ident_for_seq;
- FdoStringP seqname = phys_class->GetUseSequenceForIdentity();
- if( seqname.GetLength() > 0 )
- {
- // take the name of identity property
- FdoPtr<FdoDataPropertyDefinitionCollection> ident_col = classdef->GetIdentityProperties();
- if( ident_col->GetCount() == 1 )
- {
- ident_for_seq = ident_col->GetItem(0);
- use_seq_for_identity = true;
- }
- }
-
- c_KgOraSridDesc orasrid;
- m_Connection->GetOracleSridDesc(classdef,orasrid);
-
- if( m_BatchParameterValues.p && m_BatchParameterValues->GetCount() != 0 )
- {
- // First I will rearrange property values so, frist will come bacth parametsr
- // and after that other literal values
- // first pick up those property values which are of type paarmeters
- FdoPtr<FdoPropertyValueCollection> batch_propvalcol = FdoPropertyValueCollection::Create();
-
- // add parameters
- unsigned int num_batch_columns=0;
- unsigned int count = m_PropertyValues->GetCount();
- for(unsigned int ind=0;ind<count;ind++)
- {
- FdoPtr<FdoPropertyValue> propval = m_PropertyValues->GetItem(ind);
- FdoPtr<FdoParameter> param = dynamic_cast<FdoParameter*>(propval->GetValue ());
- if( param )
- {
- batch_propvalcol->Add(propval);
- num_batch_columns++;
- }
- }
- // add non-parameters
- count = m_PropertyValues->GetCount();
- for(unsigned int ind=0;ind<count;ind++)
- {
- FdoPtr<FdoPropertyValue> propval = m_PropertyValues->GetItem(ind);
- FdoPtr<FdoParameter> param = dynamic_cast<FdoParameter*>(propval->GetValue ());
- if( param == NULL )
- {
- batch_propvalcol->Add(propval);
- }
- }
-
- // then process thos values which
- c_FilterStringBuffer strbuff;
+ FdoStringP table_alias = phys_class->GetOraTableAlias();
+
+ bool use_seq_for_identity = false;
+ FdoPtr<FdoDataPropertyDefinition> ident_for_seq;
+ FdoStringP seqname = phys_class->GetUseSequenceForIdentity();
+ if( seqname.GetLength() > 0 )
+ {
+ // take the name of identity property
+ FdoPtr<FdoDataPropertyDefinitionCollection> ident_col = classdef->GetIdentityProperties();
+ if( ident_col->GetCount() == 1 )
+ {
+ ident_for_seq = ident_col->GetItem(0);
+ use_seq_for_identity = true;
+ }
+ }
+
+ c_KgOraSridDesc orasrid;
+ m_Connection->GetOracleSridDesc(classdef,orasrid);
+
+ if( m_BatchParameterValues.p && m_BatchParameterValues->GetCount() != 0 )
+ {
+ // First I will rearrange property values so, frist will come bacth parametsr
+ // and after that other literal values
+ // first pick up those property values which are of type paarmeters
+ FdoPtr<FdoPropertyValueCollection> batch_propvalcol = FdoPropertyValueCollection::Create();
+
+ // add parameters
+ unsigned int num_batch_columns=0;
+ unsigned int count = m_PropertyValues->GetCount();
+ for(unsigned int ind=0;ind<count;ind++)
+ {
+ FdoPtr<FdoPropertyValue> propval = m_PropertyValues->GetItem(ind);
+ FdoPtr<FdoParameter> param = dynamic_cast<FdoParameter*>(propval->GetValue ());
+ if( param )
+ {
+ batch_propvalcol->Add(propval);
+ num_batch_columns++;
+ }
+ }
+ // add non-parameters
+ count = m_PropertyValues->GetCount();
+ for(unsigned int ind=0;ind<count;ind++)
+ {
+ FdoPtr<FdoPropertyValue> propval = m_PropertyValues->GetItem(ind);
+ FdoPtr<FdoParameter> param = dynamic_cast<FdoParameter*>(propval->GetValue ());
+ if( param == NULL )
+ {
+ batch_propvalcol->Add(propval);
+ }
+ }
+
+ // then process thos values which
+ c_FilterStringBuffer strbuff;
c_KgOraExpressionProcessor expproc(&strbuff,schemadesc,m_ClassId,orasrid);
-
-
- FdoStringP colnames;
- FdoStringP colvalues;
- FdoStringP sep;
-
- count = batch_propvalcol->GetCount();
- for(unsigned int ind=0;ind<count;ind++)
- {
- FdoPtr<FdoPropertyValue> propval = batch_propvalcol->GetItem(ind);
- FdoPtr<FdoIdentifier> propid = propval->GetName();
-
- colnames += sep + propid->GetName();
-
-
- FdoPtr<FdoValueExpression> expr = propval->GetValue();
-
- strbuff.ClearBuffer();
- expr->Process( &expproc );
-
- colvalues += sep + strbuff.GetString();
- sep = ",";
- }
-
- c_FilterStringBuffer sqlstr;
- sqlstr.AppendString("INSERT INTO ");
- sqlstr.AppendString(fultablename);
- sqlstr.AppendString(" ( ");
- sqlstr.AppendString(colnames);
- sqlstr.AppendString(" ) ");
- sqlstr.AppendString(" VALUES ( ");
- sqlstr.AppendString(colvalues);
- sqlstr.AppendString(" ) ");
-
+
+
+ FdoStringP colnames;
+ FdoStringP colvalues;
+ FdoStringP sep;
+
+ count = batch_propvalcol->GetCount();
+ for(unsigned int ind=0;ind<count;ind++)
+ {
+ FdoPtr<FdoPropertyValue> propval = batch_propvalcol->GetItem(ind);
+ FdoPtr<FdoIdentifier> propid = propval->GetName();
+
+ colnames += sep + propid->GetName();
+
+
+ FdoPtr<FdoValueExpression> expr = propval->GetValue();
+
+ strbuff.ClearBuffer();
+ expr->Process( &expproc );
+
+ colvalues += sep + strbuff.GetString();
+ sep = ",";
+ }
+
+ c_FilterStringBuffer sqlstr;
+ sqlstr.AppendString("INSERT INTO ");
+ sqlstr.AppendString(fultablename);
+ sqlstr.AppendString(" ( ");
+ sqlstr.AppendString(colnames);
+ sqlstr.AppendString(" ) ");
+ sqlstr.AppendString(" VALUES ( ");
+ sqlstr.AppendString(colvalues);
+ sqlstr.AppendString(" ) ");
+
oracle::occi::Statement* occi_stm=NULL;
try
@@ -306,117 +306,117 @@
throw FdoCommandException::Create( gstr );
}
- return new c_KgOraFeatureReaderInsert(m_PropertyValues,classdef);
- }
- else
- {
- // Single values insert
- if( m_PropertyValues.p )
- {
- c_FilterStringBuffer strbuff;
+ return new c_KgOraFeatureReaderInsert(m_PropertyValues,classdef);
+ }
+ else
+ {
+ // Single values insert
+ if( m_PropertyValues.p )
+ {
+ c_FilterStringBuffer strbuff;
c_KgOraExpressionProcessor expproc(&strbuff,schemadesc,m_ClassId,orasrid);
-
- FdoStringP colnames;
- FdoStringP colvalues;
- FdoStringP sep;
-
-
- bool prop_in_seq = false;
- bool used_seq = false;
-
-
-
- // first check if this class is using oracle sequences
- // if so check if identiy is inside properties and check
- // if value is null than set it to sequence value
- if( use_seq_for_identity )
- {
- unsigned int prop_count = m_PropertyValues->GetCount();
- bool found_identity = false;
- for(unsigned int ind=0;ind<prop_count;ind++)
- {
- FdoPtr<FdoPropertyValue> propval = m_PropertyValues->GetItem(ind);
- FdoPtr<FdoIdentifier> propid = propval->GetName();
- if( wcscmp(propid->GetName(),ident_for_seq->GetName()) == 0 )
- {
- long seqval = c_Ora_API::GetSequenceNextVal(m_Connection->GetOcciConnection(),seqname);
- FdoPtr<FdoDataValue> newval = FdoDataValue::Create((GisInt32)seqval);
- propval->SetValue(newval);
- found_identity = true;
- break;
- }
- }
-
- if( !found_identity )
- {
-
- long seqval = c_Ora_API::GetSequenceNextVal(m_Connection->GetOcciConnection(),seqname);
- FdoPtr<FdoDataValue> newval = FdoDataValue::Create((GisInt32)seqval);
-
- FdoPtr<FdoPropertyValue> propval = FdoPropertyValue::Create(ident_for_seq->GetName(),newval);
- m_PropertyValues->Insert(0,propval);
-
- }
- }
-
-
- unsigned int prop_count = m_PropertyValues->GetCount();
- for(unsigned int ind=0;ind<prop_count;ind++)
- {
- FdoPtr<FdoPropertyValue> propval = m_PropertyValues->GetItem(ind);
- FdoPtr<FdoIdentifier> propid = propval->GetName();
-
- colnames += sep + propid->GetName();
-
- FdoPtr<FdoValueExpression> expr = propval->GetValue();
-
-
- prop_in_seq = false;
- if( use_seq_for_identity && !used_seq)
- {
-
-
- if( wcscmp(propid->GetName(),ident_for_seq->GetName()) == 0 )
- {
- // if it is data val end if it is null put sequence inot it
- FdoDataValue* dataval = dynamic_cast<FdoDataValue*>(expr.p);
- if( dataval && dataval->IsNull() )
- {
-
- colvalues += sep + seqname + L".nextval";
- used_seq = true;
- prop_in_seq = true;
- }
-
- }
- else
- {
-
- FdoStringP str = propid->GetName();
-
- }
- }
-
- if( !prop_in_seq )
- {
- strbuff.ClearBuffer();
- expr->Process( &expproc );
- colvalues += sep + strbuff.GetString();
- }
-
- sep = ",";
- }
-
- c_FilterStringBuffer sqlstr;
- sqlstr.AppendString("INSERT INTO ");
- sqlstr.AppendString(fultablename);
- sqlstr.AppendString(" ( ");
- sqlstr.AppendString(colnames);
- sqlstr.AppendString(" ) ");
- sqlstr.AppendString(" VALUES ( ");
- sqlstr.AppendString(colvalues);
- sqlstr.AppendString(" ) ");
-
+
+ FdoStringP colnames;
+ FdoStringP colvalues;
+ FdoStringP sep;
+
+
+ bool prop_in_seq = false;
+ bool used_seq = false;
+
+
+
+ // first check if this class is using oracle sequences
+ // if so check if identiy is inside properties and check
+ // if value is null than set it to sequence value
+ if( use_seq_for_identity )
+ {
+ unsigned int prop_count = m_PropertyValues->GetCount();
+ bool found_identity = false;
+ for(unsigned int ind=0;ind<prop_count;ind++)
+ {
+ FdoPtr<FdoPropertyValue> propval = m_PropertyValues->GetItem(ind);
+ FdoPtr<FdoIdentifier> propid = propval->GetName();
+ if( wcscmp(propid->GetName(),ident_for_seq->GetName()) == 0 )
+ {
+ long seqval = c_Ora_API::GetSequenceNextVal(m_Connection->GetOcciConnection(),seqname);
+ FdoPtr<FdoDataValue> newval = FdoDataValue::Create((FdoInt32)seqval);
+ propval->SetValue(newval);
+ found_identity = true;
+ break;
+ }
+ }
+
+ if( !found_identity )
+ {
+
+ long seqval = c_Ora_API::GetSequenceNextVal(m_Connection->GetOcciConnection(),seqname);
+ FdoPtr<FdoDataValue> newval = FdoDataValue::Create((FdoInt32)seqval);
+
+ FdoPtr<FdoPropertyValue> propval = FdoPropertyValue::Create(ident_for_seq->GetName(),newval);
+ m_PropertyValues->Insert(0,propval);
+
+ }
+ }
+
+
+ unsigned int prop_count = m_PropertyValues->GetCount();
+ for(unsigned int ind=0;ind<prop_count;ind++)
+ {
+ FdoPtr<FdoPropertyValue> propval = m_PropertyValues->GetItem(ind);
+ FdoPtr<FdoIdentifier> propid = propval->GetName();
+
+ colnames += sep + propid->GetName();
+
+ FdoPtr<FdoValueExpression> expr = propval->GetValue();
+
+
+ prop_in_seq = false;
+ if( use_seq_for_identity && !used_seq)
+ {
+
+
+ if( wcscmp(propid->GetName(),ident_for_seq->GetName()) == 0 )
+ {
+ // if it is data val end if it is null put sequence inot it
+ FdoDataValue* dataval = dynamic_cast<FdoDataValue*>(expr.p);
+ if( dataval && dataval->IsNull() )
+ {
+
+ colvalues += sep + seqname + L".nextval";
+ used_seq = true;
+ prop_in_seq = true;
+ }
+
+ }
+ else
+ {
+
+ FdoStringP str = propid->GetName();
+
+ }
+ }
+
+ if( !prop_in_seq )
+ {
+ strbuff.ClearBuffer();
+ expr->Process( &expproc );
+ colvalues += sep + strbuff.GetString();
+ }
+
+ sep = ",";
+ }
+
+ c_FilterStringBuffer sqlstr;
+ sqlstr.AppendString("INSERT INTO ");
+ sqlstr.AppendString(fultablename);
+ sqlstr.AppendString(" ( ");
+ sqlstr.AppendString(colnames);
+ sqlstr.AppendString(" ) ");
+ sqlstr.AppendString(" VALUES ( ");
+ sqlstr.AppendString(colvalues);
+ sqlstr.AppendString(" ) ");
+
oracle::occi::Statement* occi_stm=NULL;
try
@@ -444,12 +444,12 @@
}
- return new c_KgOraFeatureReaderInsert(m_PropertyValues,classdef);
-
- }
- }
-
-
- return NULL;
-}//end of c_KgOraInsert::Execute
-
+ return new c_KgOraFeatureReaderInsert(m_PropertyValues,classdef);
+
+ }
+ }
+
+
+ return NULL;
+}//end of c_KgOraInsert::Execute
+
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraReader.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraReader.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraReader.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -85,7 +85,7 @@
/// \return
/// Returns a pointer to the byte array in AGF format.
///
- FDOKGORA_API virtual const GisByte * GetGeometry(GisString* propertyName, GisInt32 * count);
+ FDOKGORA_API virtual const FdoByte * GetGeometry(FdoString* propertyName, FdoInt32 * count);
/// \brief
/// Gets the geometry value of the specified property as a byte array in
@@ -98,7 +98,7 @@
/// \return
/// Returns the byte array in AGF format.
///
- FDOKGORA_API virtual GisByteArray* GetGeometry(GisString* propertyName);
+ FDOKGORA_API virtual FdoByteArray* GetGeometry(FdoString* propertyName);
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraSQLCommand.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraSQLCommand.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraSQLCommand.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -55,7 +55,7 @@
/// \return
/// Returns the number of rows affected.
///
- FDOKGORA_API virtual GisInt32 ExecuteNonQuery();
+ FDOKGORA_API virtual FdoInt32 ExecuteNonQuery();
/// \brief
/// Executes the SQL statement against the connection object and returns
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraSQLDataReader.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraSQLDataReader.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraSQLDataReader.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -391,7 +391,7 @@
catch(oracle::occi::SQLException& ea)
{
m_OcciResultSet = NULL;
- GisStringP gstr = ea.getMessage().c_str();
+ FdoStringP gstr = ea.getMessage().c_str();
throw FdoConnectionException::Create( gstr );
}
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraSQLDataReader.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraSQLDataReader.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraSQLDataReader.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -114,7 +114,7 @@
/// \return
/// Returns the byte value.
///
- FDOKGORA_API virtual GisByte GetByte(FdoString* ColumnName);
+ FDOKGORA_API virtual FdoByte GetByte(FdoString* ColumnName);
/// \brief
/// Gets the date time value of the specified column. No conversion
@@ -127,7 +127,7 @@
/// \return
/// Returns the date and time value.
///
- FDOKGORA_API virtual GisDateTime GetDateTime(FdoString* ColumnName);
+ FDOKGORA_API virtual FdoDateTime GetDateTime(FdoString* ColumnName);
/// \brief
/// Gets the double-precision floating point value of the specified column.
@@ -151,9 +151,9 @@
/// Input the column name.
///
/// \return
- /// Returns the GisInt16 value.
+ /// Returns the FdoInt16 value.
///
- FDOKGORA_API virtual GisInt16 GetInt16(FdoString* ColumnName);
+ FDOKGORA_API virtual FdoInt16 GetInt16(FdoString* ColumnName);
/// \brief
/// Gets the signed 32-bit integer value of the specified column. No conversion is
@@ -177,9 +177,9 @@
/// Input the column name.
///
/// \return
- /// Returns the GisInt64 value.
+ /// Returns the FdoInt64 value.
///
- FDOKGORA_API virtual GisInt64 GetInt64(FdoString* ColumnName);
+ FDOKGORA_API virtual FdoInt64 GetInt64(FdoString* ColumnName);
/// \brief
/// Gets the single-precision floating point value of the specified column.
@@ -225,7 +225,7 @@
/// FdoCLOBStreamReader etc. to allow reading in blocks of data.
/// Because no conversion is performed, the property must be FdoDataType_BLOB
/// or FdoDataType_CLOB etc. (a LOB type)
- /// Cast the GisIStreamReader to the appropiate LOB Stream Reader.
+ /// Cast the FdoIStreamReader to the appropiate LOB Stream Reader.
///
/// \param propertyName
/// Input the property name.
@@ -233,7 +233,7 @@
/// \return
/// Returns a reference to a LOB stream reader
///
- FDOKGORA_API virtual GisIStreamReader* GetLOBStreamReader(const wchar_t* propertyName);
+ FDOKGORA_API virtual FdoIStreamReader* GetLOBStreamReader(const wchar_t* propertyName);
/// \brief
/// Returns true if the value of the specified column is null.
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaCapabilities.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaCapabilities.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaCapabilities.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -206,3 +206,152 @@
{
return false;
}
+
+#ifdef _FDO_3_2
+
+/// \brief
+/// Returns the maximum supported length of String, BLOB, or CLOB data
+/// properties. For decimal, it is typically the combination of the maximum
+/// scale and precision. For other data types that are not variable in size,
+/// the value returned is the byte length.
+///
+/// \param dataType
+/// The data type for which the information is to retrieved.
+///
+/// \return
+/// Returns the maximum data value length for the identified data type.
+///
+FdoInt64 c_KgOraSchemaCapabilities::GetMaximumDataValueLength(FdoDataType DataType)
+{
+ switch (DataType)
+ {
+ case FdoDataType_String: return (FdoInt64)-1;
+ case FdoDataType_BLOB: return (FdoInt64)-1;
+ case FdoDataType_CLOB: return (FdoInt64)-1;
+ case FdoDataType_Decimal: return (FdoInt64)-1;
+ case FdoDataType_Boolean: return (FdoInt64)sizeof(FdoBoolean);
+ case FdoDataType_Byte: return (FdoInt64)sizeof(FdoByte);
+ case FdoDataType_DateTime: return (FdoInt64)sizeof(FdoDateTime);
+ case FdoDataType_Double: return (FdoInt64)sizeof(FdoDouble);
+ case FdoDataType_Int16: return (FdoInt64)sizeof(FdoInt16);
+ case FdoDataType_Int32: return (FdoInt64)sizeof(FdoInt32);
+ case FdoDataType_Int64: return (FdoInt64)sizeof(FdoInt64);
+ case FdoDataType_Single: return (FdoInt64)sizeof(FdoFloat);
+ }
+ return (FdoInt64)-1;
+}
+
+/// \brief
+/// Returns the maximum supported precision for a decimal data property.
+///
+/// \param
+/// None.
+///
+/// \return
+/// Returns the maximum supported precision for a decimal data property.
+///
+FdoInt32 c_KgOraSchemaCapabilities::GetMaximumDecimalPrecision()
+{
+ return -1;
+}
+
+/// \brief
+/// Returns the maximum supported scale for a decimal data property.
+///
+/// \param
+/// None.
+///
+/// \return
+/// Returns the maximum supported scale for a decimal data property.
+///
+FdoInt32 c_KgOraSchemaCapabilities::GetMaximumDecimalScale()
+{
+ return -1;
+}
+
+/// \brief
+/// Returns the maximum size of a value of the given type. It includes
+/// limits for the data store name, shema name, class name, property name
+/// and description.
+///
+/// \param name
+/// The schema element name type identifier for which the information is to
+/// be retrieved. Can be any of the following options: FdoSchemaElementNameType_Datastore,
+/// FdoSchemaElementNameType_Schema, FdoSchemaElementNameType_Class, FdoSchemaElementNameType_Property or
+/// FdoSchemaElementNameType_Description
+///
+/// \return
+/// Returns the size limitation for the identified schema element.
+///
+FDOKGORA_API FdoInt32 c_KgOraSchemaCapabilities::GetNameSizeLimit(FdoSchemaElementNameType NameType)
+{
+ switch (NameType)
+ {
+ case FdoSchemaElementNameType_Datastore: return 30; // the max filename length on linux/windows
+ case FdoSchemaElementNameType_Schema: return 30;
+ case FdoSchemaElementNameType_Class: return 30;
+ case FdoSchemaElementNameType_Property: return 30;
+ case FdoSchemaElementNameType_Description: return -1;
+ }
+ return -1;
+}
+
+/// \brief
+/// Returns a string that includes all the reserved characters that cannot be
+/// used for the various schema element names for the provider.
+///
+/// \param
+/// None
+///
+/// \return
+/// Returns a string with the reserved characters for the identified schema element.
+///
+FDOKGORA_API FdoString* c_KgOraSchemaCapabilities::GetReservedCharactersForName()
+{
+ return L"";
+}
+
+/// \brief
+/// Returns a list of property types that can be used for identity properties.
+///
+/// \param length
+/// Output the number of data types.
+///
+/// \return
+/// Returns a string with the reserved characters for the identified schema element.
+///
+FdoDataType* c_KgOraSchemaCapabilities::GetSupportedIdentityPropertyTypes(FdoInt32& Length)
+{
+ Length = 0;
+ static FdoDataType supportedIdentityTypes[15];
+ supportedIdentityTypes[Length++] = FdoDataType_Boolean;
+ supportedIdentityTypes[Length++] = FdoDataType_Byte;
+ supportedIdentityTypes[Length++] = FdoDataType_DateTime;
+ supportedIdentityTypes[Length++] = FdoDataType_Decimal;
+ supportedIdentityTypes[Length++] = FdoDataType_Double;
+ supportedIdentityTypes[Length++] = FdoDataType_Int16;
+ supportedIdentityTypes[Length++] = FdoDataType_Int32;
+ supportedIdentityTypes[Length++] = FdoDataType_Int64;
+ supportedIdentityTypes[Length++] = FdoDataType_Single;
+ supportedIdentityTypes[Length++] = FdoDataType_String;
+
+ return supportedIdentityTypes;
+}
+
+/// \brief
+/// Returns TRUE if default values can be specified for a data property
+/// definition, FALSE otherwise.
+///
+/// \param
+/// None
+///
+/// \return
+/// Returns TRUE if default values can be specified for a data property
+/// definition, FALSE otherwise.
+///
+bool c_KgOraSchemaCapabilities::SupportsDefaultValue()
+{
+ return false;
+}
+
+#endif
\ No newline at end of file
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaCapabilities.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaCapabilities.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaCapabilities.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -40,7 +40,7 @@
/// \return
/// Returns the list of class types.
///
- FDOKGORA_API virtual FdoClassType* GetClassTypes(GisInt32& length);
+ FDOKGORA_API virtual FdoClassType* GetClassTypes(FdoInt32& length);
/// \brief
/// Returns an array of the FdoDataType objects the feature provider supports.
@@ -51,7 +51,7 @@
/// \return
/// Returns the list of data types
///
- FDOKGORA_API virtual FdoDataType* GetDataTypes(GisInt32& length);
+ FDOKGORA_API virtual FdoDataType* GetDataTypes(FdoInt32& length);
/// \brief
/// Determines if the feature provider supports inheritance.
@@ -128,7 +128,7 @@
/// \return
/// Returns the list of data types
///
- FDOKGORA_API virtual FdoDataType* GetSupportedAutoGeneratedTypes(GisInt32& length);
+ FDOKGORA_API virtual FdoDataType* GetSupportedAutoGeneratedTypes(FdoInt32& length);
/// \brief
/// Determines if the provider support update a schema through the ApplySchema command.
@@ -196,6 +196,97 @@
/// Returns true if the provider supports multiple identity properties per class.
///
FDOKGORA_API virtual bool SupportsCompositeId();
+
+ #ifdef _FDO_3_2
+ /// \brief
+ /// Returns the maximum supported length of String, BLOB, or CLOB data
+ /// properties. For decimal, it is typically the combination of the maximum
+ /// scale and precision. For other data types that are not variable in size,
+ /// the value returned is the byte length.
+ ///
+ /// \param dataType
+ /// The data type for which the information is to retrieved.
+ ///
+ /// \return
+ /// Returns the maximum data value length for the identified data type.
+ ///
+ FDOKGORA_API virtual FdoInt64 GetMaximumDataValueLength(FdoDataType dataType);
+
+ /// \brief
+ /// Returns the maximum supported precision for a decimal data property.
+ ///
+ /// \param
+ /// None.
+ ///
+ /// \return
+ /// Returns the maximum supported precision for a decimal data property.
+ ///
+ FDOKGORA_API virtual FdoInt32 GetMaximumDecimalPrecision();
+
+ /// \brief
+ /// Returns the maximum supported scale for a decimal data property.
+ ///
+ /// \param
+ /// None.
+ ///
+ /// \return
+ /// Returns the maximum supported scale for a decimal data property.
+ ///
+ FDOKGORA_API virtual FdoInt32 GetMaximumDecimalScale();
+
+ /// \brief
+ /// Returns the maximum size of a value of the given type. It includes
+ /// limits for the data store name, shema name, class name, property name
+ /// and description.
+ ///
+ /// \param name
+ /// The schema element name type identifier for which the information is to
+ /// be retrieved. Can be any of the following options: FdoSchemaElementNameType_Datastore,
+ /// FdoSchemaElementNameType_Schema, FdoSchemaElementNameType_Class, FdoSchemaElementNameType_Property or
+ /// FdoSchemaElementNameType_Description
+ ///
+ /// \return
+ /// Returns the size limitation for the identified schema element.
+ ///
+ FDOKGORA_API virtual FdoInt32 GetNameSizeLimit(FdoSchemaElementNameType name);
+
+ /// \brief
+ /// Returns a string that includes all the reserved characters that cannot be
+ /// used for the various schema element names for the provider.
+ ///
+ /// \param
+ /// None
+ ///
+ /// \return
+ /// Returns a string with the reserved characters for the identified schema element.
+ ///
+ FDOKGORA_API virtual FdoString* GetReservedCharactersForName();
+
+ /// \brief
+ /// Returns a list of property types that can be used for identity properties.
+ ///
+ /// \param length
+ /// Output the number of data types.
+ ///
+ /// \return
+ /// Returns a string with the reserved characters for the identified schema element.
+ ///
+ FDOKGORA_API virtual FdoDataType* GetSupportedIdentityPropertyTypes(FdoInt32& length);
+
+ /// \brief
+ /// Returns TRUE if default values can be specified for a data property
+ /// definition, FALSE otherwise.
+ ///
+ /// \param
+ /// None
+ ///
+ /// \return
+ /// Returns TRUE if default values can be specified for a data property
+ /// definition, FALSE otherwise.
+ ///
+ FDOKGORA_API virtual bool SupportsDefaultValue();
+
+ #endif
};
#endif
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaDesc.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaDesc.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaDesc.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -38,13 +38,19 @@
FdoPtr<FdoFeatureSchemaCollection> fschemas = GetFeatureSchema();
FdoPtr<FdoClassDefinition> classdef;
+
if( fschemas && (fschemas->GetCount() > 0) )
{
- FdoPtr<FdoFeatureSchema> schm = fschemas->GetItem(0);
- FdoPtr<FdoClassCollection> classes = schm->GetClasses();
+ FdoStringP fname = ClassId->GetText();
+ FdoPtr<FdoIDisposableCollection> classes = fschemas->FindClass(fname);
- classdef = classes->FindItem( ClassId->GetName() );
+ //FdoPtr<FdoFeatureSchema> schm = fschemas->GetItem(0);
+ //FdoPtr<FdoClassCollection> classes = schm->GetClasses();
+ //classdef = classes->FindItem( ClassId->GetName() );
+
+ classdef = (FdoClassDefinition*)classes->GetItem( 0 );
+
//if( !classdef.p ) return NULL;
return FDO_SAFE_ADDREF(classdef.p);
}
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaDesc.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaDesc.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraSchemaDesc.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -20,7 +20,7 @@
-class c_KgOraSchemaDesc : public GisDisposable
+class c_KgOraSchemaDesc : public FdoDisposable
{
public:
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraSelectCommand.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraSelectCommand.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraSelectCommand.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -105,7 +105,7 @@
if( !classdef.p ) return NULL;
int geom_sqlcol_index;
- FdoPtr<FdoStringCollection> sqlcols = GisStringCollection::Create();
+ FdoPtr<FdoStringCollection> sqlcols = FdoStringCollection::Create();
c_KgOraSridDesc orasrid;
{
@@ -206,19 +206,28 @@
FdoPtr<FdoClassDefinition> classdef;
if( fschemas && (fschemas->GetCount() > 0) )
{
- FdoPtr<FdoFeatureSchema> schm = fschemas->GetItem(0);
- FdoPtr<FdoClassCollection> classes = schm->GetClasses();
+ //FdoPtr<FdoFeatureSchema> schm = fschemas->GetItem(0);
+ //FdoPtr<FdoClassCollection> classes = schm->GetClasses();
+ //classdef = classes->FindItem( classid->GetName() );
- classdef = classes->FindItem( classid->GetName() );
+ FdoPtr<FdoIDisposableCollection> classes = fschemas->FindClass(classid->GetText());
+ classdef = (FdoClassDefinition*)classes->GetItem( 0 );
+
if( !classdef.p ) return "";
}
string sqlstr;
+ FdoPtr<FdoKgOraClassDefinition> phys_class = schemadesc->FindClassMapping(classid);
+ FdoStringP fultablename = phys_class->GetOracleFullTableName();
+ FdoStringP table_alias = phys_class->GetOraTableAlias();
+
/* Define properties to be included in SELECT statement */
FdoPtr<FdoPropertyDefinition> propdef;
+ FdoStringP sql_select_columns_part;
+ FdoStringP sep;
GeomSqlColumnIndex=-1;
FdoPtr<FdoPropertyDefinitionCollection> propcol = classdef->GetProperties();
@@ -239,7 +248,32 @@
m_Connection->GetOracleSridDesc(geomprop,orasrid);
GeomSqlColumnIndex=ind;
+
+ if( phys_class->GetIsPointGeometry() && (_wcsicmp(propname,phys_class->GetPoinGeometryPropertyName())==0) )
+ {
+ // this is geometry created as point from numeric columns
+
+ FdoStringP pointstr;
+ if( phys_class->GetPointZOraColumn() && (wcslen(phys_class->GetPointZOraColumn()) > 0) )
+ pointstr = pointstr.Format(L" SDO_GEOMETRY(2001,NULL,SDO_POINT_TYPE(%s,%s,%s),NULL,NULL) as %s ",phys_class->GetPointXOraColumn(),phys_class->GetPointYOraColumn(),phys_class->GetPointZOraColumn(),propname);
+ else
+ pointstr = pointstr.Format(L" SDO_GEOMETRY(2001,NULL,SDO_POINT_TYPE(%s,%s,NULL),NULL,NULL) as %s ",phys_class->GetPointXOraColumn(),phys_class->GetPointYOraColumn(),propname);
+
+ sql_select_columns_part += sep + pointstr; // this is for just column -> sql_select_columns_part += sep + table_alias + "." + propname;
+ sep = ",";
+ }
+ else
+ {
+ // this is normal geomerty property - oracle column
+ // add just property name in select
+ sql_select_columns_part += sep + table_alias + "." + propname; sep = ",";
+ }
}
+ else
+ {
+ // add property name in select
+ sql_select_columns_part += sep + table_alias + "." + propname; sep = ",";
+ }
}
@@ -257,22 +291,9 @@
else filtertext = NULL;
- FdoPtr<FdoKgOraClassDefinition> phys_class = schemadesc->FindClassMapping(classid);
- FdoStringP fultablename = phys_class->GetOracleFullTableName();
- FdoStringP table_alias = phys_class->GetOraTableAlias();
- FdoStringP cols;
- FdoStringP sep;
-
- for ( int i = 0; i < SqlColumns->GetCount(); i++ )
- {
- cols += sep + table_alias + "." + SqlColumns->GetString(i);
- sep = ",";
- }
-
-
char* sbuff = new char[1024];
- sprintf(sbuff, "SELECT %s FROM %s %s",(const char*)cols,(const char*)fultablename,(const char*)table_alias);
+ sprintf(sbuff, "SELECT %s FROM %s %s",(const char*)sql_select_columns_part,(const char*)fultablename,(const char*)table_alias);
sqlstr = sbuff;
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraSpatialContext.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraSpatialContext.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraSpatialContext.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -20,7 +20,7 @@
#define _c_KgOraSpatialContext_h
-class c_KgOraSpatialContext : public GisDisposable
+class c_KgOraSpatialContext : public FdoDisposable
{
private:
FdoStringP m_Name;
@@ -72,7 +72,7 @@
-class c_KgOraSpatialContextCollection : public FdoNamedCollection<c_KgOraSpatialContext, GisException>
+class c_KgOraSpatialContextCollection : public FdoNamedCollection<c_KgOraSpatialContext, FdoException>
{
public:
c_KgOraSpatialContextCollection(void) {}
Modified: trunk/Providers/KingOracle/src/Provider/c_KgOraSqlParamDesc.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_KgOraSqlParamDesc.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_KgOraSqlParamDesc.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -1,18 +1,18 @@
-/*
-* Copyright (C) 2006 SL-King d.o.o
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of version 2.1 of the GNU Lesser
-* General Public License as published by the Free Software Foundation.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+/*
+* Copyright (C) 2006 SL-King d.o.o
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of version 2.1 of the GNU Lesser
+* General Public License as published by the Free Software Foundation.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "StdAfx.h"
Modified: trunk/Providers/KingOracle/src/Provider/c_OCCI_API.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_OCCI_API.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_OCCI_API.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -1,18 +1,18 @@
-/*
-* Copyright (C) 2006 SL-King d.o.o
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of version 2.1 of the GNU Lesser
-* General Public License as published by the Free Software Foundation.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+/*
+* Copyright (C) 2006 SL-King d.o.o
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of version 2.1 of the GNU Lesser
+* General Public License as published by the Free Software Foundation.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "StdAfx.h"
@@ -70,21 +70,21 @@
catch(oracle::occi::SQLException& ea)
{
- GisStringP gstr = ea.getMessage().c_str();
- throw GisException::Create (gstr);
+ FdoStringP gstr = ea.getMessage().c_str();
+ throw FdoException::Create (gstr);
}
catch(...)
{
- throw GisException::Create (L"Unknown exception");
+ throw FdoException::Create (L"Unknown exception");
}
}//end of c_OCCI_API::OcciInit
bool c_OCCI_API::IsInit() { return g_Env != NULL; }
+oracle::occi::Environment* c_OCCI_API::GetEnvironment() { return g_Env; }
-
StatelessConnectionPool* c_OCCI_API::GetConnPool(const char*User,const char*Password,const char* DbLink,int& IndCpDesc)
{
vector< t_ConnPoolDesc>::iterator iter;
Modified: trunk/Providers/KingOracle/src/Provider/c_OCCI_API.h
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_OCCI_API.h 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_OCCI_API.h 2007-02-23 21:13:21 UTC (rev 2611)
@@ -1,18 +1,18 @@
-/*
-* Copyright (C) 2006 SL-King d.o.o
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of version 2.1 of the GNU Lesser
-* General Public License as published by the Free Software Foundation.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+/*
+* Copyright (C) 2006 SL-King d.o.o
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of version 2.1 of the GNU Lesser
+* General Public License as published by the Free Software Foundation.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _c_OCCI_API_h
@@ -43,6 +43,8 @@
static int GetTablePkeyColumns(oracle::occi::Connection * OcciConnection,const char* Owner,const char* TableName,vector<string>& ColNames);
static FdoCommonThreadMutex m_Mutex;
+
+ static oracle::occi::Environment* GetEnvironment();
private:
static oracle::occi::StatelessConnectionPool* c_OCCI_API::GetConnPool(const char*User,const char*Password,const char* DbLink,int& IndCpDesc);
Modified: trunk/Providers/KingOracle/src/Provider/c_SdoGeomToAGF.cpp
===================================================================
--- trunk/Providers/KingOracle/src/Provider/c_SdoGeomToAGF.cpp 2007-02-23 17:39:54 UTC (rev 2610)
+++ trunk/Providers/KingOracle/src/Provider/c_SdoGeomToAGF.cpp 2007-02-23 21:13:21 UTC (rev 2611)
@@ -748,7 +748,7 @@
if( !islinear )
{
- AGF_UpdateInt(geometry_type_buffpos,GisGeometryType_CurveString);
+ AGF_UpdateInt(geometry_type_buffpos,FdoGeometryType_CurveString);
}
@@ -807,7 +807,7 @@
if( islinear )
AGF_WriteGeometryType(FdoGeometryType_MultiLineString);
else
- AGF_WriteGeometryType(GisGeometryType_MultiCurveString);
+ AGF_WriteGeometryType(FdoGeometryType_MultiCurveString);
int num_strings = 0;
@@ -973,7 +973,7 @@
// and two points for each arc
for(int ind=0;ind<numarcs;ind++)
{
- AGF_WriteInt(GisGeometryComponentType_CircularArcSegment);
+ AGF_WriteInt(FdoGeometryComponentType_CircularArcSegment);
AGF_WritePointsFromOrdinates(ord,2);
}
@@ -1127,7 +1127,7 @@
}
else
{
- AGF_WriteInt(GisGeometryComponentType_CircularArcSegment); // arc CurveElmentType
+ AGF_WriteInt(FdoGeometryComponentType_CircularArcSegment); // arc CurveElmentType
AGF_WritePointsFromOrdinates(ord,2); // za arc sta dve tocki
@@ -1327,7 +1327,7 @@
if( !islinear )
{
- AGF_UpdateInt(geometry_type_buffpos,GisGeometryType_CurvePolygon);
+ AGF_UpdateInt(geometry_type_buffpos,FdoGeometryType_CurvePolygon);
}
return true;
@@ -1377,7 +1377,7 @@
if( islinear )
AGF_WriteGeometryType(FdoGeometryType_MultiPolygon);
else
- AGF_WriteGeometryType(GisGeometryType_MultiCurvePolygon);
+ AGF_WriteGeometryType(FdoGeometryType_MultiCurvePolygon);
int num_poly = 0;
More information about the fdo-commits
mailing list