question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dynoexpr doesn't support list_append

See original GitHub issue

Current behavior

Right now the output of the code below looks like this:

import dynoexpr from '@tuplo/dynoexpr';

const params = dynoexpr({
  Update: { numbersArray: 'list_append([1, 2])' },
});

/*
{
  params: {
    UpdateExpression: 'SET #n15df = :vc32f',
    ExpressionAttributeNames: { '#n15df': 'numbersArray' },
    ExpressionAttributeValues: { ':vc32f': 'list_append([1, 2])' }
  }
}
*/

Expected behavior

With the support of list_append the output should look like this:

/*
{
  params: {
    UpdateExpression: 'SET #n15df = list_append(#n15df, :vc32f)',
    ExpressionAttributeNames: { '#n15df': 'numbersArray' },
    ExpressionAttributeValues: { ':vc32f': '[1, 2]' }
  }
}
*/

Docs

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.SET.UpdatingListElements

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dawidk92commented, Jun 14, 2022

It works as expected right now. Thank you @ruicsh ❤️

0reactions
ruicshcommented, Jun 14, 2022

yea, fixed it on v2.14.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

UpdateExpression DynamoBD to Append Items to a List only if ...
Your code doesn't work, because if the attribute "locations" already exists, if_not_exists just takes to it, and the list_append will append ...
Read more >
tuplo/dynoexpr: Expression builder for AWS ... - GitHub
Converts a plain object to a DynamoDB expression with all variables and names replaced with safe placeholders. It supports Condition , KeyCondition ,...
Read more >
A Unified Approach to Solving Seven Programming Problems ...
Sadly, test-driven development in a typical programming environment doesn't help us: we can't run tests on an incomplete program. Challenge 5. How can...
Read more >
ddb-table - npm Package Health Analysis - Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice.
Read more >
@tuplo/dynoexpr - npm
Converts a plain object to a DynamoDB expression with all variables and names replaced with safe placeholders. It supports Condition , ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found