No Ravi I did not find any solution yet.Neither for like nor for count.Its
such a basic thing it think there must be a way.I dont see any reply from
google people too.

On Fri, Jun 11, 2010 at 8:12 PM, Ravi <[email protected]> wrote:

> Have u solved the problem of like SQL? If yes then please share with
> me as i have not been able to solve it.
>
> On Jun 11, 2:53 pm, RAVINDER MAAN <[email protected]> wrote:
> > number of employee entities is going to be high .So i guess that
> possibility
> > of getting more then 1000 employees for any search is quite high.
> >
> > On Fri, Jun 11, 2010 at 6:56 PM, John Patterson <[email protected]
> >wrote:
> >
> >
> >
> >
> >
> > > A lot depends on how many Employee entities you have.
> >
> > > You could do a sub search for each of the 4 employee types and use
> COUNT to
> > > get the results.  This will only work up to 1000 employees per employee
> > > type.
> >
> > > Twig can execute queries in parallel so this would take no more time
> than
> > > running your original query.
> >
> > > On 11 Jun 2010, at 19:39, RAVINDER MAAN wrote:
> >
> > > Thanks for your reply Ravi
> > >    let me explain the entire scenario.I have an employee entity .User
> can
> > > search employees by giving part of name .There are four type of
> employees .I
> > > have to show number of employees matching user search criteria for
> every
> > > type of employee under different tabs.Actual results are to be
> displayed
> > > only if user open that tab.
> > > In SQL term we could write following query
> >
> > > Select count(*) from employee where name like '%<searchname>%' and type
> > > ='A' ;
> >
> > > My first problem is that i dint find any equivalent of like operator.Is
> > > there any way to do it?
> > > Secondly we can not keep record count for each search combination.what
> will
> > > you suggest for this case?
> > > Thanks once again.
> >
> > > On Fri, Jun 11, 2010 at 4:23 PM, Ravi <[email protected]> wrote:
> >
> > >> Google app engine designed to work for any numbers of records with in
> > >> minimum time, so SQL features like counting the records whenever
> > >> needed is not supported.
> > >> So you need to take care of such counter by urself at the time of
> > >> adding or deleting the records in a table/entity.
> >
> > >> If you just want total number of records and dont care if counting
> > >> happened in last 24 hours then look into low level api for datastore
> > >> statistics, GAE refreshes total count every 24 hours and you can read
> > >> the total count from there.
> >
> > >> And if you want count of records with some where clause, then you need
> > >> to maintain it.
> >
> > >> like if u want like this
> > >> select count(0) from tb where tb.propA='someValue'
> >
> > >> then you may need to create a new entity say counterForTb, and have
> > >> few fields entityName and count and where clause columns
> > >> and whenevr you add a new record in tb then increase the count of that
> > >> record in counter table and on delete decrease it.
> >
> > >> Something for google guys
> > >> Just realized that all columns are indexed unless we specify to not to
> > >> index, and there must be some index meta data/statistics saved
> > >> somewhere in google data stores about index(like total records
> > >> matching to this index). And if that stats can be accessible through
> > >> some APIs then we may be able to get total count just by reading data
> > >> from indexes stats.
> > >> Is this something feasible?
> >
> > >> On Jun 11, 11:39 am, RAVINDER MAAN <[email protected]> wrote:
> > >> > How can we get records count for a query in JDO.
> > >> > In sql we have select count(*) from <table_name>
> > >> > i want to get number of records returned by a query. what is the
> > >> > efficient way to do that.One option is to use size() function .I
> think
> > >> > it is not best way.
> >
> > >> --
> > >> 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
> > >> [email protected].
> > >> To unsubscribe from this group, send email to
> > >> [email protected]<google-appengine-java%[email protected]><google-appengine-java%2B
> [email protected]>
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/google-appengine-java?hl=en.
> >
> > > --
> > > Regards,
> > > Ravinder Singh Maan
> >
> > > --
> > > 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
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-appengine-java%[email protected]>
> .
> > > 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
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-appengine-java%[email protected]><google-appengine-java%2B
> [email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine-java?hl=en.
> >
> > --
> > Regards,
> > Ravinder Singh Maan
>
> --
> 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
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>


-- 
Regards,
Ravinder Singh Maan

-- 
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 [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-java?hl=en.

Reply via email to