Replies: 4 comments 3 replies
-
I'll look at whether casting can be done in a platform-neutral way. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you 🙏 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Any news on this? |
Beta Was this translation helpful? Give feedback.
3 replies
-
I've implemented a first basic implementation for numeric types. You can now cast to integer ( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello
I was looking at ways to protect raw data / nicer to read and I found this package on Laravel-News (https://laravel-news.com/query-expressions-for-laravel).
This is a really good package and so far I love it.
There's one problem I ran into... I think it's missing the cast function.
Right Now, I got the following code:
new Expression("sum(cast({$this->balanceWithoutTaxesField} as float)) as balance_without_taxes"),
It would be nice if it could be refactored with something like this:
new Alias(new Sum(new Cast($this->balanceWithoutTaxesField, 'float')), 'balance_without_taxes')
The type could be an Enum but it would lock the package to 8.1
Thanks and keep up the good work
Beta Was this translation helpful? Give feedback.
All reactions