1. Ludia
  2. Untitled project
  3. dynamodb-mapper
  4. Pull requests

Pull requests

#16 Merged at fd674ff

high level documentation for version 1.6.2.dev

  1. Jean-Tiare Le Bigot
No description

Comments (3)

  1. Max Noel
    • In the range_keys "bad example", the real problem is that using a set to group all of a user's orders breaks once the user item reaches the 64KB limit -- you can no longer add orders.
    • "lastUpdate": lambda: datetime.now() -- use "last_update" (consistency between key names), and the lambda can be simplified to simply datetime.now. However, datetime.now creates timezoneless datetime objects by default, so lambda: datetime.now(tz=utc_tz) is even better.
    • Please replace the French comments/notes with equivalent English ones.
    • When discussing strong VS eventual consistency: eventual consistency is the only available mode for scan, not query (query and get support strong consistency, scan and get_batch don't).
    • In the "get Chuck Norris" example, there are stray references to data.h_key (should be replaced with my_user.fullname).
    • In the "get last blog post" example, there's a bare except: block. You should never use those (they will even catch SystemExit and KeyboardInterrupt). Explicitly expect StopIteration, or even better, run list() on the generator to get an actual list.
    • The BundleTransaction example defines BundleTransaction.init, which doesn't call Transaction.init (or better, super(BundleTransaction, self).init).

    More to follow, AFK daily scrum ;) . Great work so far, aside from that.

  2. Max Noel
    • In the create_table example/doc, it might be a good idea to mention that a table isn't usable as long as it's in the CREATING state, and that table creation can take more than a minute (it's a very surprisingly long time IMO -- compared to Mongo that does it so fast it can even do it on the fly).
    • The _save_autoincrement_hash_key method should probably mention that the magic item is stored at MAGIC_KEY rather than at 0 (besides, it's -1 now, isn't it?).