Comments (6)
this library is node-only, which means all we need to do is confirm to v8's handling, which iterates in insertion order EXCEPT when numbers are used as keys. that's really the only case where i could see this fail, and it is pretty rare. providing a dead-easy API with a fallback to the original raw API for when this isn't good enough is a pretty good compromise, i think, but am willing to entertain pull requests that add the ability to use arrays without affecting the current API.
from dynamo.
I asked about this on StackOverflow, and opinion seems to be against doing this for node libraries. I think the problem arises when (for performance reasons), V8 decides to change its implementation. Libraries which build against the current API will break.
Another problem is that relying on an undocumented behavior in an API specification may cause confusion for some programmers. Ordered keys in hashtables are an unusual behavior, and a reader of dynamo.js schemas who isn't familiar with these semantics may not get what is happening.
(What file is this code in, btw? Maybe I'll take a crack at it.)
from dynamo.
wow, some opinionated people in that thread.
i'd like to add support for more explicit key order, but there are several options:
- accepting an array
- accepting a hash with
hash
andrange
keys that haveObject
values - requiring a schema to be specified when a table is created
i think the first is the most straightforward.
there are two places that would need attention: Key.js and KeySchema.js. i'm in favor or allowing arrays using isArray
to check. would you like to take a crack at it?
from dynamo.
Excellent. I will try to take a look, but can't promise anything quickly. (Or if someone can get to it before me, please do)
from dynamo.
Hi everyone,
I took a crack at this: See #35
Comments welcome.
Thanks,
Mark
from dynamo.
from dynamo.
Related Issues (20)
- createClient() with optional sessionToken HOT 3
- writing multibyte characters creates invalidserviceexceptions HOT 4
- Feature request: Deleting items HOT 3
- require table schema HOT 3
- clarify retry strategy HOT 8
- keep track of capacity units
- support BatchWriteItems in the high-level API HOT 1
- add support for other zones HOT 2
- Predicates + Update.when() HOT 3
- please tag versions on github HOT 3
- Update with an attribute set to zero does not work HOT 2
- item.save(callback) not implemented HOT 1
- How can I use pagination?
- High level Api no longer usable? HOT 5
- item.destroy doesn't actually do anything HOT 2
- AWS SDK - Doesn't seem as good as your library HOT 1
- error while retrieving and adding data HOT 2
- error getting started
- publish latest to npm HOT 2
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 dynamo.