@@ -9258,73 +9258,73 @@ export function ifAbsent(
92589258
92599259/**
92609260 * @beta
9261- * Creates an expression that returns the `elseExpr` argument if `ifExpr` is null, else
9261+ * Creates an expression that returns the `elseExpr` argument if `ifExpr` is null or absent , else
92629262 * return the result of the `ifExpr` argument evaluation.
92639263 *
92649264 * @example
92659265 * ```typescript
92669266 * // Returns the value of the 'optional_field', or returns value of the 'default_field'
9267- * // if the 'optional_field' value is null.
9267+ * // if the 'optional_field' value is null or absent .
92689268 * ifNull(field("optional_field"), field("default_field"))
92699269 * ```
92709270 *
9271- * @param ifExpr The expression to check for null.
9272- * @param elseExpr The value that will be returned if `ifExpr` evaluates to a null value .
9271+ * @param ifExpr The expression to check for null or absence .
9272+ * @param elseExpr The expression that will be evaluated and returned if `ifExpr` is null or absent .
92739273 * @returns A new `Expression` representing the ifNull operation.
92749274 */
92759275export function ifNull ( ifExpr : Expression , elseExpr : Expression ) : Expression ;
92769276
92779277/**
92789278 * @beta
9279- * Creates an expression that returns the `elseValue` argument if `ifExpr` is null, else
9279+ * Creates an expression that returns the `elseValue` argument if `ifExpr` is null or absent , else
92809280 * return the result of the `ifExpr` argument evaluation.
92819281 *
92829282 * @example
92839283 * ```typescript
92849284 * // Returns the value of the 'optional_field', or returns 'default_value'
9285- * // if the 'optional_field' value is null.
9285+ * // if the 'optional_field' value is null or absent .
92869286 * ifNull(field("optional_field"), "default_value")
92879287 * ```
92889288 *
9289- * @param ifExpr The expression to check for null .
9290- * @param elseValue The value that will be returned if `ifExpr` evaluates to a null value.
9289+ * @param ifExpr The expression to check for absence .
9290+ * @param elseValue The value that will be returned if `ifExpr` evaluates to a null or absent value.
92919291 * @returns A new `Expression` representing the ifNull operation.
92929292 */
92939293export function ifNull ( ifExpr : Expression , elseValue : unknown ) : Expression ;
92949294
92959295/**
92969296 * @beta
9297- * Creates an expression that returns the `elseExpr` argument if `ifFieldName` is null, else
9297+ * Creates an expression that returns the `elseExpr` argument if `ifFieldName` is null or absent , else
92989298 * return the value of the field.
92999299 *
93009300 * @example
93019301 * ```typescript
93029302 * // Returns the value of the 'optional_field', or returns the value of
9303- * // 'default_field' if 'optional_field' is null.
9303+ * // 'default_field' if 'optional_field' is null or absent .
93049304 * ifNull("optional_field", field("default_field"))
93059305 * ```
93069306 *
9307- * @param ifFieldName The field to check for null.
9307+ * @param ifFieldName The field to check for null or absence .
93089308 * @param elseExpr The expression that will be evaluated and returned if `ifFieldName` is
9309- * null.
9309+ * null or absent .
93109310 * @returns A new `Expression` representing the ifNull operation.
93119311 */
93129312export function ifNull ( ifFieldName : string , elseExpr : Expression ) : Expression ;
93139313
93149314/**
93159315 * @beta
9316- * Creates an expression that returns the `elseValue` argument if `ifFieldName` is null, else
9316+ * Creates an expression that returns the `elseValue` argument if `ifFieldName` is null or absent , else
93179317 * return the value of the field.
93189318 *
93199319 * @example
93209320 * ```typescript
93219321 * // Returns the value of the 'optional_field', or returns 'default_value'
9322- * // if the field is null.
9322+ * // if the field is null or absent .
93239323 * ifNull("optional_field", "default_value")
93249324 * ```
93259325 *
9326- * @param ifFieldName The field to check for null.
9327- * @param elseValue The value that will be returned if `ifFieldName` is null.
9326+ * @param ifFieldName The field to check for null or absence .
9327+ * @param elseValue The value that will be returned if `ifFieldName` is null or absent .
93289328 * @returns A new `Expression` representing the ifNull operation.
93299329 */
93309330export function ifNull ( ifFieldName : string , elseValue : unknown ) : Expression ;
@@ -9339,29 +9339,31 @@ export function ifNull(
93399339
93409340/**
93419341 * @beta
9342- * Returns the first non-null value among the given expressions/values.
9342+ * Returns the first non-null, non-absent argument, without evaluating
9343+ * the rest of the arguments. When all arguments are null or absent, returns the last argument.
93439344 *
93449345 * @example
93459346 * ```typescript
93469347 * // Returns the value of 'optional_field', or if that is
93479348 * // null, then returns the value of 'default_field'
9348- * coalesce("optional_field", field("default_field"))
9349+ * coalesce(field( "optional_field") , field("default_field"))
93499350 * ```
93509351 *
9351- * @param first The first expression to evaluate .
9352- * @param second The next expression or literal to evaluate .
9353- * @param others Additional expressions or literals to evaluate .
9352+ * @param expression The first expression to check for null .
9353+ * @param replacement The fallback expression or value if the first one is null .
9354+ * @param others Optional additional expressions to check if previous ones are null .
93549355 * @returns A new `Expression` representing the coalesce operation.
93559356 */
93569357export function coalesce (
9357- first : Expression ,
9358- second : Expression | unknown ,
9358+ expression : Expression ,
9359+ replacement : Expression | unknown ,
93599360 ...others : Array < Expression | unknown >
93609361) : Expression ;
93619362
93629363/**
93639364 * @beta
9364- * Returns the first non-null value among the given expressions/values.
9365+ * Returns the first non-null, non-absent argument, without evaluating
9366+ * the rest of the arguments. When all arguments are null or absent, returns the last argument.
93659367 *
93669368 * @example
93679369 * ```typescript
@@ -9370,14 +9372,14 @@ export function coalesce(
93709372 * coalesce("optional_field", field("default_field"))
93719373 * ```
93729374 *
9373- * @param firstFieldName The first field name to evaluate .
9374- * @param second The next expression or literal to evaluate .
9375- * @param others Additional expressions or literals to evaluate .
9375+ * @param fieldName The name of the first field to check for null .
9376+ * @param replacement The fallback expression or value if the first one is null .
9377+ * @param others Optional additional expressions to check if previous ones are null .
93769378 * @returns A new `Expression` representing the coalesce operation.
93779379 */
93789380export function coalesce (
9379- firstFieldName : string ,
9380- second : Expression | unknown ,
9381+ fieldName : string ,
9382+ replacement : Expression | unknown ,
93819383 ...others : Array < Expression | unknown >
93829384) : Expression ;
93839385
0 commit comments