Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Return distinct keys from MongoDB using asyncmongo

Date: Mon, 24 Sep 2012 21:10:23 -0700 (PDT)
From: L-R <laur...@human.co>
To: python-tornado@googlegroups.com
Message-Id: <fc7f906c-c335-46ce-85d8-7c8f6642a462@googlegroups.com>
In-Reply-To: <df8b1a92-758d-4be0-9991-9fb2f14ee7be@k6g2000vbr.googlegroups.com>
References: <b612634f-f5ce-41a5-ab8a-fd34e29af583@googlegroups.com>
 <df8b1a92-758d-4be0-9991-9fb2f14ee7be@k6g2000vbr.googlegroups.com>
Subject: Re: Return distinct keys from MongoDB using asyncmongo
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1561_18548738.1348546223957"

------=_Part_1561_18548738.1348546223957
Content-Type: multipart/alternative; 
	boundary="----=_Part_1562_27972996.1348546223958"

------=_Part_1562_27972996.1348546223958
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

I've heard of motor, yeah. But installing a new driver just to grab 
distinct values? I'd be essentially replacing my async driver with another 
async driver.


On Monday, September 24, 2012 5:29:09 PM UTC-4, aliane abdelouahab wrote:
>
> have you tried it using this: 
>
> http://emptysquare.net/blog/introducing-motor-an-asynchronous-mongodb-driver-for-python-and-tornado/ 
>
> On 24 sep, 22:14, L-R <laur...@human.co> wrote: 
> > I'm using asyncmongo with Tornado + gen.engine, and just wondering what 
> the 
> > syntax is for the equivalent of db.collection.distinct("mykey")? 
> > 
> > I assume it's something like 
> > 
> > result, error = yield gen.Task(settings.DB.my_data.find, {}, 
> > distinct=[("key","mykey")]) 
> > 
> > But that won't work. Anyone know how to do this? 
> > 
> > Thanks. 
>

------=_Part_1562_27972996.1348546223958
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

I've heard of motor, yeah. But installing a new driver just to grab distinct values? I'd be essentially replacing my async driver with another async driver.<div><br><div><br>On Monday, September 24, 2012 5:29:09 PM UTC-4, aliane abdelouahab wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">have you tried it using this:
<br><a href="http://emptysquare.net/blog/introducing-motor-an-asynchronous-mongodb-driver-for-python-and-tornado/" target="_blank">http://emptysquare.net/blog/<wbr>introducing-motor-an-<wbr>asynchronous-mongodb-driver-<wbr>for-python-and-tornado/</a>
<br>
<br>On 24 sep, 22:14, L-R &lt;<a>laur...@human.co</a>&gt; wrote:
<br>&gt; I'm using asyncmongo with Tornado + gen.engine, and just wondering what the
<br>&gt; syntax is for the equivalent of db.collection.distinct("mykey"<wbr>)?
<br>&gt;
<br>&gt; I assume it's something like
<br>&gt;
<br>&gt; result, error = yield gen.Task(settings.DB.my_data.<wbr>find, {},
<br>&gt; distinct=[("key","mykey")])
<br>&gt;
<br>&gt; But that won't work. Anyone know how to do this?
<br>&gt;
<br>&gt; Thanks.
<br></blockquote></div></div>
------=_Part_1562_27972996.1348546223958--

------=_Part_1561_18548738.1348546223957--