Changes between Version 11 and Version 12 of MapGuideRfc78
- Timestamp:
- 07/09/09 23:18:56 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc78
v11 v12 30 30 Currently MapGuide Feature Service supports executing a sequence of standard commands within a single transaction through the API illustrated below. The standard commands are delete/update/insert. If you pass in true for useTransaction, the API will start a transaction and commit(or rollback) it at the end. Thus all command execution will reside inside a single transaction. 31 31 {{{ 32 33 34 32 virtual MgPropertyCollection* UpdateFeatures( MgResourceIdentifier* resource, 33 MgFeatureCommandCollection* commands, 34 bool useTransaction ) = 0; 35 35 }}} 36 36 However, MapGuide Feature Service also provides another two APIs to execute sql statements as illustrated below, where a database transaction will internally be started and committed befor and after the sql statement execution. Here the capability of executing a sequence of sql statements within a single transaction is missing. 37 37 {{{ 38 39 40 41 38 virtual INT32 ExecuteSqlNonQuery( MgResourceIdentifier* resource, 39 CREFSTRING sqlNonSelectStatement ) = 0; 40 virtual MgSpatialContextReader* GetSpatialContexts( MgResourceIdentifier* resource, 41 bool bActiveOnly) = 0; 42 42 }}} 43 43 This proposal is to extend Feature Service to support executing a sequence of sql statements within a single transaction. … … 46 46 47 47 A new class of MgTransaction will be added to represent a transaction to be performed in a data store. 48 {{{ 49 /// \brief 50 /// MgTransaction represents a transaction to be performed in a DataStore. 51 /// If the transaction is time out, commit or rollback a transaction will 52 /// result in one exception MgFeatureServiceException thrown. 53 class MgTransaction : public MgGuardDisposable 54 { 55 PUBLISHED_API: 56 /// \brief 57 /// Commit the transaction. 58 /// 59 virtual void Commit() = 0; 48 60 61 /// \brief 62 /// Rollback the transaction. 63 /// 64 virtual void Rollback() = 0; 65 66 /// \brief 67 /// Get the identifier of feature source associated with the transaction. 68 /// 69 /// \return 70 /// Returns the identifier of feature source associated with the transaction. 71 /// 72 virtual MgResourceIdentifier* GetFeatureSource() = 0; 73 }; 74 }}} 49 75 == Implications == 50 76