[appengine-java] Re: Query BlobInfo in Java?

2010-09-07 Thread Peter Liu
Just enable billing and set a minimal amount per day. I think it's 1
or 2 dollar.
It won't charge you unless you run out of free quota, and if it
charges you the max you can be charged is capped.

On Sep 6, 5:39 pm, Gladys Anne Nicdao ganic...@gmail.com wrote:
 Hi! Are you using a billable account in appengine? I'm wondering if I can
 use the blobstore service even with a free account. If not, are there other
 alternatives for blobstore so that I can upload and retrieve a file? Thanks

 On Tue, Sep 7, 2010 at 2:57 AM, Peter Liu tinyee...@gmail.com wrote:
  Just what I needed. Thank you.

  On Sep 6, 1:38 am, Sergio Lopes slo...@gmail.com wrote:
   I'm using the Datastore API to query __BlobInfo__ entity directly.
   In my case, for example, I can have multiple versions of the same
   filename but I need to get the last one.
   So:

    Query query = new Query(__BlobInfo__);
    query.addFilter(filename, FilterOperator.EQUAL, filename);
    query.addSort(creation, SortDirection.DESCENDING);

    DatastoreService datastore =
   DatastoreServiceFactory.getDatastoreService();
    PreparedQuery pq = datastore.prepare(query);
    ListEntity entList = pq.asList(FetchOptions.Builder.withLimit(1));

   Hope that helps...

   On 6 set, 05:13, Peter Liu tinyee...@gmail.com wrote:

Hi all,

Anyone know a simple way to query BlobInfo?

Simple use case will be query the BlobInfo that has a specific file
name.

It seems there's a method to query BlobInfo for Python but I can't
find it for java.

Thanks!

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine for Java group.
  To post to this group, send email to
  google-appengine-j...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Query BlobInfo in Java?

2010-09-06 Thread Sergio Lopes
I'm using the Datastore API to query __BlobInfo__ entity directly.
In my case, for example, I can have multiple versions of the same
filename but I need to get the last one.
So:

 Query query = new Query(__BlobInfo__);
 query.addFilter(filename, FilterOperator.EQUAL, filename);
 query.addSort(creation, SortDirection.DESCENDING);

 DatastoreService datastore =
DatastoreServiceFactory.getDatastoreService();
 PreparedQuery pq = datastore.prepare(query);
 ListEntity entList = pq.asList(FetchOptions.Builder.withLimit(1));

Hope that helps...


On 6 set, 05:13, Peter Liu tinyee...@gmail.com wrote:
 Hi all,

 Anyone know a simple way to query BlobInfo?

 Simple use case will be query the BlobInfo that has a specific file
 name.

 It seems there's a method to query BlobInfo for Python but I can't
 find it for java.

 Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Query BlobInfo in Java?

2010-09-06 Thread Peter Liu
Just what I needed. Thank you.

On Sep 6, 1:38 am, Sergio Lopes slo...@gmail.com wrote:
 I'm using the Datastore API to query __BlobInfo__ entity directly.
 In my case, for example, I can have multiple versions of the same
 filename but I need to get the last one.
 So:

  Query query = new Query(__BlobInfo__);
  query.addFilter(filename, FilterOperator.EQUAL, filename);
  query.addSort(creation, SortDirection.DESCENDING);

  DatastoreService datastore =
 DatastoreServiceFactory.getDatastoreService();
  PreparedQuery pq = datastore.prepare(query);
  ListEntity entList = pq.asList(FetchOptions.Builder.withLimit(1));

 Hope that helps...

 On 6 set, 05:13, Peter Liu tinyee...@gmail.com wrote:

  Hi all,

  Anyone know a simple way to query BlobInfo?

  Simple use case will be query the BlobInfo that has a specific file
  name.

  It seems there's a method to query BlobInfo for Python but I can't
  find it for java.

  Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Query BlobInfo in Java?

2010-09-06 Thread Gladys Anne Nicdao
Hi! Are you using a billable account in appengine? I'm wondering if I can
use the blobstore service even with a free account. If not, are there other
alternatives for blobstore so that I can upload and retrieve a file? Thanks

On Tue, Sep 7, 2010 at 2:57 AM, Peter Liu tinyee...@gmail.com wrote:

 Just what I needed. Thank you.

 On Sep 6, 1:38 am, Sergio Lopes slo...@gmail.com wrote:
  I'm using the Datastore API to query __BlobInfo__ entity directly.
  In my case, for example, I can have multiple versions of the same
  filename but I need to get the last one.
  So:
 
   Query query = new Query(__BlobInfo__);
   query.addFilter(filename, FilterOperator.EQUAL, filename);
   query.addSort(creation, SortDirection.DESCENDING);
 
   DatastoreService datastore =
  DatastoreServiceFactory.getDatastoreService();
   PreparedQuery pq = datastore.prepare(query);
   ListEntity entList = pq.asList(FetchOptions.Builder.withLimit(1));
 
  Hope that helps...
 
  On 6 set, 05:13, Peter Liu tinyee...@gmail.com wrote:
 
   Hi all,
 
   Anyone know a simple way to query BlobInfo?
 
   Simple use case will be query the BlobInfo that has a specific file
   name.
 
   It seems there's a method to query BlobInfo for Python but I can't
   find it for java.
 
   Thanks!

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.