kitar/laravel-dynamodb

Enum support on query builder

Opened this issue · 1 comments

Having a support enum as a value in the query builder would be nice, just like the model.

i.e.
Transaction::filter('status', '=', StatusEnum::SUCCESS)->scan();

Instead of doing this, stating the string:
Transaction::filter('status', '=', StatusEnum::SUCCESS->value)->scan();

kitar commented

Hi @reyadrian , thank you for your suggestion :)

It looks promising, but I think we might need to stop supporting older versions of Eloquent (< 8.x) to implement it smoothly. I'll give this some thought.