Skip to content

Commit 52bf496

Browse files
authored
ENG-1452 - Use logid for dnp in query builder (#802)
1 parent c7bb222 commit 52bf496

1 file changed

Lines changed: 2 additions & 25 deletions

File tree

apps/roam/src/utils/conditionToDatalog.ts

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-disable @typescript-eslint/naming-convention */
2-
import { DAILY_NOTE_PAGE_TITLE_REGEX } from "roamjs-components/date/constants";
32
import parseNlpDate from "roamjs-components/date/parseNlpDate";
43
import getAllPageNames from "roamjs-components/queries/getAllPageNames";
54
import normalizePageTitle from "roamjs-components/queries/normalizePageTitle";
@@ -63,30 +62,8 @@ export const getTitleDatalog = ({
6362
type: "data-pattern",
6463
arguments: [
6564
{ type: "variable", value: source },
66-
{ type: "constant", value: ":node/title" },
67-
{ type: "variable", value: `${source}-Title` },
68-
],
69-
},
70-
{
71-
type: "fn-expr",
72-
fn: "re-pattern",
73-
arguments: [
74-
{
75-
type: "constant",
76-
value: `"${DAILY_NOTE_PAGE_TITLE_REGEX.source}"`,
77-
},
78-
],
79-
binding: {
80-
type: "bind-scalar",
81-
variable: { type: "variable", value: `date-regex` },
82-
},
83-
},
84-
{
85-
type: "pred-expr",
86-
pred: "re-find",
87-
arguments: [
88-
{ type: "variable", value: "date-regex" },
89-
{ type: "variable", value: `${source}-Title` },
65+
{ type: "constant", value: ":log/id" },
66+
{ type: "variable", value: `${source}-log-id` },
9067
],
9168
},
9269
];

0 commit comments

Comments
 (0)