in reply to Re: Implementing named infix operators with parser hook?
in thread Implementing named infix operators with parser hook?

> did you consider something like: is 2 => between(1,3)?

Yes I did. :)

> closures

I'm using objects.

I have a very good solution yet, using indirect method calls and constants as operands.

col BETWEEN 1,2

I just need an alternative for the cases where the LHS is not a constant, which is rare in most SQL statements.

Maybe its time to show a proof of concept...

Cheers Rolf
, (addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^3: Implementing named infix operators with parser hook?
by anonymized user 468275 (Curate) on Aug 17, 2018 at 11:28 UTC
    Don't you mean it's rare for LHS to be a constant in SQL statements. Or is the problem that 'rare in most' as opposed to just saying 'rare' can be satisfied by a 51% hit rate (most can be 50.5%, with rare being say 1.5% inside that, but by saying nothing about the other 49.5% allows them all to be hits). One has to be rigorous with verbal expression of statistical propositions.

    One world, one people

      Rare = significantly less than 5 %.

      Columns are represented as Perl constants in my DSL.

      Cheers Rolf
      under (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice