언어

SetSchemaRequest.Builder.SetVersion(Int32) 메서드

정의

데이터베이스에서 전체 AppSearchSchema의 버전 번호를 설정합니다.

[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

매개 변수

version
Int32

전체 스키마 집합의 버전을 나타내는 양의 정수는 AppSearchSession 데이터베이스의 전체 스키마 버전을 나타내며 기본 버전은 1입니다. 값이 1 이상

반품

특성

설명

데이터베이스에서 전체 AppSearchSchema의 버전 번호를 설정합니다. AppSearchSession 데이터베이스는 한 번에 하나의 버전에 대한 문서만 보관할 수 있습니다. AppSearch에 현재 저장된 버전 번호와 다른 버전 번호를 설정하면 AppSearch가 AppSearchSession.setSchema에 제공된 Migrator를 호출하여 AppSearch에 이미 있는 문서를 이전 버전에서 이 요청의 집합으로 마이그레이션합니다. 스키마 집합을 변경하지 않고 버전 번호를 업데이트할 수 있습니다. 버전 번호는 AppSearchSession 데이터베이스에 이미 저장된 현재 버전 번호와 동일하게 유지되거나 증가하거나 감소할 수 있습니다. 빈 데이터베이스의 버전은 항상 0입니다. AppSearchSchema가 없는 경우 버전을 SetSchemaRequest로 설정할 수 없습니다.

에 대한 android.app.appsearch.SetSchemaRequest.Builder.setVersionAndroid 참조

이 페이지의 일부는 만들고 공유한 작업을 기반으로 하며 에 설명된 조건에 따라 사용됩니다.

적용 대상