@wix/ditto-codegen-public 1.0.161 → 1.0.163
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs-output/api-docs/bookings-bookings-onBookingCanceled-doc.txt +169 -0
- package/dist/docs-output/api-docs/bookings-bookings-onBookingCreated-doc.txt +154 -0
- package/dist/docs-output/api-docs/crm-contacts-onContactCreated-doc.txt +87 -171
- package/dist/docs-output/api-docs/crm-contacts-onContactDeleted-doc.txt +58 -0
- package/dist/docs-output/api-docs/crm-contacts-onContactUpdated-doc.txt +99 -0
- package/dist/docs-output/api-docs/data-items-get-doc.txt +95 -54
- package/dist/docs-output/api-docs/data-items-insert-doc.txt +235 -43
- package/dist/docs-output/api-docs/data-items-onDataItemCreated-doc.txt +61 -0
- package/dist/docs-output/api-docs/data-items-onDataItemDeleted-doc.txt +58 -0
- package/dist/docs-output/api-docs/data-items-onDataItemUpdated-doc.txt +61 -0
- package/dist/docs-output/api-docs/data-items-query-doc.txt +507 -302
- package/dist/docs-output/api-docs/data-items-remove-doc.txt +120 -40
- package/dist/docs-output/api-docs/data-items-update-doc.txt +425 -46
- package/dist/docs-output/api-docs/ecom-cart-addToCart-doc.txt +488 -0
- package/dist/docs-output/api-docs/ecom-cart-createCart-doc.txt +518 -0
- package/dist/docs-output/api-docs/ecom-cart-createCheckout-doc.txt +155 -0
- package/dist/docs-output/api-docs/ecom-cart-deleteCart-doc.txt +92 -0
- package/dist/docs-output/api-docs/ecom-cart-getCart-doc.txt +376 -0
- package/dist/docs-output/api-docs/ecom-cart-onCartCreated-doc.txt +89 -80
- package/dist/docs-output/api-docs/ecom-cart-onCartUpdated-doc.txt +91 -81
- package/dist/docs-output/api-docs/ecom-cart-removeLineItemsFromCart-doc.txt +321 -0
- package/dist/docs-output/api-docs/ecom-cart-updateCart-doc.txt +539 -0
- package/dist/docs-output/api-docs/ecom-checkout-addToCheckout-doc.txt +1005 -0
- package/dist/docs-output/api-docs/ecom-checkout-createCheckout-doc.txt +1641 -0
- package/dist/docs-output/api-docs/ecom-checkout-getCheckout-doc.txt +1027 -0
- package/dist/docs-output/api-docs/ecom-checkout-onCheckoutCompleted-doc.txt +151 -0
- package/dist/docs-output/api-docs/ecom-checkout-onCheckoutCreated-doc.txt +150 -0
- package/dist/docs-output/api-docs/ecom-checkout-onCheckoutUpdated-doc.txt +150 -0
- package/dist/docs-output/api-docs/ecom-checkout-removeLineItemsFromCheckout-doc.txt +879 -0
- package/dist/docs-output/api-docs/ecom-checkout-updateCheckout-doc.txt +1011 -0
- package/dist/docs-output/api-docs/ecom-currentCart-getCurrentCart-doc.txt +368 -322
- package/dist/docs-output/api-docs/ecom-currentCart-updateCurrentCart-doc.txt +506 -321
- package/dist/docs-output/api-docs/ecom-orders-bulkUpdateOrders-doc.txt +1040 -0
- package/dist/docs-output/api-docs/ecom-orders-cancelOrder-doc.txt +608 -0
- package/dist/docs-output/api-docs/ecom-orders-getOrder-doc.txt +926 -0
- package/dist/docs-output/api-docs/ecom-orders-onOrderCreated-doc.txt +245 -0
- package/dist/docs-output/api-docs/ecom-orders-onOrderUpdated-doc.txt +244 -0
- package/dist/docs-output/api-docs/ecom-orders-searchOrders-doc.txt +670 -0
- package/dist/docs-output/api-docs/ecom-orders-updateOrder-doc.txt +818 -0
- package/dist/docs-output/api-docs/search-wixSiteSearch-search-doc.txt +162 -0
- package/dist/docs-output/api-docs/stores-collections-addProductsToCollection-doc.txt +86 -0
- package/dist/docs-output/api-docs/stores-collections-createCollection-doc.txt +108 -0
- package/dist/docs-output/api-docs/stores-collections-getCollection-doc.txt +102 -0
- package/dist/docs-output/api-docs/stores-collections-queryCollections-doc.txt +209 -0
- package/dist/docs-output/api-docs/stores-collections-removeProductsFromCollection-doc.txt +86 -0
- package/dist/docs-output/api-docs/stores-collections-updateCollection-doc.txt +110 -0
- package/dist/docs-output/api-docs/stores-inventory-queryInventory-doc.txt +98 -0
- package/dist/docs-output/api-docs/stores-inventory-updateInventoryVariants-doc.txt +249 -0
- package/dist/docs-output/api-docs/stores-inventoryItemsV3-queryInventoryItems-doc.txt +236 -0
- package/dist/docs-output/api-docs/stores-inventoryItemsV3-updateInventoryItem-doc.txt +139 -0
- package/dist/docs-output/api-docs/stores-productsV3-createProduct-doc.txt +1697 -0
- package/dist/docs-output/api-docs/stores-productsV3-deleteProduct-doc.txt +73 -0
- package/dist/docs-output/api-docs/stores-productsV3-getProduct-doc.txt +933 -0
- package/dist/docs-output/api-docs/stores-productsV3-onProductCreated-doc.txt +794 -0
- package/dist/docs-output/api-docs/stores-productsV3-onProductDeleted-doc.txt +794 -0
- package/dist/docs-output/api-docs/stores-productsV3-onProductUpdated-doc.txt +794 -0
- package/dist/docs-output/api-docs/stores-productsV3-queryProducts-doc.txt +1051 -0
- package/dist/docs-output/api-docs/stores-productsV3-searchProducts-doc.txt +1144 -0
- package/dist/docs-output/api-docs/stores-productsV3-updateProduct-doc.txt +1730 -1600
- package/dist/docs-output/api-docs/stores-readOnlyVariantsV3-queryVariants-doc.txt +290 -0
- package/dist/docs-output/api-docs/stores-readOnlyVariantsV3-searchVariants-doc.txt +353 -0
- package/dist/out.js +929 -79
- package/package.json +2 -2
- package/dist/docs-output/api-docs/data-items-onDataItemCreated.txt +0 -103
- package/dist/docs-output/api-docs/stores-product-onProductCreated-doc.txt +0 -118
- package/dist/docs-output/api-docs/stores-productV3-onProductCreated-doc.txt +0 -184
|
@@ -1,309 +1,514 @@
|
|
|
1
1
|
<data_items_query>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
<description>
|
|
3
|
+
# Method name:
|
|
4
|
+
|
|
5
|
+
data.items.query(dataCollectionId: string)
|
|
6
|
+
|
|
7
|
+
# Method Link:
|
|
8
|
+
|
|
9
|
+
https://dev.wix.com/docs/sdk/backend-modules/data/items/query
|
|
10
|
+
|
|
11
|
+
# Method Description:
|
|
12
|
+
|
|
13
|
+
Creates a query to retrieve items from a database collection.
|
|
14
|
+
|
|
15
|
+
The `query()` method builds a query to retrieve data items from a collection and returns a `WixDataQuery` object, which contains the query definition. You can refine the query by chaining [`WixDataQuery` methods](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/introduction) onto the query. `WixDataQuery` methods enable you to sort, filter, and control the query results.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
The methods chained to `query()` are applied in the order they are called. For example, if you sort by an `age` field in ascending order and then by a `name` field in descending order, the results are sorted first by the age of the items. If there are multiple results with the same age, they are further sorted by name in descending order, per age value.
|
|
19
|
+
|
|
20
|
+
Finally, to run the query, chain [`find()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/find) or [`distinct()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/distinct) as the last method.
|
|
21
|
+
|
|
22
|
+
The `query()` method runs with the following `WixDataQuery` defaults that you can override:
|
|
23
|
+
- `skip`: `0`
|
|
24
|
+
- `limit`: `50`
|
|
25
|
+
- `descending`: by `_createdDate`
|
|
26
|
+
- `include`: `none`
|
|
27
|
+
|
|
28
|
+
> **Notes**:
|
|
29
|
+
> - When calling `query()` immediately following an update to your collection, the data retrieved might not contain the most recent changes. If you need the most up-to-date data, set the `options.consistentRead` parameter of the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/find) or [`distinct()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/distinct) methods to `true`. Learn more about [Wix Data and eventual consistency](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency).
|
|
30
|
+
> - To speed up data retrieval, the results of certain data queries are cached. Learn more about [caching data query results](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/data-api/about-caching-data-query-results).
|
|
31
|
+
> - Items marked [in the CMS as hidden](https://support.wix.com/en/article/cms-controlling-live-site-item-visibility-from-your-collection) are not retrieved.
|
|
32
|
+
> - If the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To retrieve data from the referenced items, specify them using the `include()` method.
|
|
33
|
+
> - When querying [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code), make sure the fields you use to refine your query support the intended operations. Learn more about [querying by Wix app collection fields](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).
|
|
34
|
+
|
|
35
|
+
# Method Permissions:
|
|
36
|
+
|
|
37
|
+
- Read Data Items
|
|
38
|
+
|
|
39
|
+
# Method Permissions Scopes IDs:
|
|
40
|
+
|
|
41
|
+
- SCOPE.DC-DATA.READ
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# Method Code Examples:
|
|
46
|
+
|
|
47
|
+
## Build a query
|
|
48
|
+
|
|
49
|
+
```javascript
|
|
50
|
+
import { items } from "@wix/data";
|
|
51
|
+
|
|
52
|
+
const query = items.query("myCollection");
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## Build and perform a query
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
import { items } from "@wix/data";
|
|
61
|
+
|
|
62
|
+
async function queryItems() {
|
|
63
|
+
const results = await items.query("myCollection").find();
|
|
64
|
+
if(results.items.length > 0) {
|
|
65
|
+
console.log(results.items[0]); // See below
|
|
66
|
+
} else {
|
|
67
|
+
// handle case where no matching items found
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* firstItem is:
|
|
72
|
+
*
|
|
73
|
+
* {
|
|
74
|
+
* "_id": "00001",
|
|
75
|
+
* "_owner": "ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb",
|
|
76
|
+
* "_createdDate": "2017-05-24T12:33:18.938Z",
|
|
77
|
+
* "_updatedDate": "2017-05-24T12:33:18.938Z",
|
|
78
|
+
* "title": "Mr.",
|
|
79
|
+
* "first_name": "John",
|
|
80
|
+
* "last_name": "Doe"
|
|
81
|
+
* }
|
|
82
|
+
*/
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Build and perform a query using data options
|
|
86
|
+
|
|
87
|
+
```javascript
|
|
88
|
+
import { items } from "@wix/data";
|
|
89
|
+
|
|
90
|
+
async function queryItems() {
|
|
91
|
+
const results = await items.query("myCollection")
|
|
92
|
+
.eq("title", "Dr.")
|
|
93
|
+
.find();
|
|
94
|
+
|
|
95
|
+
if(results.items.length > 0) {
|
|
96
|
+
console.log(results.items[0]); //see firstItem below
|
|
97
|
+
} else {
|
|
98
|
+
// handle case where no matching items found
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* firstItem is:
|
|
103
|
+
*
|
|
104
|
+
* {
|
|
105
|
+
* "_id": "00002",
|
|
106
|
+
* "_owner": "ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb",
|
|
107
|
+
* "_createdDate": "2017-05-24T12:33:18.938Z",
|
|
108
|
+
* "_updatedDate": "2017-05-24T12:33:18.938Z",
|
|
109
|
+
* "title": "Dr.",
|
|
110
|
+
* "first_name": "Jane",
|
|
111
|
+
* "last_name": "Doe"
|
|
112
|
+
* }
|
|
113
|
+
*/
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Create, filter, sort, limit, and run a query
|
|
117
|
+
|
|
118
|
+
```javascript
|
|
119
|
+
import { items } from "@wix/data";
|
|
120
|
+
|
|
121
|
+
async function queryItems() {
|
|
122
|
+
const results = await items.query("myCollection")
|
|
123
|
+
.eq("status", "active")
|
|
124
|
+
.gt("age", 25)
|
|
125
|
+
.ascending("last_name", "first_name")
|
|
126
|
+
.limit(10)
|
|
127
|
+
.find();
|
|
128
|
+
|
|
129
|
+
if(results.items.length > 0) {
|
|
130
|
+
const items = results.items;
|
|
131
|
+
const firstItem = items[0];
|
|
132
|
+
const pageSize = results.pageSize;
|
|
133
|
+
const currentPage = results.currentPage;
|
|
134
|
+
const hasNext = results.hasNext();
|
|
135
|
+
const hasPrev = results.hasPrev();
|
|
136
|
+
const length = results.length;
|
|
137
|
+
} else {
|
|
138
|
+
// handle case where no matching items found
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Build a query incrementally
|
|
144
|
+
|
|
145
|
+
```javascript
|
|
146
|
+
import { items } from "@wix/data";
|
|
147
|
+
|
|
148
|
+
async function runQuery(low, high) {
|
|
149
|
+
let myQuery = items.query("myCollection");
|
|
150
|
+
|
|
151
|
+
if(low) {
|
|
152
|
+
myQuery = myQuery.ge("price", low);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if(high) {
|
|
156
|
+
myQuery = myQuery.le("price", high);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const results = await myQuery.find();
|
|
160
|
+
|
|
161
|
+
if(results.items.length > 0) {
|
|
162
|
+
$w("#myTable").rows = results.items;
|
|
163
|
+
} else {
|
|
164
|
+
$w("#myTable").collapse();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Build a query using `include()` to include the referenced collection cities, based on the field "city" from myCollection
|
|
171
|
+
|
|
172
|
+
```javascript
|
|
16
173
|
import { items } from "@wix/data";
|
|
17
174
|
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</usage>
|
|
175
|
+
async function queryItems() {
|
|
176
|
+
const results = await items.query("myCollection")
|
|
177
|
+
.include("city")
|
|
178
|
+
.find();
|
|
23
179
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
180
|
+
if (results.length > 0) {
|
|
181
|
+
const firstItem = results.items[0]
|
|
182
|
+
console.log(firstItem);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* firstItem is:
|
|
187
|
+
*
|
|
188
|
+
* {
|
|
189
|
+
* "_id": "1d8a1d97-93d3-4d6c-9a0f-c279058b4aa5",
|
|
190
|
+
* "_owner": "81c9168e-95b8-47fd-8e6a-ad9fdf71b38e",
|
|
191
|
+
* "_createdDate": "2020-08-03T10:26:26.825Z",
|
|
192
|
+
* "_updatedDate": "2020-08-03T10:27:01.558Z",
|
|
193
|
+
* "first_name": "Betty",
|
|
194
|
+
* "last_name": "Boop",
|
|
195
|
+
* "city": {
|
|
196
|
+
* "_id": "a99daca6-0400-4ef1-8d74-de3f9095bf0b",
|
|
197
|
+
* "_owner": "81c9168e-95b8-47fd-8e6a-ad9fdf71b38e",
|
|
198
|
+
* "_createdDate": "2020-08-03T10:22:39.114Z",
|
|
199
|
+
* "_updatedDate": "2020-08-03T10:23:25.042Z",
|
|
200
|
+
* "city_name": "Los Angeles",
|
|
201
|
+
* "state": "California"
|
|
202
|
+
* }
|
|
203
|
+
*/
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Query a collection using a custom function
|
|
207
|
+
|
|
208
|
+
```javascript
|
|
209
|
+
import { items } from "@wix/data";
|
|
29
210
|
|
|
211
|
+
// Code for a read operation using query() //
|
|
212
|
+
|
|
213
|
+
async function readGreetings() {
|
|
214
|
+
const results = await items.query('Greetings').ascending('language').find();
|
|
215
|
+
|
|
216
|
+
return results.items;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## default
|
|
222
|
+
|
|
223
|
+
```javascript
|
|
224
|
+
try {
|
|
225
|
+
const { items } = await items.query("collection-0.05596339503499825").find();
|
|
226
|
+
return items;
|
|
227
|
+
} catch (error) {
|
|
228
|
+
console.error(error);
|
|
229
|
+
throw error;
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
</description>
|
|
30
233
|
<type_definition>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
</data_items_query>
|
|
234
|
+
```
|
|
235
|
+
Method: data.items.query(dataCollectionId)
|
|
236
|
+
Description: Creates a query to retrieve items from a database collection. The `query()` method builds a query to retrieve data items from a collection and returns a `WixDataQuery` object, which contains the query definition. You can refine the query by chaining [`WixDataQuery` methods](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/introduction) onto the query. `WixDataQuery` methods enable you to sort, filter, and control the query results. The methods chained to `query()` are applied in the order they are called. For example, if you sort by an `age` field in ascending order and then by a `name` field in descending order, the results are sorted first by the age of the items. If there are multiple results with the same age, they are further sorted by name in descending order, per age value. Finally, to run the query, chain [`find()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/find) or [`distinct()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/distinct) as the last method. The `query()` method runs with the following `WixDataQuery` defaults that you can override: - `skip`: `0` - `limit`: `50` - `descending`: by `_createdDate` - `include`: `none` > **Notes**: > - When calling `query()` immediately following an update to your collection, the data retrieved might not contain the most recent changes. If you need the most up-to-date data, set the `options.consistentRead` parameter of the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/find) or [`distinct()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/distinct) methods to `true`. Learn more about [Wix Data and eventual consistency](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency). > - To speed up data retrieval, the results of certain data queries are cached. Learn more about [caching data query results](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/data-api/about-caching-data-query-results). > - Items marked [in the CMS as hidden](https://support.wix.com/en/article/cms-controlling-live-site-item-visibility-from-your-collection) are not retrieved. > - If the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To retrieve data from the referenced items, specify them using the `include()` method. > - When querying [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code), make sure the fields you use to refine your query support the intended operations. Learn more about [querying by Wix app collection fields](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).
|
|
237
|
+
Method parameters:
|
|
238
|
+
param name: dataCollectionId | type: string | description: GUID of the collection to run the query on. | required: true
|
|
239
|
+
Return type: REFERENCE<WixDataQuery>
|
|
240
|
+
Method: data.items.and(filter)
|
|
241
|
+
Description: Adds an `and` condition to the query or filter. The `and()` method adds an and condition to this query. A query or filter with an `and` returns all the items that match the query or filter as defined up to the `and` method and also match the query or filter passed to the `and` method. Note that when chaining multiple `WixDataFilter` methods to a query an and condition is assumed. In such cases, you do not need to add a call to the `and()` method. For example, this query returns results where status is active **and** age is greater than 25. ```js items.query("myCollection").eq("status", "active").gt("age", 25); ``` The `and()` method is needed when performing compound queries. For example, the final query in this set of queries returns results where status is either pending or rejected **and** age is either less than 25 or greater than 65. ```js let statusQuery = items .query("myCollection") .eq("status", "pending") .or(items.filter().eq("status", "rejected")); let ageQuery = items .filter() .lt("age", 25) .or(items.filter().gt("age", 65)); let statusAndAgeQuery = statusQuery.and(ageQuery); ``` The `and()` method is designed to work with 2 or more queries or filters. When used on its own, it returns all the items in a collection.
|
|
242
|
+
Method parameters:
|
|
243
|
+
param name: filter | type: WixDataFilter | description: Filter to add to the initial query as an `and` condition.
|
|
244
|
+
Method: data.items.and(filter)
|
|
245
|
+
Description: Adds an `and` condition to the filter. A filter with an `and` condition returns all items that meet the conditions defined on both sides of the condition. Use the `and()` method when performing compound queries. For example, the final filter in this set of queries returns results where status is either pending or rejected **and** age is either less than 25 or greater than 65. ```js let statusFilter = items.filter() .eq("status", "pending") .or(items.filter().eq("status", "rejected")); let ageFilter = items.filter() .lt("age", 25) .or(items.filter().gt("age", 65)); let statusAndAgeFilter = statusFilter.and(ageFilter); ``` > **Notes**: > - The `and()` method is designed to work with 2 or more queries or filters. If used with a single query or filter, it returns all items in a collection. > - When chaining multiple `WixDataFilter` methods to a filter, an `and` condition is implied. In such cases, you do not need to call the `and()` method explicitly. For example, this filter returns results where an item `status` is `active` and `age` is greater than 25: > ```js > items.filter().eq("status", "active").gt("age", 25); > ```
|
|
246
|
+
Method parameters:
|
|
247
|
+
param name: filter | type: WixDataFilter | description: `WixDataFilter` used with an `and` condition.
|
|
248
|
+
Return type: REFERENCE<WixDataFilter>
|
|
249
|
+
Method: data.items.between(field, rangeStart, rangeEnd)
|
|
250
|
+
Description: Refines a filter to match items where the value of the specified field is within the defined range. The `between()` method refines this filter to match items for which the value of the specified field is greater than or equal to `rangeStart` and less than `rangeEnd`. The method only compares values of [the same type](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-type). The following types can be compared: - Number: Compared numerically. - Date: Compared as JavaScript Date objects. - String: Compared lexicographically: - `"A"` and `"M"` are considered between `"A"` and `"Z"`, but `"a"`, `"m"`, `"z"` and `"Z"` are not. - `"A"`, `"M"`, `"Z"`, and `"a"` are considered between `"A"` and `"z"`, but `"z"` is not. > **Note**: Items that do not have a value for the specified field are considered as the lowest comparable value and are ranked last.
|
|
251
|
+
Method parameters:
|
|
252
|
+
param name: field | type: string | description: Field to compare with `rangeStart` and `rangeEnd`.
|
|
253
|
+
param name: rangeStart | type: undefined | description: Starting value of the range to match.
|
|
254
|
+
param name: rangeEnd | type: undefined | description: Ending value of the range to match.
|
|
255
|
+
Return type: REFERENCE<WixDataFilter>
|
|
256
|
+
Method: data.items.contains(field, value)
|
|
257
|
+
Description: Refines a filter to match items where the value of the specified field contains the specified value. The `contains()` method refines the filter to only match items for which the value of the specified field contains the specified value. `contains()` is not case-sensitive, so the value `sunday` is considered to contain the value `Sun`. You can use `contains()` with a [field of type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data) is a string or a reference. When specifying a field of type reference, `contains()` matches by the GUID of the referenced item as a string. To compare by other data types, use the [`eq()`](https://dev.wix.com/docs/sdk/backend-modules/data/wix-data-items-sdk-1-0-0/wix-data-filter/eq) method.
|
|
258
|
+
Method parameters:
|
|
259
|
+
param name: field | type: string | description: Field whose value is compared with the provided value.
|
|
260
|
+
param name: value | type: string | description: Value to locate in the specified field.
|
|
261
|
+
Return type: REFERENCE<WixDataFilter>
|
|
262
|
+
Method: data.items.endsWith(field, value)
|
|
263
|
+
Description: Refines a filter to match items where the value of the specified field ends with a specified value. The `endsWith()` method refines this filter to only match items where the value of the specified field ends with the specified value. Matching with `endsWith()` is not case sensitive, so `"TEXT"` is considered to end with `"ext"`. You can only use `endsWith()` with a [field of type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data) string or reference. When specifying a field of type reference, `endsWith()` matches by the GUID of the referenced item as a string.
|
|
264
|
+
Method parameters:
|
|
265
|
+
param name: field | type: string | description: Field whose value is compared with the specified value.
|
|
266
|
+
param name: value | type: string | description: Value to look for at the end of the specified field value.
|
|
267
|
+
Return type: REFERENCE<WixDataFilter>
|
|
268
|
+
Method: data.items.eq(field, value)
|
|
269
|
+
Description: Refines a filter to match items where the value of the specified field equals the specified value. The `eq()` method refines this filter to only match items where the value of the specified field equals the specified `value`. Values of different [types](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data) are always considered not equal. For example, a number value stored as a string does not match the same number stored as a number. Matching strings with `eq()` is case sensitive, so `"text"` is not equal to `"Text"`. If `field` points to a collection field of type array, `eq()` includes the item as long as at least one array element matches the specified `value`.
|
|
270
|
+
Method parameters:
|
|
271
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
272
|
+
param name: value | type: any | description: Value to compare with.
|
|
273
|
+
Return type: REFERENCE<WixDataFilter>
|
|
274
|
+
Method: data.items.ge(field, value)
|
|
275
|
+
Description: Refines a filter to match items where the value of the specified field is greater than or equal to the specified value. The `ge()` method refines this filter to only match items where the value of the specified field is greater than or equal to the specified value. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a string does not match the same number stored as a number. If a field contains a number as a string, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest. The following field types can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `"abc"` is greater than or equal to `"ABC"` (because of the greater than), but `"ABC"` is not greater than or equal to `"abc"`. - Reference: Compares by the GUID of the referenced item as a string.
|
|
276
|
+
Method parameters:
|
|
277
|
+
param name: field | type: string | description: Field whose value is compared with the specified value.
|
|
278
|
+
param name: value | type: undefined | description: Value to match.
|
|
279
|
+
Return type: REFERENCE<WixDataFilter>
|
|
280
|
+
Method: data.items.gt(field, value)
|
|
281
|
+
Description: Refines a filter to match items where the value of the specified field is greater than the specified value. The `gt()` method refines this filter to only match items where the value of the specified field is greater than the specified value. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a string does not match the same number stored as a number. If a field contains a number as a string, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest. The following field types can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `"text"` is greater than `"Text"`. - Reference: Compares by the GUID of the referenced item as a string.
|
|
282
|
+
Method parameters:
|
|
283
|
+
param name: field | type: string | description: Field whose value is compared with the specified value.
|
|
284
|
+
param name: value | type: undefined | description: Value to match.
|
|
285
|
+
Return type: REFERENCE<WixDataFilter>
|
|
286
|
+
Method: data.items.hasAll(field, values)
|
|
287
|
+
Description: Refines a filter to match items where the values of the specified field contain all of the specified values. The `hasAll()` method refines this filter to only match items where the specified field contains all of the specified values. Matching strings with `hasAll()` is case sensitive, so `"text"` is not equal to `"Text"`. If the value of the specified field is an array, `hasAll()` will match if there is a match in the elements of that array for all of the specified values. You can specify a list of values to match by providing an array of String, Number, or Date types as the `value` parameters.
|
|
288
|
+
Method parameters:
|
|
289
|
+
param name: field | type: string | description: Field whose value is compared with `values`.
|
|
290
|
+
param name: values | type: undefined | description: Values to match.
|
|
291
|
+
Return type: REFERENCE<WixDataFilter>
|
|
292
|
+
Method: data.items.hasSome(field, values)
|
|
293
|
+
Description: Refines a filter to match items where the values of the specified field contain any of the specified values. The `hasSome()` method refines this filter to only match items where the specified field contains any of the specified values. Matching strings with `hasSome()` is case sensitive, so `"text"` is not equal to `"Text"`. If the value of the specified field is an array, `hasSome()` will match if any of the elements of that array match any of the specified values. If the specified field contains multiple references, pass item GUIDs in the `value` field. In such a case, `hasSome()` will match if any of the multiple references match any of the specified GUID values. You can specify a list of values to match by providing an array of String, Number, or Date types as the `value` parameters.
|
|
294
|
+
Method parameters:
|
|
295
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
296
|
+
param name: values | type: undefined | description: Values to match.
|
|
297
|
+
Return type: REFERENCE<WixDataFilter>
|
|
298
|
+
Method: data.items.isEmpty(field)
|
|
299
|
+
Description: Refines a filter to match items whose specified field does not exist or does not have any value. The `isEmpty()` method refines this filter to only match items where the value of the specified field is `null` or `undefined` or the field does not exist. If the field contains any value at all for a given item, including the empty string or an invalid value, that item will match the filter.
|
|
300
|
+
Method parameters:
|
|
301
|
+
param name: field | type: string | description: Field to check for a value.
|
|
302
|
+
Return type: REFERENCE<WixDataFilter>
|
|
303
|
+
Method: data.items.isNotEmpty(field)
|
|
304
|
+
Description: Refines a filter to match items whose specified field has any value. The `isNotEmpty()` method refines this filter to only match items where the value of the specified field is not `null` or `undefined`. If the field contains any value at all for a given item, including the empty string or an invalid value, that item will match the filter.
|
|
305
|
+
Method parameters:
|
|
306
|
+
param name: field | type: string | description: Field to check for a value.
|
|
307
|
+
Return type: REFERENCE<WixDataFilter>
|
|
308
|
+
Method: data.items.le(field, value)
|
|
309
|
+
Description: Refines a filter to match items where the value of the specified field is less than or equal to the specified value. The `le()` method refines this filter to only match items where the value of the specified field is less than or equal to the specified value. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a string does not match the same number stored as a number. If a field contains a number as a string, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest. The following field types can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `"ABC"` is less than or equal to `"abc"` (because of the less than), but `"abc"` is not less than or equal to `"ABC"`. - Reference: Compares by the GUID of the referenced item as a string.
|
|
310
|
+
Method parameters:
|
|
311
|
+
param name: field | type: string | description: Field whose value is compared with the specified value.
|
|
312
|
+
param name: value | type: undefined | description: Value to match.
|
|
313
|
+
Return type: REFERENCE<WixDataFilter>
|
|
314
|
+
Method: data.items.lt(field, value)
|
|
315
|
+
Description: Refines a filter to match items where the value of the specified field is less than the specified value. The `lt()` method refines this filter to only match items where the value of the specified field is less than the specified `value`. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a string does not match the same number stored as a number. If a field contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest. The following field types can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `"Text"` is less than `"text"`. - Reference: Compares by the GUID of the referenced item as a String.
|
|
316
|
+
Method parameters:
|
|
317
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
318
|
+
param name: value | type: undefined | description: Value to match.
|
|
319
|
+
Return type: REFERENCE<WixDataFilter>
|
|
320
|
+
Method: data.items.ne(field, value)
|
|
321
|
+
Description: Refines a filter to match items where the value of the specified field does not equal the specified value. The `ne()` method refines this filter to only match items where the value of the specified field does not equal the specified value. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a string is considered not equal to the same number stored as a number. Matching strings with `ne()` is case sensitive, so `"text"` is considered not equal to `"Text"`. If the value of `field` is an array, `ne()` matches items where none of the elements of the array match the specified value.
|
|
322
|
+
Method parameters:
|
|
323
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
324
|
+
param name: value | type: any | description: Value to match.
|
|
325
|
+
Return type: REFERENCE<WixDataFilter>
|
|
326
|
+
Method: data.items.not(filter)
|
|
327
|
+
Description: Adds a `not` condition to the filter. The `not()` method adds a `not` condition to this filter. A filter with a `not` returns all the items that match the filter as defined up to the `not` method, but don't match the filter passed to the `not` method. If the filter only contains a `not()` method, it returns all the items that don't match the filter defined by the `not` method.
|
|
328
|
+
Method parameters:
|
|
329
|
+
param name: filter | type: WixDataFilter | description: Filter to add to the initial filter as a `not` condition.
|
|
330
|
+
Return type: REFERENCE<WixDataFilter>
|
|
331
|
+
Method: data.items.or(filter)
|
|
332
|
+
Description: Adds an `or` condition to the filter. The `or()` method adds an inclusive `or` condition to this filter. A filter with an `or` returns all the items that match the filter as defined up to the `or` method, the items that match the filter passed to the `or` method, and the items that match both. The `or()` method is designed to work with 2 or more queries or filters. If you use it on its own, it will return all the items in a collection.
|
|
333
|
+
Method parameters:
|
|
334
|
+
param name: filter | type: WixDataFilter | description: Filter to add to the initial filter as an `or` condition.
|
|
335
|
+
Return type: REFERENCE<WixDataFilter>
|
|
336
|
+
Method: data.items.startsWith(field, value)
|
|
337
|
+
Description: Refines a filter to match items where the value of the specified field starts with a specified value. The `startsWith()` method refines this filter to only match items where the value of the specified field starts with the specified value. Matching with `startsWith()` is not case sensitive, so specifying `"TEXT"` is considered to start with `"tex"`. You can only use `startsWith()` with a [field of type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data) string or reference. When specifying a field of type reference, `startsWith()` matches by the GUID of the referenced item as a string.
|
|
338
|
+
Method parameters:
|
|
339
|
+
param name: field | type: string | description: Field whose value is compared with the specified value.
|
|
340
|
+
param name: value | type: string | description: Value to look for at the beginning of the specified field value.
|
|
341
|
+
Return type: REFERENCE<WixDataFilter>
|
|
342
|
+
Return type: REFERENCE<WixDataQuery>
|
|
343
|
+
Method: data.items.ascending(fields)
|
|
344
|
+
Description: Adds a sort to a query or sort, sorting by the specified properties in ascending order. The `ascending()` method refines this query in ascending order of the specified properties. If you specify more than one property, `ascending()` sorts the results in ascending order by each property in the order they are listed. You can sort the following types: - Number: Sorts numerically. - Date: Sorts by date and time. - String: Sorts lexicographically, so `"abc"` comes after `"XYZ"`. - Reference: Compares by the GUID of the referenced item as a String. If a property contains a number as a String, that value is sorted alphabetically and not numerically. Items that do not have a value for the specified sort property are ranked lowest.
|
|
345
|
+
Method parameters:
|
|
346
|
+
param name: fields | type: Array<string> | description: Fields to sort by.
|
|
347
|
+
Return type: REFERENCE<WixDataQuery>
|
|
348
|
+
Method: data.items.between(field, rangeStart, rangeEnd)
|
|
349
|
+
Description: Refines a query to match items whose specified property value is within a specified range. The `between()` method refines this query to only match items where the value of the specified property is greater than or equal to `rangeStart` and less than `rangeEnd`. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a number does not match the same number stored as a string. If a property contains a number as a string, that value is compared alphabetically and not numerically. Items that do not have a value for the specified property are ranked lowest. The following types of properties can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so - `"A"` and `"M"` are between `"A"` and `"Z"`, but `"a"`, `"m"`, `"z"` and `"Z"` are not. - `"A"`, `"M"`, `"Z"`, and `"a"` are between `"A"` and `"z"`, but `"z"` is not.
|
|
350
|
+
Method parameters:
|
|
351
|
+
param name: field | type: string | description: Field whose value is compared with rangeStart and rangeEnd.
|
|
352
|
+
param name: rangeStart | type: undefined | description: Starting value of the range to match.
|
|
353
|
+
param name: rangeEnd | type: undefined | description: Ending value of the range to match.
|
|
354
|
+
Return type: REFERENCE<WixDataQuery>
|
|
355
|
+
Method: data.items.contains(field, value)
|
|
356
|
+
Description: Refines a query to match items whose specified field value contains a specified value. The `contains()` method refines this query to only match items where the value of the specified field contains the specified value. Matching with `contains()` is not case sensitive, so `"text"` does contain `"Tex"`. You can use `contains()` with a [field of type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data) string or reference. When specifying a field of type reference, `contains()` matches by the GUID of the referenced item as a string.
|
|
357
|
+
Method parameters:
|
|
358
|
+
param name: field | type: string | description: Field whose value is compared with the specified value.
|
|
359
|
+
param name: value | type: string | description: The string to look for inside the specified field value.
|
|
360
|
+
Return type: REFERENCE<WixDataQuery>
|
|
361
|
+
Method: data.items.count(options)
|
|
362
|
+
Description: Returns the number of items that match the query. The `count()` method returns a Promise that resolves to the number of items that match the query. The Promise is rejected if `count()` is called with incorrect permissions or if any of the methods used to refine the query is invalid. Calling the `count()` method triggers the [`beforeCount()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-count) and [`afterCount()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-count) hooks if they have been defined. Use the `options` parameter to run `count()` without checking for permissions or without its registered hooks. Any method that does not filter query results (e.g., [`ascending()`](#ascending)) does not affect the result of `count()`. If you build a query and don't refine it with any `WixDataQuery` methods, `count()` returns the total number of items in the collection. > **Note**: You can also retrieve the number of query results by calling `find()` and setting the `options.returnTotalCount` property to `true`.
|
|
363
|
+
Method parameters:
|
|
364
|
+
param name: options | type: WixDataReadOptions | description: Options to use when processing this operation.
|
|
365
|
+
- name: appOptions | type: Record<string, any> | description: Options for [querying Wix app collections](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).
|
|
366
|
+
- name: consistentRead | type: boolean | description: When `true`, reads data from the primary database instance. This decreases performance but ensures data retrieved is up-to-date even immediately after an update. Learn more about [Wix Data and eventual consistency](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency).
|
|
367
|
+
- name: language | type: string | description: Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. If provided, the result text is returned in the specified language. If not provided, the result text is not translated. > **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
368
|
+
- name: showDrafts | type: boolean | description: When `true`, operations include draft items. Read operations include draft items in their response, and write operations modify draft items. Default: `false`.
|
|
369
|
+
- name: suppressHooks | type: boolean | description: Prevents hooks from running for the operation. Can only be used in the [backend code of a Wix site](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/about-the-site-backend). Default: `false`.
|
|
370
|
+
Return type: PROMISE<number>
|
|
371
|
+
Method: data.items.descending(fields)
|
|
372
|
+
Description: Adds a sort to a query or sort, sorting by the specified properties in descending order. The `descending()` method refines this query to sort in descending order of the specified properties. If you specify more than one property, descending() sorts the results in descending order by each property in the order they are listed. You can sort the following types: Number: Sorts numerically. - Date: Sorts by date and time. - String: Sorts lexicographically, so `"abc"` comes before `"XYZ"`. - Reference: Compares by the GUID of the referenced item as a String. If a property contains a number as a String, that value is sorted alphabetically and not numerically. Items that do not have a value for the specified sort property are ranked lowest.
|
|
373
|
+
Method parameters:
|
|
374
|
+
param name: fields | type: Array<string> | description: Fields to sort by.
|
|
375
|
+
Return type: REFERENCE<WixDataQuery>
|
|
376
|
+
Method: data.items.distinct(field, options)
|
|
377
|
+
Description: Returns the distinct values that match the query, without duplicates. The `distinct()` method returns a Promise that resolves to: - The distinct values found in the specified field when running the query. - Additional information about the results, such as the number of values that match the query. Unlike `find()`, which returns all item objects that match the query, `distinct()` returns matching field values, and eliminates duplicate field values from the query result. You cannot use `find()` and `distinct()` together. For an item to be resolved as distinct, only the specified field must be distinct. Other fields for that item in the collection are not evaluated when resolving the promise. The Promise is rejected if `distinct()` is called with incorrect permissions or if any of the methods used to refine the query is invalid. >**Note:** Only site visitors with [Data Read](https://support.wix.com/en/article/collection-permissions-an-overview#permissions) permissions can retrieve and view data. You can override the permissions by calling this method with [elevated permissions](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-elevated-permissions).
|
|
378
|
+
Method parameters:
|
|
379
|
+
param name: field | type: string | description: Field whose value is compared for distinct values.
|
|
380
|
+
param name: options | type: WixDataQueryOptions | description: Configuration options for building the query.
|
|
381
|
+
- name: appOptions | type: Record<string, any> | description: Options for [querying Wix app collections](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).
|
|
382
|
+
- name: consistentRead | type: boolean | description: When `true`, reads data from the primary database instance. This decreases performance but ensures data retrieved is up-to-date even immediately after an update. Learn more about [Wix Data and eventual consistency](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency).
|
|
383
|
+
- name: language | type: string | description: Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. If provided, the result text is returned in the specified language. If not provided, the result text is not translated. > **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
384
|
+
- name: returnTotalCount | type: boolean | description: When `true`, the query results include a `totalCount` and `totalPages` properties containing the totals of items matching query. Requesting total count slows down the query. Default: `false`
|
|
385
|
+
- name: showDrafts | type: boolean | description: When `true`, operations include draft items. Read operations include draft items in their response, and write operations modify draft items. Default: `false`.
|
|
386
|
+
- name: suppressHooks | type: boolean | description: Prevents hooks from running for the operation. Can only be used in the [backend code of a Wix site](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/about-the-site-backend). Default: `false`.
|
|
387
|
+
Return type: PROMISE<WixDataResult>
|
|
388
|
+
- name: currentPage | type: number | description: Returns the index of the current results page number. The `currentPage` is a zero-based index of the current page of results. The page size is defined by the `limit()` method, can be retrieved using the `pageSize` property, and navigating through pages is done with the `prev()` and `next()` methods. The `currentPage` property returns `undefined` if the query returned no results.
|
|
389
|
+
- name: items | type: Array<undefined> | description: Returns the items that match the query. The current page of items retrieved by the query. The page size is defined by the `limit()` method, can be retrieved using the `pageSize` property, and navigating through pages is done with the `prev()` and `next()` methods. When no items match the query, the `items` array is empty.
|
|
390
|
+
- name: length | type: number | description: Returns the number of items in the current results page. The page size is defined by the `limit()` method, can be retrieved using the `pageSize` property, and navigating through pages is done with the `prev()` and `next()` methods.
|
|
391
|
+
- name: pageSize | type: number | description: Returns the query page size. The page size is defined by the `limit()` method, can be retrieved using the `pageSize` property, and navigating through pages is done with the `prev()` and `next()` methods.
|
|
392
|
+
- name: totalCount | type: number | description: Returns the total number of items that match the query. The `totalCount` returns the total number of items that match the query, not just the number of items in the current page. > **Note:** This property is only available when the query's `options.returnTotalCount` parameter is set to `true`.
|
|
393
|
+
- name: totalPages | type: number | description: Returns the total number of pages the query produced. The page size is defined by the `limit()` method, can be retrieved using the `pageSize` property, and navigating through pages is done with the `prev()` and `next()` methods. > **Note:** This property is only available when the query's `options.returnTotalCount` parameter is set to `true`.
|
|
394
|
+
Method: data.items.hasNext()
|
|
395
|
+
Description: Indicates if the query has more results.
|
|
396
|
+
Return type: PRIMITIVE<boolean>
|
|
397
|
+
Method: data.items.hasPrev()
|
|
398
|
+
Description: Indicates the query has previous results.
|
|
399
|
+
Return type: PRIMITIVE<boolean>
|
|
400
|
+
Method: data.items.next()
|
|
401
|
+
Description: Retrieves the next page of query results. The `next()` method retrieves the next page of query results. The page size is defined by the `limit()` method, can be retrieved using the `pageSize` property, and navigating through pages is done with the `prev()` and `next()` methods. If items are added or removed between calls to `next()` the values returned may change. >**Note:** The `next()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection).
|
|
402
|
+
Return type: PROMISE<WixDataResult>
|
|
403
|
+
Method: data.items.prev()
|
|
404
|
+
Description: Retrieves the previous page of query results. The `prev()` method retrieves the previous page of query results. The page size is defined by the `limit()` method, can be retrieved using the `pageSize` property, and navigating through pages is done with the `prev()` and `next()` methods. If items are added or removed between calls to `prev()` the values returned may change. >**Note:** The `prev()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection).
|
|
405
|
+
Return type: PROMISE<WixDataResult>
|
|
406
|
+
Method: data.items.endsWith(field, value)
|
|
407
|
+
Description: Refines a query to match items whose specified property value ends with a specified value. The `endsWith()` method refines this query to only match items where the value of the specified field ends with the specified value. Matching with `endsWith()` is not case sensitive, so `"TEXT"` is considered to end with `"ext"`. You can only use `endsWith()` with a [field of type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data) string or reference. When specifying a field of type reference, `endsWith()` matches by the GUID of the referenced item as a string.
|
|
408
|
+
Method parameters:
|
|
409
|
+
param name: field | type: string | description: Field whose value is compared with the specified value.
|
|
410
|
+
param name: value | type: string | description: String to look for at the end of the specified property value.
|
|
411
|
+
Return type: REFERENCE<WixDataQuery>
|
|
412
|
+
Method: data.items.eq(field, value)
|
|
413
|
+
Description: Refines a query to match items whose specified property value equals the specified value. The `eq()` method refines this query to only match items where Value of the specified property equals the specified `value`. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a number does not match the same number stored as a string. Matching strings with `eq()` is case sensitive, so `"text"` is not equal to `"Text"`. If `field` points to a collection field of type array, `eq()` includes the item as long as at least one array element matches the specified `value`.
|
|
414
|
+
Method parameters:
|
|
415
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
416
|
+
param name: value | type: any | description: Value to match.
|
|
417
|
+
Return type: REFERENCE<WixDataQuery>
|
|
418
|
+
Method: data.items.fields(fields)
|
|
419
|
+
Description: Lists the fields to return in a query's results. The `fields()` method returns only the specified fields in the query's results. You can use `include()` in conjunction with `fields()` to get referenced items. When `fields()` receives an empty or invalid property, the query behaves as follows: - When no fields are specified, the query returns all fields. - When multiple fields are specified but some are invalid, invalid fields are ignored and valid fields are returned. - When only invalid fields are specified, only the default `_id` field is returned.
|
|
420
|
+
Method parameters:
|
|
421
|
+
param name: fields | type: Array<string> | description: Properties to return.
|
|
422
|
+
Return type: REFERENCE<WixDataQuery>
|
|
423
|
+
Method: data.items.find(options)
|
|
424
|
+
Description: Returns the items that match the query. The `find()` method returns a Promise that resolves to the results found by the query and some information about the results. The Promise is rejected if `find()` is called with incorrect permissions or if any of the methods used to refine the query is invalid. Calling the `find()` method triggers the [`beforeQuery()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-query) and [`afterQuery()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-query) hooks if they have been defined. > **Note:** > Calling `find()` triggers hooks for the specified collection only. It doesn't trigger hooks for referenced collections. Use the `options` parameter to override default preferences: - Ensure the most up-to-date data is retrieved with `consistentRead`. - Prevent hooks from running with `suppressHooks`. - Get a count of all the items that match the query by setting `returnTotalCount` to `true`. If you build a query and don't refine it with any `wixDataQuery` methods, `find()` returns the entire collection.
|
|
425
|
+
Method parameters:
|
|
426
|
+
param name: options | type: WixDataQueryOptions | description: Configuration options for building the query.
|
|
427
|
+
Return type: PROMISE<WixDataResult>
|
|
428
|
+
Method: data.items.ge(field, value)
|
|
429
|
+
Description: Refines a query to match items whose specified property value is greater than or equal to the specified value. The `ge()` method refines this query to only match items where the value of the specified property is greater than or equal to the specified `value`. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a number does not match the same number stored as a string. If a property contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified property are ranked lowest. The following types of properties can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `"abc"` is greater than or equal to `"ABC"` (because of the greater than), but `"ABC"` is not greater than or equal to `"abc"`. - Reference: Compares by the GUID of the referenced item as a String.
|
|
430
|
+
Method parameters:
|
|
431
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
432
|
+
param name: value | type: undefined | description: Value to match.
|
|
433
|
+
Return type: REFERENCE<WixDataQuery>
|
|
434
|
+
Method: data.items.gt(field, value)
|
|
435
|
+
Description: Refines a query to match items whose specified property value is greater than the specified value. The `gt()` method refines this query to only match items where the value of the specified property is greater than the specified `value`. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a number does not match the same number stored as a string. If a property contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified property are ranked lowest. The following types of properties can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `"text"` is greater than `"Text"`. - Reference: Compares by the GUID of the referenced item as a String.
|
|
436
|
+
Method parameters:
|
|
437
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
438
|
+
param name: value | type: undefined | description: Value to match.
|
|
439
|
+
Return type: REFERENCE<WixDataQuery>
|
|
440
|
+
Method: data.items.hasAll(field, values)
|
|
441
|
+
Description: Refines a query to match items whose specified field values equals all of the specified values. The `hasAll()` method refines this query to only match items where the value of the specified field equals all of the specified values. Matching strings with `hasAll()` is case sensitive, so `"text"` is not considered equal to `"Text"`. If the value of the specified field is an array, `hasAll()` matches if all the specified values match all the elements of the array. You can specify a list of values to match by providing an array of strings, numbers, or dates.
|
|
442
|
+
Method parameters:
|
|
443
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
444
|
+
param name: values | type: undefined | description: Values to match.
|
|
445
|
+
Return type: REFERENCE<WixDataQuery>
|
|
446
|
+
Method: data.items.hasSome(field, values)
|
|
447
|
+
Description: Refines a query to match items where the value of the specified field equals any of the specified values. The `hasSome()` method refines this query to only match items where the value of the specified field equals any of the specified values. Matching strings with `hasSome()` is case sensitive, so `"text"` is not considered equal to `"Text"`. If the value of the specified field is an array, `hasSome()` matches if any of the elements of that array match any of the specified values. If the specified field contains multiple references, specify their item GUIDs. In such a case, `hasSome() matches if any of the references match any of the specified GUIDs. You can specify a list of values to match by providing an array of strings, numbers, or dates. @public @documentationMaturity preview @param field - Field whose value is compared with `value`.
|
|
448
|
+
Method parameters:
|
|
449
|
+
param name: field | type: string | description: none
|
|
450
|
+
param name: values | type: undefined | description: Values to match.
|
|
451
|
+
Return type: REFERENCE<WixDataQuery>
|
|
452
|
+
Method: data.items.include(fields)
|
|
453
|
+
Description: Includes referenced items for the specified properties in a query's results. The `include()` method refines a query so that the items returned in the query's results include the full referenced items for the specified properties. For example, suppose you have a **books** collection with an **author** field that references an **authors** collection. Querying the **books** collection with an `include("author")` returns the relevant book items and each item will include the full referenced author item in the book's `author` property. When querying a collection that contains a reference field without using the `include()` method: - Single reference field: returned items contain only the GUID of the referenced item, and not the full referenced items. - Multiple reference field: returned items do not contain the multiple reference field at all. When including a property with multiple references, the following limitations apply: - Only one property with multiple references can be included. - The query will return an error if more than 50 items are returned, regardless of any query limit set using the `limit()` method. - Each returned item can include up to 50 referenced items. If there are more than 50 referenced items, only 50 are returned when the query is run and the `partialIncludes` property of the returned `WixDataQueryResult` is `true`. To retrieve more than 50 referenced items, use the `queryReferenced()` method. For a discussion of when to use the similar `queryReferenced()` method and when to use `include()`, see [Querying Items that Reference Other Items](https://support.wix.com/en/article/including-referenced-data-when-filtering). > **Note:** The `include()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection).
|
|
454
|
+
Method parameters:
|
|
455
|
+
param name: fields | type: Array<string> | description: Fields for which to include referenced items.
|
|
456
|
+
Return type: REFERENCE<WixDataQuery>
|
|
457
|
+
Method: data.items.isEmpty(field)
|
|
458
|
+
Description: Refines a query to match items whose specified property does not exist or does not have any value. The `isEmpty()` method refines this query to only match items where the value of the specified property is `null` or `undefined` or the property does not exist. If the property contains any value at all for a given item, including the empty string or an invalid value, that item will match the query.
|
|
459
|
+
Method parameters:
|
|
460
|
+
param name: field | type: string | description: Field to check for a value.
|
|
461
|
+
Return type: REFERENCE<WixDataQuery>
|
|
462
|
+
Method: data.items.isNotEmpty(field)
|
|
463
|
+
Description: Refines a query to match items whose specified property has any value. The `isNotEmpty()` method refines this query to only match items where the value of the specified property is not `null` or `undefined`. If the property contains any value at all for a given item, including the empty string or an invalid value, that item will match the query.
|
|
464
|
+
Method parameters:
|
|
465
|
+
param name: field | type: string | description: Field to check for a value.
|
|
466
|
+
Return type: REFERENCE<WixDataQuery>
|
|
467
|
+
Method: data.items.le(field, value)
|
|
468
|
+
Description: Refines a query to match items whose specified property value is less than or equal to the specified value. The `le()` method refines this query to only match items where the value of the specified property is less than or equal to the specified `value`. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a number does not match the same number stored as a string. If a property contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified property are ranked lowest. The following types of properties can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `"ABC"` is less than or equal to `"abc"` (because of the less than), but `"abc"` is not less than or equal to `"ABC"`. - Reference: Compares by the GUID of the referenced item as a String.
|
|
469
|
+
Method parameters:
|
|
470
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
471
|
+
param name: value | type: undefined | description: Value to match.
|
|
472
|
+
Return type: REFERENCE<WixDataQuery>
|
|
473
|
+
Method: data.items.limit(limitNumber)
|
|
474
|
+
Description: Limits the number of items the query returns. The `limit()` method defines the number of results a query returns in each page. Only one page of results is retrieved at a time. The `next()` and `prev()` methods are used to navigate the pages of a query result. By default, `limit` is set to `50`. The maximum value that `limit()` can accept is `1000`. Note that for some [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code), the maximum value `limit()` can accept is less than `1000`. For example, the maximum limit for the Wix `Stores/Product` collection is 100.
|
|
475
|
+
Method parameters:
|
|
476
|
+
param name: limitNumber | type: number | description: Number of items to return, which is also the `pageSize` of the results object.
|
|
477
|
+
Return type: REFERENCE<WixDataQuery>
|
|
478
|
+
Method: data.items.lt(field, value)
|
|
479
|
+
Description: Refines a query to match items whose specified property value is less than the specified value. The `lt()` method refines this query to only match items where the value of the specified property is less than the specified `value`. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a number does not match the same number stored as a string. If a property contains a number as a string, that value is compared alphabetically and not numerically. Items that do not have a value for the specified property are ranked lowest. The following types of properties can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `"Text"` is less than `"text"`. - Reference: Compares by the GUID of the referenced item as a String.
|
|
480
|
+
Method parameters:
|
|
481
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
482
|
+
param name: value | type: undefined | description: Value to match.
|
|
483
|
+
Return type: REFERENCE<WixDataQuery>
|
|
484
|
+
Method: data.items.ne(field, value)
|
|
485
|
+
Description: Refines a query to match items whose specified property value does not equal the specified value. The `ne()` method refines this query to only match items where the value of the specified property does not equal the specified `value`. The method only matches values of the same [data type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data). For example, a number value stored as a number is considered not equal to the same number stored as a string. Matching strings with `ne()` is case sensitive, so `"text"` is not equal to `"Text"`. If the value of the `field` property is an array, `ne()` includes items in which none of the elements of the array match the specified `value`.
|
|
486
|
+
Method parameters:
|
|
487
|
+
param name: field | type: string | description: Field whose value is compared with `value`.
|
|
488
|
+
param name: value | type: any | description: Value to match.
|
|
489
|
+
Return type: REFERENCE<WixDataQuery>
|
|
490
|
+
Method: data.items.not(filter)
|
|
491
|
+
Description: Adds a `not` condition to the query or filter. The `not()` method adds a `not` condition to this query. A query with a `not` returns all the items that match the query as defined up to the `not` method, but don't match the filter passed to the `not` method. If the query only contains a `not()` method, it returns all the items that don't match the filter defined by the `not` method.
|
|
492
|
+
Method parameters:
|
|
493
|
+
param name: filter | type: WixDataFilter | description: Filter to add to the initial filter as a `not` condition.
|
|
494
|
+
Return type: REFERENCE<WixDataQuery>
|
|
495
|
+
Method: data.items.or(filter)
|
|
496
|
+
Description: Adds an `or` condition to the query or filter. The `or()` method adds an inclusive `or` condition to this filter. A query or filter with an `or` returns all the items that match the query or filter as defined up to the `or` method, the items that match the query or filter passed to the `or` method, and the items that match both. The `or()` method is designed to work with 2 or more queries or filters. Used on its own, it returns all the items in a collection.
|
|
497
|
+
Method parameters:
|
|
498
|
+
param name: filter | type: WixDataFilter | description: Filter to add to the initial filter as an `or` condition.
|
|
499
|
+
Return type: REFERENCE<WixDataQuery>
|
|
500
|
+
Method: data.items.skip(skipCount)
|
|
501
|
+
Description: Sets the number of items to skip before returning query results. The `skip()` method defines the number of results to skip in the query results before returning new query results. For example, if you query a collection and 50 items match your query, but you set `skip` to 10, the results returned will skip the first 10 items that match and return the 11th through 50th items. By default, `skip` is set to 0.
|
|
502
|
+
Method parameters:
|
|
503
|
+
param name: skipCount | type: number | description: Number of items to skip in the query results before returning the results.
|
|
504
|
+
Return type: REFERENCE<WixDataQuery>
|
|
505
|
+
Method: data.items.startsWith(field, value)
|
|
506
|
+
Description: Refines a query to match items whose specified property value starts with a specified value. The `startsWith()` method refines this query to only match items where the value of the specified field starts with the specified value. Matching with `startsWith()` is not case sensitive, so `"TEXT"` is considered to start with `"tex"`. You can only use `startsWith()` with a [field of type](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data) string or reference. When specifying a field of type reference, `startsWith()` matches by the GUID of the referenced item as a string.
|
|
507
|
+
Method parameters:
|
|
508
|
+
param name: field | type: string | description: Field whose value is compared with the specified value.
|
|
509
|
+
param name: value | type: string | description: String to look for at the beginning of the specified property value.
|
|
510
|
+
Return type: REFERENCE<WixDataQuery>
|
|
309
511
|
|
|
512
|
+
```
|
|
513
|
+
</type_definition>
|
|
514
|
+
</data_items_query>
|