First, let me say that i'm 10 days into Python and Web2Py.  I
apologize if this is so rudimentary as to appear stupid.

So there is no DAL class.  DAL is a function, exported from the
gluon.sql module, that returns a SQLDB object if not using GAE, so:

  db = DAL('foo')

makes db an instance of SQLDB.

Now, lets say you do a db().select().  There is no select() method in
the SQLDB class.  After going crazy for a couple hours, i learned what
__call__ was, and realized that this allows you to use the select()
method of the Set class from an instance of SQLDB.

The select() method of the Set class always returns an instance of the
Rows class, which operates like a list, so you always have to access
the return value of the .select() method with iteration or indexes,
even if return value is guaranteed to return one or no values (a
lookup on an id, lets say).

My question:  What information do you have to send as parameters of
the db() call, what information do you send as parameters of
the .select() method, and why?

Thank you very much, and please correct me if i'm wrong about
something, which is very likely.

Jake

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" 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/web2py?hl=en.


Reply via email to