Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-20 Thread Sathvik Ponangi
@howsec, Thank you! On Thu, Oct 20, 2011 at 3:50 AM, howesc wrote: > google has been changing how indexing works so you need custom indexes less > often. if you app does not need them, then no index.yaml file will be > created during local usage. this is OK as long as you have tested each > qu

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread howesc
google has been changing how indexing works so you need custom indexes less often. if you app does not need them, then no index.yaml file will be created during local usage. this is OK as long as you have tested each query you have built that will run on production. about the text property, f

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Anthony
Are you specifically running it using the GAE appserver -- see http://web2py.com/book/default/chapter/11#Running-and-Deployment? I think it's supposed to generate the index.yaml file automatically in that case. I don't use GAE, so maybe someone else on the list who does can chime in. On Wednes

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Sathvik Ponangi
Dear Anthony, I am testing it locally, just as the book says. Do I need to do something else? With Regards, Sathvik

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Anthony
On Wednesday, October 19, 2011 10:12:22 AM UTC-4, Sathvik Ponangi wrote: > > I don't have one. How do I generate it? Follow the instructions in the book. Looks like you have to run your app locally on your machine using the GAE appserver that comes with the SDK. I guess you should perform all t

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Sathvik Ponangi
I don't have one. How do I generate it? On Wed, Oct 19, 2011 at 7:39 PM, Anthony wrote: > On Wednesday, October 19, 2011 8:56:59 AM UTC-4, Sathvik Ponangi wrote: >> >> Dear Howsec, >> >> Bulls-Eye! Changing it from 'text' to 'string' fixed it!!! It works >> now. >> Thank you all a lot!!! >> >>

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Anthony
On Wednesday, October 19, 2011 8:56:59 AM UTC-4, Sathvik Ponangi wrote: > > Dear Howsec, > > Bulls-Eye! Changing it from 'text' to 'string' fixed it!!! It works now. > Thank you all a lot!!! > > P.S. Could someone tell me why text didn't work? > Did you create an index.yaml file, as described h

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Sathvik Ponangi
Dear Howsec, Bulls-Eye! Changing it from 'text' to 'string' fixed it!!! It works now. Thank you all a lot!!! P.S. Could someone tell me why text didn't work? With regards, Sathvik On Wed, Oct 19, 2011 at 9:14 AM, howesc wrote: > shot in the dark herechange the field type from 'text' to '

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread howesc
shot in the dark herechange the field type from 'text' to 'string'. on GAE 'text' fields do not support all the filtering operations i think. if that change makes it work (you probably will have to re-insert the data), then we should re-read the docs about text fields on GAE

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread pbreit
Does this work? db(db.files.hash=='changeThis.txt').select().first()

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Anthony
I'm puzzled. Maybe someone else has an idea. What happens if you run the same app on your local machine with SQLite? On Tuesday, October 18, 2011 1:17:54 PM UTC-4, Sathvik Ponangi wrote: > > Yes, I'm always calling it with: > > fetchText('changeThis.txt') > > > On Tue, Oct 18, 2011 at 10:40 PM, A

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Sathvik Ponangi
Yes, I'm always calling it with: fetchText('changeThis.txt') On Tue, Oct 18, 2011 at 10:40 PM, Anthony wrote: > How are you calling fetchText? Are you sure the value you are passing as > the 'name' argument is in fact the value of the 'hash' field of one of the > records? > > > On Tuesday, Oct

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Anthony
How are you calling fetchText? Are you sure the value you are passing as the 'name' argument is in fact the value of the 'hash' field of one of the records? On Tuesday, October 18, 2011 12:16:09 PM UTC-4, Sathvik Ponangi wrote: > > Dear Johann, > I'm using Web2py with Google AppEngine & I can s

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Johann Spies
On 18 October 2011 13:20, Sathvik Ponangi wrote: > db(db.files.hash==name).select().first() always gives None, what's the > right way to do it? > > Thanks for your help... > .first() will only work if len(db(db.files.hash==name).select()) > 0 If you get None it means that the query did not find

[web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Sathvik Ponangi
db(db.files.hash==name).select().first() always gives None, what's the right way to do it? Thanks for your help...