Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVelocity does not support the text variants of logical operators #7

Open
dpupek opened this issue Aug 15, 2018 · 6 comments
Open

NVelocity does not support the text variants of logical operators #7

dpupek opened this issue Aug 15, 2018 · 6 comments

Comments

@dpupek
Copy link

dpupek commented Aug 15, 2018

So far I can find no way of getting Nvelocity to support the text variants of the logical operators. Here are some examples from velocity:

Operator Text variant
&& and
|| or
! not
@jonorossi
Copy link
Member

NVelocity isn't Velocity, NVelocity is a port of Velocity from over 10 years ago so is missing many of the Velocity changes since then, and has some of its own changes. This project has been unmaintained for years until only 2 weeks ago when someone wanted to reboot it.

I checked the Velocity docs and those text variants aren't mentioned there, I assume they are fairly new. However, feel free to contribute a pull request adding support.

@dpupek
Copy link
Author

dpupek commented Aug 15, 2018

From the docs:

There are text versions of all logical operators, including eq, ne, and, or, not, gt, ge, lt, and le.

You just need to read a little further. I may be willing to port this if it's just missing.

image

@dpupek
Copy link
Author

dpupek commented Aug 15, 2018

@jonorossi
Copy link
Member

You just need to read a little further.

Apologies, I missed that paragraph in the middle of the block which I skim read thinking it was about not, couldn't exactly search for "and", "or" or "not", and they didn't use the term "variant".

@jonorossi
Copy link
Member

Another example from the docs:

Yer, I checked that page first and noticed that "&&" and "||" aren't even on there, neither are "and" and "or".

@dpupek
Copy link
Author

dpupek commented Aug 15, 2018

No worries...I did a little research and it seems like the text variants show up in 1.6. I'm pretty sure that NVelocity predates that:

http://velocity.apache.org/engine/1.6/vtl-reference-guide.html#aifelseifelse_-_Output_conditional_on_truth_of_statements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants