SetSchemaRequest.Builder.SetVersion(Int32) 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 the version number of the overall AppSearchSchema in the database.
[Android.Runtime.Register("setVersion", "(I)Landroid/app/appsearch/SetSchemaRequest$Builder;", "", ApiSince=31)]
public Android.App.AppSearch.SetSchemaRequest.Builder SetVersion(int version);
[<Android.Runtime.Register("setVersion", "(I)Landroid/app/appsearch/SetSchemaRequest$Builder;", "", ApiSince=31)>]
member this.SetVersion : int -> Android.App.AppSearch.SetSchemaRequest.Builder
Parameters
- version
- Int32
A positive integer representing the version of the entire set of schemas represents the version of the whole schema in the AppSearchSession database, default version is 1. Value is 1 or greater
Returns
- Attributes
Remarks
Sets the version number of the overall AppSearchSchema in the database. The AppSearchSession database can only ever hold documents for one version at a time. Setting a version number that is different from the version number currently stored in AppSearch will result in AppSearch calling the Migrator s provided to AppSearchSession.setSchema to migrate the documents already in AppSearch from the previous version to the one set in this request. The version number can be updated without any other changes to the set of schemas. The version number can stay the same, increase, or decrease relative to the current version number that is already stored in the AppSearchSession database. The version of an empty database will always be 0. You cannot set version to the SetSchemaRequest, if it doesn't contains any AppSearchSchema.
Android reference for android.app.appsearch.SetSchemaRequest.Builder.setVersion.
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.