any help on this please as it is blocking us to effectively log the queries
Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com On Fri, Jan 21, 2011 at 9:47 AM, Vik <[email protected]> wrote: > Well That's fine.... But I would be more interested in logging the exact > query fired by engine instead of separately printing individual stuff. > > The individual printing these elements this way is painful as well in the > development process. So, any better way to print the query exactly fired by > engine? > > > Thankx and Regards > > Vik > Founder > www.sakshum.com > www.sakshum.blogspot.com > > > On Fri, Jan 21, 2011 at 3:49 AM, A. Stevko <[email protected]> wrote: > >> re: how do i print the complete query executed in the logs when >> this approach is used? >> >> Simple. Print the query string and then print the parameters. >> >> >> On Thu, Jan 20, 2011 at 6:35 AM, Vik <[email protected]> wrote: >> >>> hie >>> >>> any updates on this please? >>> >>> Thankx and Regards >>> >>> Vik >>> Founder >>> www.sakshum.com >>> www.sakshum.blogspot.com >>> >>> >>> On Wed, Jan 5, 2011 at 9:58 AM, Vik <[email protected]> wrote: >>> >>>> Hie >>>> >>>> Thanks.. >>>> >>>> This worked for me. But how do i print the complete query executed in >>>> the logs when this approach is used? >>>> >>>> >>>> Thankx and Regards >>>> >>>> Vik >>>> Founder >>>> www.sakshum.com >>>> www.sakshum.blogspot.com >>>> >>>> >>>> On Thu, Dec 30, 2010 at 9:43 PM, Yegor <[email protected]> wrote: >>>> >>>>> > query.declareParameters("Long bind_pocId, Date bind_startDate, Date >>>>> > bind_endDate"); >>>>> >>>>> This is correct. However, I personally prefer the shorter form, where >>>>> instead of using filter "column == alias" along with >>>>> query.declareParameters("Type alias") you just use filter "column >>>>> == :alias" (note the colon before the alias name). Your query can be >>>>> rewritten as follows: >>>>> >>>>> Query query = pm.newQuery(PocVacationSchedule.class); >>>>> query.setFilter("pocId == :pi && startDate == :sd && endDate == :ed"); >>>>> List<PocVacationSchedule> rulesList = (List<PocVacationSchedule>) >>>>> query.execute(pocId, startFrom, endFrom); >>>>> >>>>> -- >>>>> 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]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/google-appengine-java?hl=en. >>> >> >> >> >> -- >> -- A. Stevko >> =========== >> "If everything seems under control, you're just not going fast enough." >> M. Andretti >> >> >> >> >> >> -- >> 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]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
