30 | | This is the most important part of the RFC. It describes the problem domain in detail. Focusing on this will allow reviewers to fully understand why the proposed change is being made, and potentially suggest different/better ways of accomplishing the desired results. The more time we spend on understanding the problem, the better our solution will be. |
| 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 | |
| 32 | virtual MgPropertyCollection* UpdateFeatures( MgResourceIdentifier* resource, |
| 33 | MgFeatureCommandCollection* commands, |
| 34 | bool useTransaction ) = 0; |
| 35 | |
| 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 | |
| 38 | virtual INT32 ExecuteSqlNonQuery( MgResourceIdentifier* resource, |
| 39 | CREFSTRING sqlNonSelectStatement ) = 0; |
| 40 | virtual MgSpatialContextReader* GetSpatialContexts( MgResourceIdentifier* resource, |
| 41 | bool bActiveOnly) = 0; |
| 42 | |
| 43 | This proposal is to extend Feature Service to support executing a sequence of sql statements within a single transaction. |