Should be "SQLXorable is something that can be ORed" Yes the choice of name for this class was unfortunate. This class is not really exposed to the user. I am trying remove references to it from the book. This class is going away in the new DAL.
Masssimo On Jul 12, 12:17 am, rb <[email protected]> wrote: > Hi, regarding the usage of "XORable" on page 145: > > ---begin include--- > PAGE 145 > SQLXorable is something that can be XORed, for example in orderby > and groupby expressions. The Field class is derived from SQLXorable. > Here is an example. > > 1. myorder=db.mytable.myfield.upper() | db.mytable.id > 2. db().select(db.table.ALL,orderby=myorder) > > ---end include--- > > An XOR is an "eXclusive" OR which tests if the inputs are the same or > different, resulting in a True if and only if one but not both inputs > are True, and False otherwise. > (reference:http://en.wikipedia.org/wiki/Truth_table) > > A B XOR > ========= > F F F > F T T > T F T > T T F > > From the code example that follows on pg145 it seems to me that you > are referring to the OR function (by using the bitwise OR operator > '|') which can be used to set flags in a bitfield (or is this operator > overloaded?) I am unfamiliar with the use of "XOR" in this context. Is > this an error? As I read this section while thinking of the XOR > function, it makes no sense to me. I take it that the meaning is that > one, two or more fields can be flagged as included. > > Does this bitwise or'ing mean that the first field is the dominant and > the second field is the minor field in the sorting order? Is it the > default ordering of value content (string order, numeric order) of the > fields that are included in the or'ing? So if I wanted to sort first > by "id" in the example above, I would list it first in the or'ing ? > > --- > Rb > > On Jul 11, 7:57 am, Massimo Di Pierro <[email protected]> wrote: > > > Chapters 7 and 8 have been revised including corrections from Mr > > Admin, Fran and Jonathan. > > > web2py_manual_678.pdf > > 1982KViewDownload --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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 -~----------~----~----~----~------~----~------~--~---

