Comments (4)
Hi Maria,
It's in my todo list, It should not be difficult to add
just like you said by not passing the callback.
The main concern is that it may create braking changes.
Even myself I've used this library without passing a callback
knowing that it wont throw an error if it fails
(for example when incrementing stats).
Now, in a promise world, I should add the .catch()
wherever I've not passed a callback.
I'm also considering
DynamoDB
.table(...)
.insert(...)
.on('err',...)
.on('data',...)
.on('duplicate',...)
or
DynamoDB
.table(...)
.scan(...)
.each( callback )
but Promise seems more widely adopted
I guess Promise may be coming soon :)
from dynamodb-oop.
Sounds good. I was thinking through how I would do this and thought that the internal callbacks, if broken down into 'onError', 'transformData', etc., could be applied to either the promise then()
or the callback. As is with multiple functionality (including the calling the caller's callback) wrapped up in the internal callbacks it's just not possible.
Ever since moving to async
/await
world I always try and develop with promises now since it's so much less error prone.
from dynamodb-oop.
I've added Promise for .get() .query() and .scan() using the "promise" npm
DynamoDB
.table(...)
.where(...).eq(...)
.query()
.then(success_cb, fail_cb)
.catch(fail_cb)
If you;re still using the library please let let me know if you see any issues
using it.
It is a test release , my tests shows that it does not break existing functionality,
it is not documented yet, the rest of the functionality should get Promise() soon
from dynamodb-oop.
Im closing this as the last release includes unpromised Promises :-)
from dynamodb-oop.
Related Issues (20)
- Expression error when using a having('key').between(1, 10) HOT 10
- update or insert is modifying my data object HOT 4
- Raising an issue to tell ... HOT 1
- Support for updating nested json in dynamoDB HOT 1
- Boolean "false", becomes "undefined" HOT 6
- Docs scroll to top HOT 2
- Cannot use region provided in config.json HOT 2
- Executing an average operation on the DB HOT 1
- "OR" support in scan HOT 3
- Looping Scan with async/await question. HOT 3
- Issues due to shrinkwrap.json HOT 3
- Recursive scan example HOT 6
- Update table HOT 2
- Support to pass array of attribute names for "select" operand HOT 2
- Support Dynamo Transactions HOT 6
- BatchInsert not working HOT 2
- transact.insert is undefined on Lambda Layer HOT 2
- Support AWS SDK v3 HOT 2
- Disable Table Schema Table Warning HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamodb-oop.