Skip to content
This repository was archived by the owner on Jun 19, 2023. It is now read-only.

Can I ask for a better example in the expressions package? #90

Open
@LucasBadico

Description

@LucasBadico

I really have been strugly to undestand how to use it. For example, I need to make my dynamodb just make a update(acting as a create) if there is no username. I know that to doing that I have to do this:

dynamodb.putItem({
			TableName: config.DDB_TABLE,
			Item: {
				email: {
					S: email
				},
				passwordHash: {
					S: password
				},
				passwordSalt: {
					S: salt
				},
				verified: {
					BOOL: false
				},
				verifyToken: {
					S: token
				}
			},
			ConditionExpression: 'attribute_not_exists (email)'
		}, function(err, data) {
			if (err) return fn(err);
			else fn(null, token);
		});

How I make this a operation with the mapper and expressions lib?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions