Skip to content

Commit 8b06dd3

Browse files
committed
fix docs
1 parent bf43d7d commit 8b06dd3

1 file changed

Lines changed: 29 additions & 32 deletions

File tree

  • firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline

firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline/expressions.kt

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3309,16 +3309,16 @@ abstract class Expression internal constructor() {
33093309
@JvmStatic
33103310
fun mapRemove(mapField: String, key: String): Expression =
33113311
FunctionExpression("map_remove", notImplemented, mapField, key)
3312+
33123313
/**
33133314
* Creates an expression that returns a new map with the specified entries added or updated.
33143315
*
3315-
* - Only performs shallow updates to the map.
3316-
* - Setting a value to `null` will retain the key with a `null` value. To remove a key
3317-
* entirely, use `mapRemove`.
3316+
* Note: This only performs shallow updates to the map. Setting a value to `null` will retain
3317+
* the key with a `null` value. To remove a key entirely, use `mapRemove`.
33183318
*
33193319
* ```kotlin
3320-
* // Set the 'category' key to the value of the 'newCategory' field.
3321-
* mapSet(field("metadata"), field("keyField"), field("newCategory"))
3320+
* // Set the 'city' to "San Francisco" in the 'address' map
3321+
* mapSet(field("address"), constant("city"), constant("San Francisco"));
33223322
* ```
33233323
*
33243324
* @param mapExpr The expression representing the map.
@@ -3339,13 +3339,12 @@ abstract class Expression internal constructor() {
33393339
/**
33403340
* Creates an expression that returns a new map with the specified entries added or updated.
33413341
*
3342-
* - Only performs shallow updates to the map.
3343-
* - Setting a value to `null` will retain the key with a `null` value. To remove a key
3344-
* entirely, use `mapRemove`.
3342+
* Note: This only performs shallow updates to the map. Setting a value to `null` will retain
3343+
* the key with a `null` value. To remove a key entirely, use `mapRemove`.
33453344
*
33463345
* ```kotlin
3347-
* // Set the 'category' key to "Electronics" and 'active' to true.
3348-
* mapSet(field("metadata"), "category", "Electronics", "active", true)
3346+
* // Set the 'city' to "San Francisco" in the 'address' map
3347+
* mapSet(field("address"), "city", "San Francisco");
33493348
* ```
33503349
*
33513350
* @param mapExpr The map field to set entries in.
@@ -3373,13 +3372,12 @@ abstract class Expression internal constructor() {
33733372
/**
33743373
* Creates an expression that returns a new map with the specified entries added or updated.
33753374
*
3376-
* - Only performs shallow updates to the map.
3377-
* - Setting a value to `null` will retain the key with a `null` value. To remove a key
3378-
* entirely, use `mapRemove`.
3375+
* Note: This only performs shallow updates to the map. Setting a value to `null` will retain
3376+
* the key with a `null` value. To remove a key entirely, use `mapRemove`.
33793377
*
33803378
* ```kotlin
3381-
* // Set a dynamic key to a dynamic value in the 'metadata' field map.
3382-
* mapSet("metadata", field("keyField"), field("valueField"))
3379+
* // Set the 'city' to "San Francisco" in the 'address' map
3380+
* mapSet("address", constant("city"), constant("San Francisco"));
33833381
* ```
33843382
*
33853383
* @param mapField The map field to set entries in.
@@ -3400,13 +3398,12 @@ abstract class Expression internal constructor() {
34003398
/**
34013399
* Creates an expression that returns a new map with the specified entries added or updated.
34023400
*
3403-
* - Only performs shallow updates to the map.
3404-
* - Setting a value to `null` will retain the key with a `null` value. To remove a key
3405-
* entirely, use `mapRemove`.
3401+
* Note: This only performs shallow updates to the map. Setting a value to `null` will retain
3402+
* the key with a `null` value. To remove a key entirely, use `mapRemove`.
34063403
*
34073404
* ```kotlin
3408-
* // Set the 'category' key to "Electronics" in the 'metadata' field map.
3409-
* mapSet("metadata", "category", "Electronics")
3405+
* // Set the 'city' to "San Francisco" in the 'address' map
3406+
* mapSet("address", "city", "San Francisco");
34103407
* ```
34113408
*
34123409
* @param mapField The map field to set entries in.
@@ -3429,8 +3426,8 @@ abstract class Expression internal constructor() {
34293426
/**
34303427
* Creates an expression that returns the keys of a map.
34313428
*
3432-
* While the backend generally preserves insertion order, relying on the order of the output
3433-
* array is not guaranteed and should be avoided.
3429+
* Note: While the backend generally preserves insertion order, relying on the order of the
3430+
* output array is not guaranteed and should be avoided.
34343431
*
34353432
* ```kotlin
34363433
* // Get the keys of a map expression.
@@ -3447,8 +3444,8 @@ abstract class Expression internal constructor() {
34473444
/**
34483445
* Creates an expression that returns the keys of a map.
34493446
*
3450-
* While the backend generally preserves insertion order, relying on the order of the output
3451-
* array is not guaranteed and should be avoided.
3447+
* Note: While the backend generally preserves insertion order, relying on the order of the
3448+
* output array is not guaranteed and should be avoided.
34523449
*
34533450
* ```kotlin
34543451
* // Get the keys of the 'metadata' map field.
@@ -3465,8 +3462,8 @@ abstract class Expression internal constructor() {
34653462
/**
34663463
* Creates an expression that returns the values of a map.
34673464
*
3468-
* While the backend generally preserves insertion order, relying on the order of the output
3469-
* array is not guaranteed and should be avoided.
3465+
* Note: While the backend generally preserves insertion order, relying on the order of the
3466+
* output array is not guaranteed and should be avoided.
34703467
*
34713468
* ```kotlin
34723469
* // Get the values of a map expression.
@@ -3483,8 +3480,8 @@ abstract class Expression internal constructor() {
34833480
/**
34843481
* Creates an expression that returns the values of a map.
34853482
*
3486-
* While the backend generally preserves insertion order, relying on the order of the output
3487-
* array is not guaranteed and should be avoided.
3483+
* Note: While the backend generally preserves insertion order, relying on the order of the
3484+
* output array is not guaranteed and should be avoided.
34883485
*
34893486
* ```kotlin
34903487
* // Get the values of the 'metadata' map field.
@@ -3502,8 +3499,8 @@ abstract class Expression internal constructor() {
35023499
* Creates an expression that returns the entries of a map as an array of maps, where each map
35033500
* contains a "k" property for the key and a "v" property for the value.
35043501
*
3505-
* While the backend generally preserves insertion order, relying on the order of the output
3506-
* array is not guaranteed and should be avoided.
3502+
* Note: While the backend generally preserves insertion order, relying on the order of the
3503+
* output array is not guaranteed and should be avoided.
35073504
*
35083505
* ```kotlin
35093506
* // Get the entries of a map expression.
@@ -3520,8 +3517,8 @@ abstract class Expression internal constructor() {
35203517
/**
35213518
* Creates an expression that returns the entries of a map as an array of maps.
35223519
*
3523-
* While the backend generally preserves insertion order, relying on the order of the output
3524-
* array is not guaranteed and should be avoided.
3520+
* Note: While the backend generally preserves insertion order, relying on the order of the
3521+
* output array is not guaranteed and should be avoided.
35253522
*
35263523
* ```kotlin
35273524
* // Get the entries of the 'metadata' map field.

0 commit comments

Comments
 (0)