public static class FirestoreOptions.Builder extends ServiceOptions.Builder<Firestore,FirestoreOptions,FirestoreOptions.Builder>Methods
build()
public FirestoreOptions build()| Returns | |
|---|---|
| Type | Description |
FirestoreOptions |
|
setAlwaysUseImplicitOrderBy(boolean alwaysUseImplicitOrderBy)
public FirestoreOptions.Builder setAlwaysUseImplicitOrderBy(boolean alwaysUseImplicitOrderBy)Sets whether to always include implicit order by clauses in the query request (e.g., for inequality queries).
By default, the SDK only sends explicit order by clauses and relies on the backend to append implicit ones (unless cursors are used). Firestore Enterprise edition, however, does not automatically append these clauses because it does not require an index for every query. This option allows users to opt-in to having the SDK always append the implicit order by clauses, ensuring behavior consistent with standard edition.
Setting this option to true against Standard Edition is essentially a no-op as Standard Edition automatically apply implicit orderby from the backend.
| Parameter | |
|---|---|
| Name | Description |
alwaysUseImplicitOrderBy |
booleanWhether to always include implicit order by clauses. |
| Returns | |
|---|---|
| Type | Description |
FirestoreOptions.Builder |
|
setChannelProvider(TransportChannelProvider channelProvider)
public FirestoreOptions.Builder setChannelProvider(TransportChannelProvider channelProvider)Sets the TransportChannelProvider to use with this Firestore client.
| Parameter | |
|---|---|
| Name | Description |
channelProvider |
TransportChannelProviderA InstantiatingGrpcChannelProvider object that defines the transport provider for this client. |
| Returns | |
|---|---|
| Type | Description |
FirestoreOptions.Builder |
|
setCredentialsProvider(CredentialsProvider credentialsProvider)
public FirestoreOptions.Builder setCredentialsProvider(CredentialsProvider credentialsProvider)Sets the CredentialsProvider to use with this Firestore client.
| Parameter | |
|---|---|
| Name | Description |
credentialsProvider |
CredentialsProviderA CredentialsProvider object that defines the credential provider for this client. |
| Returns | |
|---|---|
| Type | Description |
FirestoreOptions.Builder |
|
setDatabaseId(String databaseId)
public FirestoreOptions.Builder setDatabaseId(String databaseId)Sets the database ID to use with this Firestore client.
| Parameter | |
|---|---|
| Name | Description |
databaseId |
StringThe Firestore database ID to use with this client. |
| Returns | |
|---|---|
| Type | Description |
FirestoreOptions.Builder |
|
setEmulatorHost(String emulatorHost)
public FirestoreOptions.Builder setEmulatorHost(String emulatorHost)Sets the emulator host to use with this Firestore client. The value passed to this method
will take precedent if the FIRESTORE_EMULATOR_HOST environment variable is also set.
| Parameter | |
|---|---|
| Name | Description |
emulatorHost |
StringThe Firestore emulator host to use with this client. |
| Returns | |
|---|---|
| Type | Description |
FirestoreOptions.Builder |
|
setOpenTelemetryOptions(FirestoreOpenTelemetryOptions openTelemetryOptions)
public FirestoreOptions.Builder setOpenTelemetryOptions(FirestoreOpenTelemetryOptions openTelemetryOptions)Sets the FirestoreOpenTelemetryOptions to be used for this Firestore instance.
| Parameter | |
|---|---|
| Name | Description |
openTelemetryOptions |
FirestoreOpenTelemetryOptionsThe |
| Returns | |
|---|---|
| Type | Description |
FirestoreOptions.Builder |
|
setTransportOptions(TransportOptions transportOptions)
public FirestoreOptions.Builder setTransportOptions(TransportOptions transportOptions)Sets the TransportOptions to use with this Firestore client.
| Parameter | |
|---|---|
| Name | Description |
transportOptions |
com.google.cloud.TransportOptionsA GrpcTransportOptions object that defines the transport options for this client. |
| Returns | |
|---|---|
| Type | Description |
FirestoreOptions.Builder |
|