Changeset 6759
- Timestamp:
- 11/08/04 21:49:12 (4 years ago)
- Files:
-
- trunk/ogr/ogrsf_frmts/oci/ogrocidatasource.cpp (modified) (2 diffs)
- trunk/ogr/ogrsf_frmts/oci/ogrocitablelayer.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ogr/ogrsf_frmts/oci/ogrocidatasource.cpp
r6280 r6759 29 29 * 30 30 * $Log$ 31 * Revision 1.24 2004/11/09 02:49:12 fwarmerdam 32 * Don't add user_sdo_geom_metadata record till finalize (layer load complete) 33 * time as that is when we have all the diminfo details. Inserts of metadata 34 * records with NULL diminfos fails in Oracle 10 due to new constraints. 35 * 31 36 * Revision 1.23 2004/07/09 07:07:39 warmerda 32 37 * Added OGRSQL dialect support. … … 506 511 507 512 /* -------------------------------------------------------------------- */ 508 /* Add the table to the user_sdo_geom_metadata table without */509 /* setting the dimension information. Do that later when */510 /* requesting an index to be built. */511 /* -------------------------------------------------------------------- */512 513 sprintf( szCommand,514 "INSERT INTO USER_SDO_GEOM_METADATA VALUES "515 "( '%s', '%s', NULL, %s )",516 pszSafeLayerName, "ORA_GEOMETRY", szSRSId );517 518 oStatement.Execute( szCommand );519 520 /* -------------------------------------------------------------------- */521 513 /* Create the layer object. */ 522 514 /* -------------------------------------------------------------------- */ trunk/ogr/ogrsf_frmts/oci/ogrocitablelayer.cpp
r6605 r6759 31 31 * 32 32 * $Log$ 33 * Revision 1.29 2004/11/09 02:49:12 fwarmerdam 34 * Don't add user_sdo_geom_metadata record till finalize (layer load complete) 35 * time as that is when we have all the diminfo details. Inserts of metadata 36 * records with NULL diminfos fails in Oracle 10 due to new constraints. 37 * 33 38 * Revision 1.28 2004/09/28 17:19:25 fwarmerdam 34 39 * Added untested support for OCI_FID config variable for FID column name. … … 1231 1236 /* Prepare dimension update statement. */ 1232 1237 /* -------------------------------------------------------------------- */ 1233 sDimUpdate.Append( "UPDATE USER_SDO_GEOM_METADATA SET DIMINFO = " ); 1238 sDimUpdate.Append( "INSERT INTO USER_SDO_GEOM_METADATA VALUES " ); 1239 sDimUpdate.Appendf( strlen(poFeatureDefn->GetName()) + 100, 1240 "('%s', 'ORA_GEOMETRY', ", 1241 poFeatureDefn->GetName() ); 1242 1234 1243 sDimUpdate.Append( "MDSYS.SDO_DIM_ARRAY(" ); 1235 1236 1244 sDimUpdate.Appendf(200, 1237 1245 "MDSYS.SDO_DIM_ELEMENT('X',%.16g,%.16g,%.12g)", … … 1248 1256 } 1249 1257 1250 sDimUpdate.Append( ")" ); 1251 1252 sDimUpdate.Appendf( strlen(poFeatureDefn->GetName()) + 100, 1253 " WHERE table_name = '%s'", 1254 poFeatureDefn->GetName() ); 1258 if( nSRID == -1 ) 1259 sDimUpdate.Append( "), NULL)" ); 1260 else 1261 sDimUpdate.Appendf( 100, "), %d)", nSRID ); 1255 1262 1256 1263 /* -------------------------------------------------------------------- */
