Skip to content

Commit 5723e66

Browse files
authored
(DOCSP-30703) React Native Parametrize Queries (#2901)
## Pull Request Info ### Jira - https://jira.mongodb.org/browse/DOCSP-30703 ### Staged Changes - [Read](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/DOCSP-30703/sdk/react-native/crud/read/) ### Reminder Checklist If your PR modifies the docs, you might need to also update some corresponding pages. Check if completed or N/A. - [ ] Create Jira ticket for corresponding docs-app-services update(s), if any - [ ] Checked/updated Admin API - [ ] Checked/updated CLI reference ### Review Guidelines [REVIEWING.md](https://github.com/mongodb/docs-realm/blob/master/REVIEWING.md)
1 parent 9f9c8ab commit 5723e66

File tree

6 files changed

+8
-459
lines changed

6 files changed

+8
-459
lines changed

examples/react-native/__tests__/js/CRUD/read-test.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ describe('Read Data Tests', () => {
114114
const tasks = useQuery(Task);
115115

116116
// filter for tasks with a high priority
117-
const highPriorityTasks = tasks.filtered('priority >= 4');
117+
const highPriorityTasks = tasks.filtered('priority >= $0', 4);
118118

119119
// filter for tasks that have just-started or short-running progress
120120
const lowProgressTasks = tasks.filtered(
121-
'1 <= progressMinutes && progressMinutes < 10',
121+
'$0 <= progressMinutes && progressMinutes < $1', 1, 10
122122
);
123123
return (
124124
<>

examples/react-native/__tests__/ts/CRUD/read-test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ describe('Read Data Tests', () => {
115115
const tasks = useQuery(Task);
116116

117117
// filter for tasks with a high priority
118-
const highPriorityTasks = tasks.filtered('priority >= 4');
118+
const highPriorityTasks = tasks.filtered('priority >= $0', 4);
119119

120120
// filter for tasks that have just-started or short-running progress
121121
const lowProgressTasks = tasks.filtered(
122-
'1 <= progressMinutes && progressMinutes < 10',
122+
'$0 <= progressMinutes && progressMinutes < $1', 1, 10
123123
);
124124

125125
return (

source/examples/generated/react-native/js/read-test.snippet.crud-read-filter-data.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const TaskList = () => {
33
const tasks = useQuery(Task);
44

55
// filter for tasks with a high priority
6-
const highPriorityTasks = tasks.filtered('priority >= 4');
6+
const highPriorityTasks = tasks.filtered('priority >= $0', 4);
77

88
// filter for tasks that have just-started or short-running progress
99
const lowProgressTasks = tasks.filtered(
10-
'1 <= progressMinutes && progressMinutes < 10',
10+
'$0 <= progressMinutes && progressMinutes < $1', 1, 10
1111
);
1212
return (
1313
<>

source/examples/generated/react-native/ts/read-test.snippet.crud-read-filter-data.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const TaskList = () => {
33
const tasks = useQuery(Task);
44

55
// filter for tasks with a high priority
6-
const highPriorityTasks = tasks.filtered('priority >= 4');
6+
const highPriorityTasks = tasks.filtered('priority >= $0', 4);
77

88
// filter for tasks that have just-started or short-running progress
99
const lowProgressTasks = tasks.filtered(
10-
'1 <= progressMinutes && progressMinutes < 10',
10+
'$0 <= progressMinutes && progressMinutes < $1', 1, 10
1111
);
1212

1313
return (

source/sdk/java/api/io/realm/transformer.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)