Comments (6)
It seems QueryFilter
/ScanFilter
don't support conditions on collections like List and Map:
This parameter does not support attributes of type List or Map.
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html#DDB-Scan-request-ScanFilter
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.QueryFilter.html
But recently where
was switched from them to the Expressions style, that does support such conditions.
So right now 'settings.color.not_null' => true
should not work but it seems easy to support it. Will try to add it soon and release in the next release.
from dynamoid.
The work is in progress (#696) - I will come back to it soon.
from dynamoid.
I will check if it's possible to do it with QueryFilter/ScanFilter request parameters (that are deprecated now).
from dynamoid.
Sorry for bothering @andrykonchin , but maybe any update on this? Found filter_expression_convertor
(
from dynamoid.
Hi @andrykonchin . I see new version is here, I checked https://github.com/Dynamoid/dynamoid/pull/655/files but not sure how correctly to pass params to the .where
method to filter by the Map fields which has some key 😞 Can you please help with that? Maybe we also need some READE section with how-to section on how to use new expressions
I still see:
field :metadata, :map
# ...
Model.where("metadata.scores.not_null": true ).count
Traceback (most recent call last):
1: from (irb):9
Dynamoid::Errors::Error (Unsupported operator screen_scores in metadata.scores.not_null)
from dynamoid.
OK I see Dynamoid::Criteria::Chain
doesn't allow it via def field_condition
which does the following:
name, operator = key.to_s.split('.')
So for where("settings.color.not_null": true)
it returns => ["metadata", "screen_scores", "not_null"]
from dynamoid.
Related Issues (20)
- Single Table Design: Support Patterns HOT 14
- ArgumentError when proxying association method_missing under Ruby 3 due to improper kwarg handling
- delete_all method returns Empty attribute name error HOT 1
- Dym
- Support segment/total_segments for scans HOT 1
- `key:` with number type -> type mismatch HOT 7
- Any chance to cut a more recent release? HOT 4
- Calling first modifies the original variable HOT 4
- Coveralls is dead and is holding back simplecov version
- Bad Badge Anchor HOT 1
- how to set a GSI for condition ? HOT 1
- Update GSI the existing table HOT 3
- filter expression with or? HOT 2
- Conditional updates are incorrect in README HOT 2
- undefined method `symbolize_keys' when saving dynamo model HOT 2
- Field adapters no longer work (v3.9.0) HOT 6
- Updating an attribute that is a key of a GSI to `nil` (3.9.0) HOT 3
- Conditional update array element HOT 1
- Batching with more than 1000 doesn't have any effect? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamoid.