Ian

http://examples.roughian.com


2008/11/6 Andy Freeman <[EMAIL PROTECTED]>

>
> On Nov 5, 8:47 am, "Ian Bambury" <[EMAIL PROTECTED]> wrote:
> > > > If the last rental was yesterday, how does that help me work out if
> it
> > > was
> > > > rented in 2007? Or October to October.
> >
> > > Keep two dates, or run the query two days ago.
> >
> > That doesn't make sense - two dates don't help,
>
> The problem seems to change every time I provide a solution.


No it doesn't. You 'error-correct' it to mean something else and answer
*that* question.

>
>
> Originally:
> >  If you
> > wanted to find out how many DVDs were never rented from a video rental
> > service over the last year, you'd have more than 1000 titles and even if
> you
> > didn't, you'd have to try to match them all up with all the rentals one
> at a
> > time.
>
> This problem can be addressed with a SINGLE last rental date/time.
> You can ask for all dvds whose last rental was more than a year ago.
> GAE supports inequality queries and order by on dates.  You get them
> in batches of 1000, but that's not hard to deal with.  (The query does
> have to account for where it is in the sequence, but the date is a
> convenient way to do that.)


I said 'over the last year'. Last year was 2007. I didn't say 'more than a
year ago'.

>
>
> Then you wrote:
> > > > If the last rental was yesterday, how does that help me work out if
> it
> > > was
> > > > rented in 2007? Or October to October.
>
> If the last rental was yesterday, the last rental wasn't in 2007.


Very true, but unrelated to the problem of trying to list videos that
weren't rented out in 2007. I didn't say 'last rental', you put that bit in
and changed the requirement.


>
> Rather than dismiss the question as nonsensical, I error-corrected it
> to "previous rental more than a year ago" or "gap between rentals is
> bigger than {interval}".  Both can be handled by tracking the two most
> recent rentals.


You didn't 'error-correct' it - you changed my question and gave an answer
to your own question. Not much use in *my* situation.


> > Whereas under some circumstances, GAE cannot run the query at all it
> seems
>
> We've yet to see that.
>

Return 1001 records?

Return a record where start-date > value and end-date < value?

The equivalent of an outer join?

There are plenty of things GAE can't do in a query.

DataStore is very good at what it does. It is also relatively limited in
what it can do without writing code to support it. You could use a text file
if you wrote the code to support it.


Ian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to