Skip to content

Commit

Permalink
Merging to release-5.4: [DX-1496] Refactor Blob Lang Methods Page For…
Browse files Browse the repository at this point in the history
… Indexing (#5036)

[DX-1496] Refactor Blob Lang Methods Page For Indexing (#5036)

refactor methods page for indexing

---------

Co-authored-by: Simon Pears <simon@tyk.io>
Co-authored-by: Yaara <yaara@tyk.io>
Co-authored-by: Yaara <letz.yaara@gmail.com>
  • Loading branch information
4 people authored Jul 11, 2024
1 parent 67fb7eb commit 860b746
Show file tree
Hide file tree
Showing 17 changed files with 3,683 additions and 3,564 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In [Bloblang]({< ref "/product-stack/tyk-streaming/guides/bloblang/overview" >})

When a mathematical operation is performed with two or more integer values [Bloblang]({< ref "/product-stack/tyk-streaming/guides/bloblang/overview" >}) will create an integer result, with the exception of division. However, if any number within a mathematical operation is a floating point then the result will be a floating point value.

In order to explicitly coerce numbers into integer types you can use the [.ceil(), .floor(), or .round()]({{< ref "/product-stack/tyk-streaming/guides/bloblang/methods#number_manipulation" >}}) methods.
In order to explicitly coerce numbers into integer types you can use the [.ceil(), .floor(), or .round()]({{< ref "/product-stack/tyk-streaming/guides/bloblang/methods/numbers" >}}) methods.

## Comparison

Expand All @@ -26,7 +26,7 @@ If you wish to reverse the boolean result of a complex query then simply place t

### Equality

The equality operators (`==` and `!=`) are valid to use against any value type. In order for arguments to be considered equal they must match in both their basic type (`string`, `number`, `null`, `bool`, etc) as well as their value. If you wish to compare mismatched value types then use [coercion methods]({{< ref "/product-stack/tyk-streaming/guides/bloblang/methods#type-coercion" >}}).
The equality operators (`==` and `!=`) are valid to use against any value type. In order for arguments to be considered equal they must match in both their basic type (`string`, `number`, `null`, `bool`, etc) as well as their value. If you wish to compare mismatched value types then use [coercion methods]({{< ref "/product-stack/tyk-streaming/guides/bloblang/methods/type-coercion" >}}).

Number arguments are considered equal if their value is the same when represented the same way, which means their underlying representations (integer, float, etc) do not need to match in order for them to be considered equal.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ root.foo = batch_size()

### content

Returns the full raw contents of the mapping target message as a byte array. When mapping to a JSON field the value should be encoded using the method [encode]({{< ref "/product-stack/tyk-streaming/guides/bloblang/methods#encode" >}}), or cast to a string directly using the method [string]({{< ref "/product-stack/tyk-streaming/guides/bloblang/methods#string" >}}), otherwise it will be base64 encoded by default.
Returns the full raw contents of the mapping target message as a byte array. When mapping to a JSON field the value should be encoded using the method [encode]({{< ref "/product-stack/tyk-streaming/guides/bloblang/methods/encoding-and-encryption#encode" >}}), or cast to a string directly using the method [string]({{< ref "/product-stack/tyk-streaming/guides/bloblang/methods/type-coercion#string" >}}), otherwise it will be base64 encoded by default.

#### Examples

Expand Down
Loading

0 comments on commit 860b746

Please sign in to comment.