As a side note, positional argument feels brittle here since it's not really
a software developement context. I'd suggest this kind of syntax:
```
2100-12-31 query "foo" "select date limit {limit=somedefaultvalue}"
limit: "Number of records to return"
```
and command would be `.run foo limit=3`. Then documentation and reporting
for errors would be much more convenient.
Le mer. 21 mai 2025 à 21:23, Martin Blais <[email protected]> a écrit :
>
> Vibecode it!
>
>
> On Wed, May 21, 2025 at 3:06 PM Henry Mitchell <[email protected]> wrote:
>>
>> Thanks for confirming this is not supported. I looked through the issues but
>> did not see anything like it so filed
>> https://github.com/beancount/beanquery/issues/249
>>
>> On Tue, May 20, 2025 at 4:28 PM Martin Blais <[email protected]> wrote:
>>>
>>> That is indeed a great idea
>>>
>>> On Tue, May 20, 2025, 17:38 Justus Pendleton <[email protected]> wrote:
>>>>
>>>> No, there is no way to use parameters in queries in that way. It would be
>>>> a nice thing to add though, so you might check the bean-query project and
>>>> see if there's already an existing request for something like that and
>>>> voice your support.
>>>>
>>>> On Thursday, May 15, 2025 at 4:22:31 AM UTC+9:30 [email protected] wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Are query directives and bean-query not intended to be used this way? Or
>>>>> is this documented somewhere and I failed to find it?
>>>>>
>>>>> On Monday, May 5, 2025 at 1:29:18 PM UTC-7 Henry Mitchell wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am tinkering with migrating from ledger to beancount. In bean-query, I
>>>>>> see I can run a query defined as a directive in my ledger with ".run
>>>>>> query-name". Is there a way to have the query take a parameter and pass
>>>>>> it in from beanquery?
>>>>>>
>>>>>> As a trivial example, suppose I wanted to pass a number to limit here:
>>>>>> 2100-12-31 query "foo" "select date limit %d"
>>>>>>
>>>>>> Can I do so? Various attempts at ".run foo 3" seem to fail.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "Beancount" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>> email to [email protected].
>>>> To view this discussion visit
>>>> https://groups.google.com/d/msgid/beancount/f42bd7db-8b90-4766-917f-3b2f41912223n%40googlegroups.com.
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Beancount" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/beancount/td18CgN1y-0/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> To view this discussion visit
>>> https://groups.google.com/d/msgid/beancount/CAK21%2BhMQoT6vOZf7iCm%3DRhH6VpLAZKXrZS%3DbDRNWEMuiGaPJkg%40mail.gmail.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion visit
>> https://groups.google.com/d/msgid/beancount/CACTkciMNvzsoP24ge-T4REusz%2BC9mbcjxJvEfeEnAfcLKV-_cQ%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/beancount/CAK21%2BhORELLtuROz11rjR33WJL4VDSmMCtiq6s5E6NL-5LS3RQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/beancount/CANdR1%2BCcgog%2BKSwkcwyOGmfwUYqNDthjqsnH%2BUkbkcM3-%2BBkZQ%40mail.gmail.com.