SetSchemaRequest.Builder.SetMigrators Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets a Map of Migrator s.
[Android.Runtime.Register("setMigrators", "(Ljava/util/Map;)Landroid/app/appsearch/SetSchemaRequest$Builder;", "", ApiSince=31)]
public Android.App.AppSearch.SetSchemaRequest.Builder SetMigrators(System.Collections.Generic.IDictionary<string,Android.App.AppSearch.Migrator> migrators);
[<Android.Runtime.Register("setMigrators", "(Ljava/util/Map;)Landroid/app/appsearch/SetSchemaRequest$Builder;", "", ApiSince=31)>]
member this.SetMigrators : System.Collections.Generic.IDictionary<string, Android.App.AppSearch.Migrator> -> Android.App.AppSearch.SetSchemaRequest.Builder
Parameters
- migrators
- IDictionary<String,Migrator>
A Map of migrators that translate a document from its current version to the final version set via setVersion(int). The key of the map is the schema type that the Migrator value applies to. This value cannot be null.
Returns
- Attributes
Remarks
Sets a Map of Migrator s. The key of the map is the schema type that the Migrator value applies to. The Migrator migrates all GenericDocument s under given schema type from the current version number stored in AppSearch to the final version set via setVersion(int). A Migrator will be invoked if the current version number stored in AppSearch is different from the final version set via setVersion(int) and Migrator.shouldMigrate returns true. The target schema type of the output GenericDocument of Migrator.onUpgrade or Migrator.onDowngrade must exist in this SetSchemaRequest.
Android reference for android.app.appsearch.SetSchemaRequest.Builder.setMigrators.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.