nimongo icon indicating copy to clipboard operation
nimongo copied to clipboard

Synchronous API should be deprecated/removed.

Open yglukhov opened this issue 7 years ago • 2 comments

It is distracting, useless, untested, and can lure some users into using it, and migrating from sync to async takes some time, so why not start with async in the first place. Oh, also it is a maintenance burden :)

yglukhov avatar Nov 16 '18 09:11 yglukhov

just saw your post after submitting https://github.com/SSPkrolik/nimongo/issues/63 ; for the maintenance (+ testing) burden, https://github.com/SSPkrolik/nimongo/issues/63 could help

timotheecour avatar Nov 16 '18 22:11 timotheecour

@yglukhov how would I translate this to async?

  for ai in mc.find(query).limit(2).items():
    echo ai

EDIT: see https://github.com/SSPkrolik/nimongo/pull/57/commits/3ada6cdaf9719cdf5d9f14a428c5e0fc1170acd0 for my approach to this

timotheecour avatar Nov 16 '18 22:11 timotheecour