Changes between Version 12 and Version 13 of MapGuideRfc78


Ignore:
Timestamp:
Jul 9, 2009, 11:24:11 PM (15 years ago)
Author:
klain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc78

    v12 v13  
    7373};
    7474}}}
     75
     76Changes to Feature Service
     77{{{
     78/// \brief
     79/// Provides an abstraction layer for the storage and retrieval
     80/// of feature data in a technology-independent way. The API
     81/// lets you determine what storage technologies are available
     82/// and what capabilities they have. Access to the storage
     83/// technology is modeled as a connection. For example, you can
     84/// connect to a file and do simple insertions or connect to a
     85/// relational database and do transaction-based operations.
     86class MgFeatureService : public MgService
     87{
     88PUBLISHED_API:
     89    /// \brief
     90    /// Begins a transaction and return it.
     91    ///
     92    /// \param resource (MgResourceIdentifier)
     93    /// A resource identifier referring to a feature source.
     94    ///
     95    /// \return
     96    /// Returns an MgTransaction instance.
     97    ///
     98virtual MgTransaction* BeginTransaction(MgResourceIdentifier* resource) = 0;
     99};
     100}}}
     101
     102One example using the new API
     103{{{
     104MgTransaction tran = AcMapFeatureService::StartTransaction(resourceId);
     105AcMapFeatureService::ExecuteSql(resourceId, sql statement1);
     106AcMapFeatureService::ExecuteSql(resourceId, sql statement2);
     107AcMapFeatureService::UpdateFeatures(resourceId, standard commands, false);  // NOTE: you have to pass in false for useTransaction here.
     108tran->Commit() // or tran->Rollback();
     109}}}
     110
     111
    75112== Implications ==
    76113