dynamoid icon indicating copy to clipboard operation
dynamoid copied to clipboard

How to use condition expressions in a query?

Open nbulaj opened this issue 1 year ago • 6 comments

Hey. I have a question about using Condition expressions with Dynamoid. See https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ConditionExpressions.html

I have a users table with name: String and settings: Map attributes. Settings could contain a lot of different nested maps. I need to filter my query and find only users which has color setting in settings map, something like:

FilterExpression = 'attribute_exists(#0.#1)',
ExpressionAttributeNames = {
    "#0": "settings",
    "#1": "color"
},

Is it possible to add such condition to Dynamoid where query on using some plain AWS sdk call? Thanks :bow:

nbulaj avatar Dec 16 '22 10:12 nbulaj