On 2/5/07, tamara6 <[EMAIL PROTECTED]> wrote:as a side point I just notice
please send email to either list and not both. I reply to this on the main
list although this should have been on the docs list.

> taking a quick look at the URL I don't see anything that is not answer
> inhttp://www.sqlobject.org/SQLObject.htmlhttp://www.sqlobject.org/SQLBuilder.htmlhttp://www.sqlobject.org/module-
> index.html
> >
> > although I have to admit that django's site has more words but not
> necessary
> > more content.
>
> So something that actually had me hung up for a long time was how to
> do something like this:
> "select * from Someplace where something like '%word%' "
>
> The Django docs show how to do this clearly with the keyword CONTAINS
> and shows the SQL equivalent.


that is a common misconception of ORM I have to agree that SO takes it a
little to far into the Object part but you need to stop thinking of queries
that is not how a ORM is supposed to work, you don't do select * or select
col1,col2,col3, you ask for the object Foo and it will return that object
you will ask for all objects of type foo that have lastname = var. that is
the reason why some "obscure" feature of SO are in the sqlbuilder stuff.
I'll make a note for the FAQ for this. way to many people want to use SO as
a query language when it's point is that it isn't in fact I believe this is
the main reason people like SA better and not more valid ones like less
queries and more flexibility on table creation.

The SO docs are not nearly as helpful.  Somewhere towards the bottom
> of the SQLBuilder page there is a mention of .startswith()
> and .endswith(), and even a LIKE function (with no example of how t
> use it).  But there is no mention of .contains(), which I tried just
> for kicks and it worked.


actually they are in the third link
http://www.sqlobject.org/class-sqlobject.sqlbuilder.Select.html
about the LIKE is a very new feature and it's not implemented on all
backends that's probably the reason it's not there.

Also, something that I think I've seen you mention on this list
> is .filter().


me? that was probably someone else, because I don't remember me saying it
although I could be wrong.

 That is no where in those 3 SQLObject pages that you
> give.
>
umm ok you got me there is no direct docs for filter.

Django's docs give the keyword, an example of usage, and the sql
> equivalent for all they keywords in their ORM.  It is easy to read and
> all in one place.


I'm suggesting that someone who knows SO do the
> same thing for Turbogears users.

One of the beauties of TG is that you don't need to know the whole to
understand the part, someone that only knows SO can contribute to improve
their documentation and we all be benefit from it, sadly SA is getting all
the hype lately and no TG "user" is interested on spending time there.

I'd do it myself, but I am
> (obviously) just learning and not really in any position to teach
> anyone anything (except maybe now about %like% searches)

that is not correct that is why we created
http://docs.turbogears.org/1.0/RoughDocs, you can even create a page with SO
tips.

> Tamara
>
>
>
> >
>

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

Reply via email to