Skip to content

Commit

Permalink
(DOCSP-27197): Rename 'task' to 'item' in RQL examples (#2646)
Browse files Browse the repository at this point in the history
## Pull Request Info

Rename `task` to `item` in RQL examples and generated code samples

### Jira

- https://jira.mongodb.org/browse/DOCSP-27197

### Staged Changes

- [Realm Query
Language](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/docsp-27197-rename-task-rql/realm-query-language/)

### Reminder Checklist

If your PR modifies the docs, you might need to also update some
corresponding
pages. Check if completed or N/A.

- [x] Create Jira ticket for corresponding docs-app-services update(s),
if any
- [x] Checked/updated Admin API
- [x] Checked/updated CLI reference

### Review Guidelines


[REVIEWING.md](https://github.com/mongodb/docs-realm/blob/master/REVIEWING.md)
  • Loading branch information
cbullinger committed Mar 3, 2023
1 parent e95ac17 commit e94c252
Show file tree
Hide file tree
Showing 22 changed files with 206 additions and 232 deletions.
4 changes: 2 additions & 2 deletions examples/dart/test/task_project_models_test.dart
Expand Up @@ -8,7 +8,7 @@ part 'task_project_models_test.g.dart'; // :remove:
// :uncomment-end:

@RealmModel()
class _Task {
class _Item {
@MapTo("_id")
@PrimaryKey()
late ObjectId id;
Expand All @@ -27,7 +27,7 @@ class _Project {
late ObjectId id;

late String name;
late List<_Task> tasks;
late List<_Item> items;
int? quota;
}
// :snippet-end:
Expand Down
3 changes: 2 additions & 1 deletion examples/dotnet/Examples/RqlSchemaExamples.cs
Expand Up @@ -10,7 +10,8 @@ namespace Examples.RqlSchemaExamples
// "terms": {
// "RqlTask": "Item",
// "RqlProject": "Project",
// "RqlTasks": "Items"}
// "RqlTasks": "Items",
// "RqlItems": "Items"}
// }
public class RqlTask : RealmObject
{
Expand Down
@@ -1,13 +1,13 @@
package com.mongodb.realm.realmkmmapp

import io.realm.kotlin.types.RealmList
import org.mongodb.kbson.ObjectId
import io.realm.kotlin.types.RealmObject
import io.realm.kotlin.types.annotations.PrimaryKey
import org.mongodb.kbson.ObjectId

class RQLTest: RealmTest() {
// :snippet-start: rql-schema-example
class Task(): RealmObject {
class Item(): RealmObject {
@PrimaryKey
var _id: ObjectId = ObjectId()
lateinit var name: String
Expand All @@ -21,7 +21,7 @@ class RQLTest: RealmTest() {
@PrimaryKey
var _id: ObjectId = ObjectId()
lateinit var name: String
lateinit var tasks: RealmList<Task>
lateinit var items: RealmList<Item>
var quota: Int? = null
}
// :snippet-end:
Expand Down

0 comments on commit e94c252

Please sign in to comment.