Open bjugan opened 6 months ago
Hi,
First, thanks for creating this great package :-)
Is there any way to filter on keys in the map attribute type?
Example: ->filter('person.name', 'John')
->filter('person.name', 'John')
I'm still new to DynamoDb and I'm sorry if I'm missing something obvious.
Actually, I did a temporary hack to solve it. Seems to work for my use case, but not very well tested.
// Builder.php public function where($column, $operator = null, $value = null, $boolean = 'and') { // Convert column and value to ExpressionAttributes. if (! $column instanceof Closure) { // The column has nested keys if (Str::contains($column, '.')) { $column = Str::of($column) ->explode('.') ->map(fn ($attribute) => $this->expression_attributes->addName($attribute)) ->implode('.'); } else { $column = $this->expression_attributes->addName($column); } if ($value !== null) { $value = $this->expression_attributes->addValue($value); } } ...
Hi,
First, thanks for creating this great package :-)
Is there any way to filter on keys in the map attribute type?
Example:
->filter('person.name', 'John')
I'm still new to DynamoDb and I'm sorry if I'm missing something obvious.
Actually, I did a temporary hack to solve it. Seems to work for my use case, but not very well tested.