Skip to content

Commit f7f918b

Browse files
GudineGamerGirlandCo
authored andcommitted
rename row to $row in docs and comments
1 parent 234ab89 commit f7f918b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

docs/docs/data/blocks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Inline fields on blocks can be loaded using the [field syntax](fields):
2525
```js
2626
// In queries and expressions, you can just reference the field directly:
2727
@block and genre = "Fantasy"
28-
@block and row["last reviewed"] > date(now) - dur(7d)
28+
@block and $row["last reviewed"] > date(now) - dur(7d)
2929

3030
// In javascript, use the field API:
3131
block.value("last reviewed")

docs/docs/data/fields.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ You can reference fields directly by name in queries and datacore expressions. T
2525
// You can also reference intrinsic fields (fields prefixed with `$`):
2626
@block and $tags.contains("#test")
2727

28-
// Use the implicit 'row' in order to handle fields with spaces in their names:
29-
@section and row["last reviewed"] >= date(now) - dur(7d)
28+
// Use the implicit '$row' in order to handle fields with spaces in their names:
29+
@section and $row["last reviewed"] >= date(now) - dur(7d)
3030
```
3131

3232
## In Javascript

docs/docs/data/pages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ You can reference page fields in queries and expressions directly by case-insens
3535

3636
```js
3737
@page and rating >= 7
38-
@page and row["spaced field"].contains("thing")
38+
@page and $row["spaced field"].contains("thing")
3939
```
4040

4141
## In Javascript

docs/docs/data/sections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Inline fields on sections can be loaded using the [field syntax](fields):
2626

2727
```js
2828
// In queries and expressions, you can just reference the field directly:
29-
@section and row["last reviewed"] > date(now) - dur(7d)
29+
@section and $row["last reviewed"] > date(now) - dur(7d)
3030

3131
// In javascript, use the field API:
3232
section.value("last reviewed")

src/expression/expression.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ export namespace Expressions {
149149
return op == "<=" || op == "<" || op == ">" || op == ">=" || op == "!=" || op == "=";
150150
}
151151

152-
/** Returns a set of all unbound variables (i.e., variables not provided by `row`, lambdas, or similar.) */
152+
/** Returns a set of all unbound variables (i.e., variables not provided by `$row`, lambdas, or similar.) */
153153
export function unboundVariables(expr: Expression, bound: Set<string> = new Set([ROW])): Set<string> {
154154
switch (expr.type) {
155155
case "binaryop":
156-
// Special case `row["...."]`.
156+
// Special case `$row["...."]`.
157157
if (
158158
expr.op === "index" &&
159159
expr.left.type == "variable" &&

0 commit comments

Comments
 (0)