Skip to content

Commit 6cad777

Browse files
committed
Add content
1 parent 96f4685 commit 6cad777

File tree

6 files changed

+249
-8
lines changed

6 files changed

+249
-8
lines changed

articles/cosmos-db/nosql/query/array-contains-all.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: ARRAY_CONTAINS_ALL
33
titleSuffix: Azure Cosmos DB for NoSQL
4-
description: An Azure Cosmos DB for NoSQL system function that TODO
4+
description: An Azure Cosmos DB for NoSQL system function that returns a boolean indicating whether the array contains all of the specified values.
55
author: seesharprun
66
ms.author: sidandrews
77
ms.reviewer: jacodel
@@ -16,3 +16,59 @@ ms.custom: query-reference
1616
# ARRAY_CONTAINS_ALL (NoSQL query)
1717

1818
[!INCLUDE[NoSQL](../../includes/appliesto-nosql.md)]
19+
20+
Returns a boolean value indicates if the first array contains all the following elements.
21+
22+
## Syntax
23+
24+
```nosql
25+
ARRAY_CONTAINS_ALL(<array_expr>, <expr> [, exprN])
26+
```
27+
28+
## Arguments
29+
30+
| | Description |
31+
| --- | --- |
32+
| **`array_expr`** | An array expression. |
33+
| **`expr`** | Expression to search for within the array. |
34+
| **`exprN`** (Optional) | One or more extra expressions to to search for within the array. |
35+
36+
## Return types
37+
38+
Returns a boolean value.
39+
40+
## Examples
41+
42+
The following example illustrates how to check for specific values or objects in an array using this function.
43+
44+
```nosql
45+
SELECT VALUE {
46+
matchesEntireArray: ARRAY_CONTAINS_ALL([1, true, "3", [1,2,3]], 1, true, "3", [1,2,3]),
47+
matchesSomeValues: ARRAY_CONTAINS_ALL([1, 2, 3, 4], 2, 3, 4, 5),
48+
matchSingleValue: ARRAY_CONTAINS_ALL([1, 2, 3, 4], 1, undefined),
49+
noMatches: ARRAY_CONTAINS_ALL([1, 2, 3, 4], 5, 6, 7, 8),
50+
emptyArray: ARRAY_CONTAINS_ALL([], 1, 2, 3),
51+
noMatchesUndefined: ARRAY_CONTAINS_ALL([1, 2, 3, 4], 5, undefined)
52+
}
53+
```
54+
55+
```json
56+
[
57+
{
58+
"matchesEntireArray": true,
59+
"matchesSomeValues": false,
60+
"noMatches": false,
61+
"emptyArray": false,
62+
"noMatchesUndefined": false
63+
}
64+
]
65+
```
66+
67+
## Remarks
68+
69+
- This system function doesn't utilize the index.
70+
71+
## Related content
72+
73+
- [`ARRAY_CONTAINS`](array-contains.md)
74+
- [`ARRAY_CONTAINS_ANY`](array-contains-any.md)

articles/cosmos-db/nosql/query/array-contains-any.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: ARRAY_CONTAINS_ANY
33
titleSuffix: Azure Cosmos DB for NoSQL
4-
description: An Azure Cosmos DB for NoSQL system function that TODO
4+
description: An Azure Cosmos DB for NoSQL system function that returns a boolean indicating whether the array contains any of the specified values.
55
author: seesharprun
66
ms.author: sidandrews
77
ms.reviewer: jacodel
@@ -16,3 +16,59 @@ ms.custom: query-reference
1616
# ARRAY_CONTAINS_ANY (NoSQL query)
1717

1818
[!INCLUDE[NoSQL](../../includes/appliesto-nosql.md)]
19+
20+
Returns a boolean value indicates if the first array contains any of the following elements.
21+
22+
## Syntax
23+
24+
```nosql
25+
ARRAY_CONTAINS_ANY(<array_expr>, <expr> [, exprN])
26+
```
27+
28+
## Arguments
29+
30+
| | Description |
31+
| --- | --- |
32+
| **`array_expr`** | An array expression. |
33+
| **`expr`** | Expression to search for within the array. |
34+
| **`exprN`** (Optional) | One or more extra expressions to to search for within the array. |
35+
36+
## Return types
37+
38+
Returns a boolean value.
39+
40+
## Examples
41+
42+
The following example illustrates how to check for specific values or objects in an array using this function.
43+
44+
```nosql
45+
SELECT VALUE {
46+
matchesEntireArray: ARRAY_CONTAINS_ANY([1, true, "3", [1,2,3]], 1, true, "3", [1,2,3]),
47+
matchesSomeValues: ARRAY_CONTAINS_ANY([1, 2, 3, 4], 2, 3, 4, 5),
48+
matchSingleValue: ARRAY_CONTAINS_ANY([1, 2, 3, 4], 1, undefined),
49+
noMatches: ARRAY_CONTAINS_ANY([1, 2, 3, 4], 5, 6, 7, 8),
50+
emptyArray: ARRAY_CONTAINS_ANY([], 1, 2, 3),
51+
noMatchesUndefined: ARRAY_CONTAINS_ANY([1, 2, 3, 4], 5, undefined)
52+
}
53+
```
54+
55+
```json
56+
[
57+
{
58+
"matchesEntireArray": true,
59+
"matchesSomeValues": true,
60+
"matchSingleValue": true,
61+
"noMatches": false,
62+
"emptyArray": false
63+
}
64+
]
65+
```
66+
67+
## Remarks
68+
69+
- This system function doesn't utilize the index.
70+
71+
## Related content
72+
73+
- [`ARRAY_CONTAINS`](array-contains.md)
74+
- [`ARRAY_CONTAINS_ALL`](array-contains-all.md)

articles/cosmos-db/nosql/query/array-contains.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: ARRAY_CONTAINS
33
titleSuffix: Azure Cosmos DB for NoSQL
4-
description: An Azure Cosmos DB for NoSQL system function that returns a boolean indicating whether the array contains the specified value
4+
description: An Azure Cosmos DB for NoSQL system function that returns a boolean indicating whether the array contains the specified value.
55
author: jcodella
66
ms.author: jacodel
77
ms.reviewer: sidandrews
@@ -26,13 +26,13 @@ ARRAY_CONTAINS(<array_expr>, <expr> [, <bool_expr>])
2626
```
2727

2828
## Arguments
29-
29+
3030
| | Description |
3131
| --- | --- |
3232
| **`arr_expr`** | An array expression. |
3333
| **`expr`** | Expression to search for within the array. |
3434
| **`bool_expr`** | A boolean expression indicating whether the search should check for a partial match (`true`) or a full match (`false`). If not specified, the default value is `false`. |
35-
35+
3636
## Return types
3737

3838
Returns a boolean value.

articles/cosmos-db/nosql/query/stringequals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Returns a boolean indicating whether the first string expression matches the sec
2222
## Syntax
2323

2424
```nosql
25-
STRINGEQUALS(<string_expr_1>, <string_expr_2> [, <boolean_expr>])
25+
StringEquals(<string_expr_1>, <string_expr_2> [, <boolean_expr>])
2626
```
2727

2828
## Arguments

articles/cosmos-db/nosql/query/stringjoin.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: StringJoin
33
titleSuffix: Azure Cosmos DB for NoSQL
4-
description: An Azure Cosmos DB for NoSQL system function that TODO
4+
description: An Azure Cosmos DB for NoSQL system function that combines multiple strings into a single string with the specified separator.
55
author: seesharprun
66
ms.author: sidandrews
77
ms.reviewer: jacodel
@@ -16,3 +16,56 @@ ms.custom: query-reference
1616
# StringJoin (NoSQL query)
1717

1818
[!INCLUDE[NoSQL](../../includes/appliesto-nosql.md)]
19+
20+
Returns a string, which concatenates the elements of a specified array, using the specified separator between each element.
21+
22+
## Syntax
23+
24+
```nosql
25+
StringJoin(<array_expr>, <string_expr>)
26+
```
27+
28+
## Arguments
29+
30+
| | Description |
31+
| --- | --- |
32+
| **`array_expr`** | An array expression with all string items inside. |
33+
| **`string_expr`** | A string expression to use as the separator. |
34+
35+
## Return types
36+
37+
Returns a string expression.
38+
39+
## Examples
40+
41+
The following example illustrates how to use this function to combine multiple strings.
42+
43+
```nosql
44+
SELECT VALUE {
45+
joinUsingSpaces: StringJoin(["Iropa", "Mountain", "Bike"], " "),
46+
joinUsingEmptyString: StringJoin(["Iropa", "Mountain", "Bike"], ""),
47+
joinUsingUndefined: StringJoin(["Iropa", "Mountain", "Bike"], undefined),
48+
joinUsingCharacter: StringJoin(["6", "7", "4", "3"], "A"),
49+
joinUsingPhrase: StringJoin(["Adventure", "LT"], "Works")
50+
}
51+
```
52+
53+
```json
54+
[
55+
{
56+
"joinUsingSpaces": "Iropa Mountain Bike",
57+
"joinUsingEmptyString": "IropaMountainBike",
58+
"joinUsingCharacter": "6A7A4A3",
59+
"joinUsingPhrase": "AdventureWorksLT"
60+
}
61+
]
62+
```
63+
64+
## Remarks
65+
66+
- This system function doesn't utilize the index.
67+
68+
## Related content
69+
70+
- [`StringSplit`](stringsplit.md)
71+
- [`CONCAT`](concat.md)

articles/cosmos-db/nosql/query/stringsplit.md

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: StringSplit
33
titleSuffix: Azure Cosmos DB for NoSQL
4-
description: An Azure Cosmos DB for NoSQL system function that TODO
4+
description: An Azure Cosmos DB for NoSQL system function that splits a single string into multiple substrings using a delimiter.
55
author: seesharprun
66
ms.author: sidandrews
77
ms.reviewer: jacodel
@@ -16,3 +16,79 @@ ms.custom: query-reference
1616
# StringSplit (NoSQL query)
1717

1818
[!INCLUDE[NoSQL](../../includes/appliesto-nosql.md)]
19+
20+
Returns an array of substrings obtained from separating the source string by the specified delimiter.
21+
22+
## Syntax
23+
24+
```nosql
25+
StringSplit(<string_expr1>, <string_expr2>)
26+
```
27+
28+
## Arguments
29+
30+
| | Description |
31+
| --- | --- |
32+
| **`string_expr1`** | The source string expression to parse. |
33+
| **`string_expr2`** | The string used as the delimiter. |
34+
35+
## Return types
36+
37+
Returns an array expression.
38+
39+
## Examples
40+
41+
The following example illustrates how to use this function to split a string.
42+
43+
```nosql
44+
SELECT VALUE {
45+
seperateOnLetter: StringSplit("Handlebar", "e"),
46+
seperateOnSymbol: StringSplit("CARBON_STEEL_BIKE_WHEEL", "_"),
47+
seperateOnWhitespace: StringSplit("Road Bike", " "),
48+
seperateOnPhrase: StringSplit("xenmoun mountain bike", "moun"),
49+
undefinedSeperator: StringSplit("AluminumBikeFrame", undefined),
50+
emptySeparatorString: StringSplit("Helmet", ""),
51+
emptySourceString: StringSplit("", "")
52+
}
53+
```
54+
55+
```json
56+
[
57+
{
58+
"seperateOnLetter": [
59+
"Handl",
60+
"bar"
61+
],
62+
"seperateOnSymbol": [
63+
"CARBON",
64+
"STEEL",
65+
"BIKE",
66+
"WHEEL"
67+
],
68+
"seperateOnWhitespace": [
69+
"Road",
70+
"Bike"
71+
],
72+
"seperateOnPhrase": [
73+
"xen",
74+
" ",
75+
"tain bike"
76+
],
77+
"emptySeparatorString": [
78+
"Helmet"
79+
],
80+
"emptySourceString": [
81+
""
82+
]
83+
}
84+
]
85+
```
86+
87+
## Remarks
88+
89+
- This system function doesn't utilize the index.
90+
91+
## Related content
92+
93+
- [`StringJoin`](stringjoin.md)
94+
- [`CONCAT`](concat.md)

0 commit comments

Comments
 (0)