Add :embed-block
as :inputs
Just like :current-block
works now. But :embed-block
should be the :db/id
of block which embeds the block with query. With that approach we can use the same one query with block embedding and parametrize it via embed block properties. Example:- param:: value
{{embed ((666cd068-133c-4b30-9df4-1dd8a94179cb))}}
- param:: another-value
{{embed ((666cd068-133c-4b30-9df4-1dd8a94179cb))}}
Where the ((666cd068-133c-4b30-9df4-1dd8a94179cb))
is the reference to block with query:#+BEGIN_QUERY
{
:inputs [:embed-block]
:query [:find ?value
:in $ ?embed-block
:where
(property ?embed-block :param ?value)
;; ... any way of usage ?value
]
}
#+END_QUERY
This will lead to result: the only one query, but ability to parametrize it as we need: