Interface IUpdateFeatures
Defines a command that updates one or more features in a Feature Source based on some filtering criteria
Namespace: OSGeo.MapGuide.MaestroAPI.Commands
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public interface IUpdateFeatures : IFeatureCommand, ICommand
Remarks
This command is only supported on certain implementations of IServerConnection You can find out if the connection supports this command through the Capabilities
Examples
How to update all features matching a given filter to the given value
IServerConnection conn = ...;
IUpdateFeatures updateCmd = (IUpdateFeatures)conn.CreateCommand((int)CommandType.UpdateFeatures);
updateCmd.FeatureSourceId = "Library://My.FeatureSource";
updateCmd.ClassName = "MyFeatureClass";
updateCmd.Filter = "Name = 'Bar'";
updateCmd.ValuesToUpdate = new MutableRecord();
updateCmd.ValuesToUpdate.PutValue("Name", new StringValue("Foo"));
int updated = updateCmd.Execute();
Properties
| Improve this Doc View SourceFilter
Gets or sets the filter that determines which features will be updated. If empty, will cause all features to be updated
Declaration
string Filter { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ValuesToUpdate
Gets or sets the collection of values to apply
Declaration
IMutableRecord ValuesToUpdate { get; set; }
Property Value
Type | Description |
---|---|
IMutableRecord |
Methods
| Improve this Doc View SourceExecute()
Executes the command
Declaration
int Execute()
Returns
Type | Description |
---|---|
System.Int32 | The number of features updated by this command |