Jedlik is a fluent syntax generator for Amazon's DynamoDB.
Ányos Jedlik was a Hungarian inventor and engineer. His best known invention is the principle of dynamo self-excitation
Jedlik uses a fluent interface to produce DynamobDB query syntax:
var Jedlik = require('jedlik'), jedlik = new Jedlik();
var query = jedlik
.tablename('table_name')
.hashkey('hash', 'hashvalue')
.rangekey('range', 'rangevalue', 'BEGINS_WITH')
.get(['attributes', 'attribute'])
.query;
The name of the table containing the requested items.
Accepts a key, a value and an optional ComparisonOperator
which defaults to EQ
Same as hashkey.
Add rangekey BETWEEN condition
.rangekeyBetween([keyName], [fromValue], [toValue])
Use only with query
Accepts an array of attributes to get.
Returns the constructed JSON query.
Returns the constructed JSON putItem.
Add Expected condition for UpdateItem(.update()
)
.expected([keyName], [expectedValue], [comparisonOperator])
Use only with update