File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,11 @@ const strictQueryForReifiedBlocks = async (
2020 const query = `[:find ?u ?d
2121 :in $ ${ paramsAsSeq . map ( ( [ k ] ) => "?" + k ) . join ( " " ) }
2222 :where [?s :block/uid ?u] [?s :block/props ?p] [(get ?p :${ DISCOURSE_GRAPH_PROP_NAME } ) ?d]
23- ${ paramsAsSeq . map ( ( [ k ] ) => `[(get ?d :${ k } ) ?_${ k } ] [(= ?${ k } ?_${ k } )]` ) . join ( " " ) } ]` ;
24- // Note: the extra _k binding variable is only needed for the backend query somehow
25- // In a local query, we can directly map to `[(get ?d :${k}) ?${k}]`
26- const result = await Promise . resolve (
27- window . roamAlphaAPI . data . backend . q (
28- query ,
29- ...paramsAsSeq . map ( ( [ , v ] ) => v ) ,
30- ) as [ string , Record < string , string > ] [ ] ,
31- ) ;
23+ ${ paramsAsSeq . map ( ( [ k ] ) => `[(get ?d :${ k } ) ?${ k } ]` ) . join ( " " ) } ]` ;
24+ const result = ( await window . roamAlphaAPI . data . async . q (
25+ query ,
26+ ...paramsAsSeq . map ( ( [ , v ] ) => v ) ,
27+ ) ) as [ string , Record < string , string > ] [ ] ;
3228 // post-filtering because cannot filter by number of keys in datascript
3329 const numParams = Object . keys ( parameterUids ) . length ;
3430 const resultF = result
You can’t perform that action at this time.
0 commit comments