Questions tagged [dynogels]

15 questions
3
votes
2 answers

How to save Item in dynamodb with GSI condition?

I have a dynamodb table that has a Global secondary Index with a range key (email, hashedPassword ). i want to save an item if the email is not duplicated, i used attribute_not_exists but it doesn't work, i also used : ConditionExpression: "#email…
Smartoop
  • 715
  • 6
  • 13
1
vote
2 answers

DynamoDB: Query to find an item in an array of strings

It's possible that I'm not quite understanding how hash/primary keys work in DynamoDB, but I'm trying to create a model (using Serverless + Dynogels/NodeJS) for a messaging service. The model looks like this: const ConversationORM =…
JVG
  • 20,198
  • 47
  • 132
  • 210
1
vote
1 answer

AWS DAX with dynogels

I trying to use DAX with dynogels but it just stuck there until my lambda timeout when I do the scan(). Here how I initialize the DAX. import AmazonDaxClient from 'amazon-dax-client'; const dax = new AmazonDaxClient({endpoints: [env.Endpoint],…
Caal Saal VI
  • 192
  • 2
  • 12
1
vote
1 answer

Dynamodb: unable to access nested objects and array of objects

I am new to DynamoDb. I am trying to access an object inside the array: Created a new item in a table- survey.create({ survey_name: 'Cycle', description: 'Describe me', test:[{ title:'hello1' },{ …
1
vote
1 answer

dynogels update trashing other keypairs

Anyone with dynogels experience might be able to help me on this one. Simplified example of my dynamodb table with a nested structure { key: xxxxx, maintenance: { date1: xxxxxxxx, date2: xxxxxxxx } } If I update the table and send the…
1
vote
1 answer

Joi : validate object of variable number of keys

I am trying to write a validation method for the following object ( associative array ): { "10:00": { discount: 10, time: "10:00", }, "11:00": { discount: 11, time: "11:00", }, ... .... } Using Joi…
Shrouk Khan
  • 1,440
  • 6
  • 27
  • 53
1
vote
1 answer

Dynogels: Query using OR comparison

I am trying to optimise the following scans into a single scan (or query). The only way I see is to use to use a OR comparator using DynamoDB. I am using dynogels (fork of vogels) in my application but sadly I am not aware of any OR query…
btype
  • 1,593
  • 19
  • 32
1
vote
1 answer

Conditionally set a object property

Its possible to remove the .where clause if queryString is null? I have tried ternary operator in the middle of expression, but doesn't work. Also the equals expression dont allow: null, undefined or empty String. CashierHistory .scan() …
Marckaraujo
  • 7,422
  • 11
  • 59
  • 97
1
vote
1 answer

DynamoDB ConditionExpression to check list[0] when list may not exist

I'm trying to put a condition on the first item on a list, when the list may or may not exist. I am trying to check if the list exists first, but DynamoDB doesn't seem to short circuit the expression. I get this error…
0
votes
1 answer

Empty array is not saved to DynamoDB table using Dynogels + Joi

I'm trying to save an item to DynamoDB table using dynogels Orm with joi for types. One of the properties of the saved item is files which is an array. Initially, I would like this value to be an empty array. const projectSchema: SchemaType = { …
0
votes
1 answer

dynogels always tells me Invalid schema content even when using examples from it's github repo

I'm trying to use dynogels as an ORM for DynamoDB, but I can't get even the simplest example to work. No matter what I do typescript throws "Invalid schema content" error the moment I try and use it. Run Command ts-node main.ts main.ts import *…
sevensevens
  • 1,703
  • 16
  • 27
0
votes
2 answers

NoSQL Injection into DynanmoDB

Does anyone know if there are any known no SQL vulnerabilities with the 'Dynogels' library when interacting with a NO SQL database. Not using any advanced queries, only bog standard with the existing methods. query(), where(), equals() etc.
CodeMonkey
  • 25
  • 3
0
votes
0 answers

NoSQL injections with Dynogels

Does anyone know how effective the Dynogels component would be at helping to prevent a NO SQL injection attack going through to a Dynamo DB back-end?
CodeMonkey
  • 25
  • 3
0
votes
1 answer

Unable to query using only the rangeKey

I just started working on DynamoDB so please forgive me if the following seems like a dumb mistake. I have a model with a hashKey and a rangeKey. Let's name these as HASH and RANGE respectively. A global secondary index: GlobalIndex is added to the…
-1
votes
1 answer

Node code not blocking?

I have a constructor which fetches data from a DynamoDB using promisified dynogels to populate part of the object's properties. So after instantiating an instance of that object, the property is not populated, here is an extract of the code: export…
Carlos Delgado
  • 552
  • 7
  • 23