forked from mongodb/docs-realm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate snippets from .ts test file
- Loading branch information
1 parent
41129af
commit 6e29ca1
Showing
38 changed files
with
1,323 additions
and
0 deletions.
There are no files selected for viewing
892 changes: 892 additions & 0 deletions
892
examples/node/v12/__tests__/realm-query-language.test.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import Realm, { BSON } from "realm"; | ||
import { Item, Project, Office, Address } from "./models/rql-data-models.ts"; | ||
|
||
describe("Test RQL Models", () => { | ||
let realm; | ||
const config = { schema: [Project, Item, Office, Address] }; | ||
|
||
beforeEach(async () => { | ||
realm = await Realm.open(config); | ||
}); | ||
|
||
afterEach(() => { | ||
// After each test, delete the objects and close the realm | ||
if (realm && !realm.isClosed) { | ||
realm.write(() => { | ||
realm.deleteAll(); | ||
}); | ||
realm.close(); | ||
expect(realm.isClosed).toBe(true); | ||
} | ||
}); | ||
|
||
afterAll(() => { | ||
Realm.deleteFile(config); | ||
}); | ||
|
||
test("Can open realm with config", async () => { | ||
expect(realm.isClosed).toBe(false); | ||
}); | ||
|
||
test("Can create object of Item type", () => { | ||
realm.write(() => { | ||
realm.create(Item, { | ||
_id: new BSON.ObjectId(), | ||
name: "get coffee", | ||
}); | ||
}); | ||
const coffeeItem = realm.objects(Item)[0]; | ||
expect(coffeeItem._id instanceof BSON.ObjectId).toBe(true); | ||
expect(coffeeItem.name).toBe("get coffee"); | ||
expect(coffeeItem.isComplete).toBe(false); | ||
}); | ||
|
||
test("Can create object of Project type", () => { | ||
realm.write(() => { | ||
const teaItem = realm.create(Item, { | ||
_id: new BSON.ObjectId(), | ||
name: "get tea", | ||
}); | ||
const officeAddress = realm.create(Office, { | ||
name: "Austin", | ||
address: { | ||
name: "Main Branch", | ||
street: "123 Main St", | ||
zipcode: 10019, | ||
}, | ||
}); | ||
realm.create(Project, { | ||
_id: new BSON.ObjectId(), | ||
name: "beverages", | ||
items: [teaItem], | ||
projectLocation: officeAddress, | ||
}); | ||
}); | ||
const bevProject = realm.objects(Project)[0]; | ||
expect(bevProject._id instanceof BSON.ObjectId).toBe(true); | ||
expect(bevProject.name).toBe("beverages"); | ||
expect(bevProject.items[0].name).toBe("get tea"); | ||
expect(bevProject.projectLocation.name).toBe("Austin"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import Realm, { BSON } from "realm"; | ||
import { Item, Project, Office, Address } from "./models/rql-data-models.ts"; | ||
|
||
describe("Test RQL Models", () => { | ||
let realm: Realm; | ||
const config = { schema: [Project, Item, Office, Address] }; | ||
|
||
beforeEach(async () => { | ||
realm = await Realm.open(config); | ||
}); | ||
|
||
afterEach(() => { | ||
if (realm && !realm.isClosed) { | ||
realm.write(() => { | ||
realm.deleteAll(); | ||
}); | ||
realm.close(); | ||
expect(realm.isClosed).toBe(true); | ||
} | ||
}); | ||
|
||
afterAll(() => { | ||
Realm.deleteFile(config); | ||
}); | ||
|
||
test("Can open realm with config", async () => { | ||
expect(realm.isClosed).toBe(false); | ||
}); | ||
|
||
test("Can create object of Item type", () => { | ||
const itemId = new BSON.ObjectId(); | ||
realm.write(() => { | ||
realm.create(Item, { | ||
_id: itemId, | ||
name: "get coffee", | ||
}); | ||
}); | ||
const coffeeItem = realm.objects(Item)[0]; | ||
expect(coffeeItem._id).toEqual(itemId); | ||
expect(coffeeItem.name).toBe("get coffee"); | ||
expect(coffeeItem.isComplete).toBe(false); | ||
}); | ||
|
||
test("Can create object of Project type", () => { | ||
const projectId = new BSON.ObjectId(); | ||
realm.write(() => { | ||
// Create the tea item | ||
const teaItem = realm.create("Item", { | ||
_id: new BSON.ObjectId(), | ||
name: "get tea", | ||
}); | ||
|
||
// Create the address object | ||
const address = { | ||
name: "Main Branch", | ||
street: "123 Main St", | ||
zipcode: 10019, | ||
}; | ||
|
||
// Create the office object | ||
const office = realm.create("Office", { | ||
name: "Main Office", | ||
address: address, | ||
}); | ||
// Create the project object | ||
realm.create("Project", { | ||
_id: projectId, | ||
name: "beverages", | ||
items: [teaItem], | ||
projectLocation: office, | ||
}); | ||
}); | ||
|
||
const bevProject = realm.objects(Project)[0]; | ||
expect(bevProject._id).toEqual(projectId); | ||
expect(bevProject.name).toBe("beverages"); | ||
expect(bevProject.items[0].name).toBe("get tea"); | ||
expect(bevProject.projectLocation?.name).toBe("Main Office"); | ||
expect(bevProject.projectLocation?.address.name).toBe("Main Branch"); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
...node/v12/formatted/realm-query-language.test.snippet.aggregate-operators.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. code-block:: typescript | ||
var priorityNum = 5; | ||
// Find projects with average item `priority` above 5. | ||
"items.@avg.priority > $0", priorityNum | ||
// Find projects where maximum `priority` of all items is 5. | ||
"items.@max.priority < $0", priorityNum | ||
// Find projects where minimum `priority` of all items is 5. | ||
"items.@min.priority > $0", priorityNum | ||
// Find projects with more than 5 items. | ||
"items.@count > $0", 5 | ||
// Find projects with item `progressMinutes` greater than 100. | ||
"items.@sum.progressMinutes > $0", 100 |
3 changes: 3 additions & 0 deletions
3
...12/formatted/realm-query-language.test.snippet.arithmetic-obj-properties.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: typescript | ||
"progressMinutes * priority == 90" |
9 changes: 9 additions & 0 deletions
9
...ormatted/realm-query-language.test.snippet.backlinks-aggregate-operators.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. code-block:: typescript | ||
// Find items that are referenced by multiple projects | ||
"projects.@count > 1" | ||
// Find items that are not referenced by any project | ||
"@links.Project.items.@count == 0" | ||
// Find items that belong to a project where the average item has | ||
// been worked on for at least 5 minutes | ||
"@links.Project.items.items.@avg.progressMinutes > 10" |
4 changes: 4 additions & 0 deletions
4
...d/node/v12/formatted/realm-query-language.test.snippet.backlinks-atCount.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.. code-block:: typescript | ||
// Find items that are not referenced by another object of any type | ||
"@links.@count == 0" |
5 changes: 5 additions & 0 deletions
5
...d/node/v12/formatted/realm-query-language.test.snippet.backlinks-atLinks.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.. code-block:: typescript | ||
// Find items that belong to a project with a quota | ||
// less than 10 (using '@links'). | ||
"@links.Project.items.quota < 10" |
8 changes: 8 additions & 0 deletions
8
...rmatted/realm-query-language.test.snippet.backlinks-collection-operators.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. code-block:: typescript | ||
// Find items where ANY project that references the item | ||
// has a quota greater than 10. | ||
"ANY @links.Project.items.quota > 10" | ||
// Find items where ALL projects that reference the item | ||
// have a quota less than 5. | ||
"ALL @links.Project.items.quota < 5" |
5 changes: 5 additions & 0 deletions
5
...v12/formatted/realm-query-language.test.snippet.backlinks-linkingObjects.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.. code-block:: typescript | ||
// Find items that belong to a project with a quota greater than 10 | ||
// (using 'LinkingObjects'). | ||
"projects.quota > 10" |
5 changes: 5 additions & 0 deletions
5
...ed/node/v12/formatted/realm-query-language.test.snippet.basic-arithmetic.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.. code-block:: typescript | ||
// Find items with a `priority` greater than 3. | ||
"2 * priority > 6" // `priority > 3` | ||
"priority >= 2 * (2 - 1) + 2" // `priority >= 4` |
16 changes: 16 additions & 0 deletions
16
...ode/v12/formatted/realm-query-language.test.snippet.comparison-operators.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.. code-block:: typescript | ||
// Compare `priority` values against a threshold value. | ||
"priority > $0", 5 | ||
// Compare `progressMinutes` values against a threshold value. | ||
"progressMinutes > $0", 120 | ||
// Compare `assignee` values to `null` value. | ||
"assignee == $0", null | ||
// Compare `priority` values against an inclusive range of values. | ||
"priority BETWEEN { $0 , $1 }", 1, 5 | ||
// Compare `progressMinutes` values against any of the listed values. | ||
"progressMinutes IN { $0, $1, $2 }", 10, 30, 60 |
5 changes: 5 additions & 0 deletions
5
.../v12/formatted/realm-query-language.test.snippet.date-alt-representation.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.. code-block:: typescript | ||
var lastYear = new Date(1577883184000); // Unix timestamp in ms | ||
var thisYear = new Date("2021-01-01@17:30:15:0"); // DateTime in UTC | ||
var today = new Date("April 01, 2021 03:24:00"); // Alternate DateTime format |
7 changes: 7 additions & 0 deletions
7
...v12/formatted/realm-query-language.test.snippet.date-parameterized-query.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.. code-block:: typescript | ||
// Find to-do items completed before today's date. | ||
"dateCompleted < $0", today | ||
// Find to-do items completed this year until today. | ||
"dateCompleted > $0 AND dateCompleted < $1", thisYear, today |
3 changes: 3 additions & 0 deletions
3
...d/node/v12/formatted/realm-query-language.test.snippet.deep-dot-notation.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: typescript | ||
"projectLocation.address.zipcode == 10019" |
25 changes: 25 additions & 0 deletions
25
...ode/v12/formatted/realm-query-language.test.snippet.dictionary-operators.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.. code-block:: typescript | ||
// Find `comments` dictionary properties with key 'status'. | ||
"comments.@keys == $0", "status" | ||
// Find `comments` dictionary properties with key 'status' | ||
// and value 'On track'. | ||
"comments['status'] == $0", "On track" | ||
// Find `comments` dictionary properties with | ||
// more than one key-value pair. | ||
"comments.@count > $0", 1 | ||
// Find `comments` dictionary properties where ANY | ||
// values are of type 'string`. | ||
"ANY comments.@type == 'string'" | ||
"comments.@type == 'string'" // (Equivalent - ANY is implied.) | ||
// Find `comments` dictionary properties where ALL | ||
// values are of type 'int'. | ||
"ALL comments.@type == 'int'" | ||
// Find `comments` dictionary properties where NO | ||
// values are of type 'int'. | ||
"NONE comments.@type == 'int'" | ||
3 changes: 3 additions & 0 deletions
3
.../formatted/realm-query-language.test.snippet.list-comparisons-collection.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: typescript | ||
"oid(631a072f75120729dc9223d9) IN items._id" |
8 changes: 8 additions & 0 deletions
8
...rmatted/realm-query-language.test.snippet.list-comparisons-parameterized.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. code-block:: typescript | ||
const ids = [ | ||
new BSON.ObjectId("631a072f75120729dc9223d9"), | ||
new BSON.ObjectId("631a0737c98f89f5b81cd24d"), | ||
new BSON.ObjectId("631a073c833a34ade21db2b2"), | ||
]; | ||
const parameterizedQuery = realm.objects(Item).filtered("_id IN $0", ids); |
3 changes: 3 additions & 0 deletions
3
.../v12/formatted/realm-query-language.test.snippet.list-comparisons-static.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: typescript | ||
"priority IN {0, 1, 2}" |
7 changes: 7 additions & 0 deletions
7
...d/node/v12/formatted/realm-query-language.test.snippet.logical-operators.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.. code-block:: typescript | ||
// Find all items assigned to Ali AND marked completed. | ||
"assignee == $0 AND isComplete == $1", "Ali", true | ||
// Find all items assigned to Alex OR to Ali. | ||
"assignee == $0 OR assignee == $1", "Alex", "Ali" |
4 changes: 4 additions & 0 deletions
4
...formatted/realm-query-language.test.snippet.nil-type-parameterized-query.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.. code-block:: typescript | ||
// comparison to language null pointer | ||
"assignee == $0", null |
3 changes: 3 additions & 0 deletions
3
.../generated/node/v12/formatted/realm-query-language.test.snippet.nil-type.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: typescript | ||
"assignee == nil" |
3 changes: 3 additions & 0 deletions
3
...nerated/node/v12/formatted/realm-query-language.test.snippet.oid-literal.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: typescript | ||
"_id == $0", oidValue |
3 changes: 3 additions & 0 deletions
3
...mples/generated/node/v12/formatted/realm-query-language.test.snippet.oid.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: typescript | ||
"_id == oid(6001c033600510df3bbfd864)" |
8 changes: 8 additions & 0 deletions
8
...node/v12/formatted/realm-query-language.test.snippet.parameterized-query.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. code-block:: typescript | ||
// Include one parameter with `$0`. | ||
"progressMinutes > 1 AND assignee == $0", "Ali" | ||
// Include multiple parameters using ascending integers, | ||
// starting at`$0`. | ||
"progressMinutes > $0 AND assignee == $1", 1, "Alex" |
3 changes: 3 additions & 0 deletions
3
...generated/node/v12/formatted/realm-query-language.test.snippet.predicate.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: typescript | ||
const expression = "priority == 1"; |
12 changes: 12 additions & 0 deletions
12
...s/generated/node/v12/formatted/realm-query-language.test.snippet.rql-fts.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. code-block:: typescript | ||
// Find items with 'write' in the name. | ||
"name TEXT $0", "write" | ||
// Use '-' to exclude: | ||
// Find items with 'write' but not 'tests' in the name. | ||
"name TEXT $0", "write -tests" | ||
// Use '*' to match any suffix characters: | ||
// Find items starting with 'wri-'. | ||
"name TEXT $0", "wri*" |
3 changes: 3 additions & 0 deletions
3
...ed/node/v12/formatted/realm-query-language.test.snippet.serialized-query.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: typescript | ||
"progressMinutes > 1 AND assignee == 'Ali'" |
17 changes: 17 additions & 0 deletions
17
...rated/node/v12/formatted/realm-query-language.test.snippet.set-operators.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.. code-block:: typescript | ||
// Find projects with no complete items. | ||
"NONE items.isComplete == $0", true | ||
// Find projects that contain an item with priority 10. | ||
"ANY items.priority == $0", 10 | ||
// Find projects that only contain completed items. | ||
"ALL items.isComplete == $0", true | ||
// Find projects with at least one item assigned to | ||
// either Alex or Ali. | ||
"ANY items.assignee IN { $0 , $1 }", "Alex", "Ali" | ||
// Projects with no items assigned to either Alex or Ali. | ||
"NONE items.assignee IN { $0 , $1 }", "Alex", "Ali" |
5 changes: 5 additions & 0 deletions
5
...erated/node/v12/formatted/realm-query-language.test.snippet.simple-query.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.. code-block:: typescript | ||
const items = realm.objects(Item); | ||
// Get all items where 'priority' property is 7 or more. | ||
const importantItems = items.filtered("priority >= $0", 7); |
3 changes: 3 additions & 0 deletions
3
...node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: typescript | ||
"assignee == 'Ali' SORT(priority DESC) DISTINCT(name) LIMIT(5)" |
9 changes: 9 additions & 0 deletions
9
...ed/node/v12/formatted/realm-query-language.test.snippet.string-operators.ts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. code-block:: typescript | ||
// Find projects whose name starts with the letter 'e' | ||
// (case-insensitive). | ||
"name BEGINSWITH[c] $0", "e" | ||
// Find projects whose name contains the letters 'ie' | ||
// (case-sensitive). | ||
"name CONTAINS $0", "ie" |
Oops, something went wrong.