Re: SQLTemplate / inExp

From: Cris Daniluk (cris.danilu..mail.com)
Date: Mon Feb 06 2006 - 19:50:14 EST

  • Next message: Steve Wells: "Re: dataObject.writeProperty and validation of a new dataObject"

    More importantly, we use IN in all sorts of other places, namely
    inExp. That's a great point and a conversation worth having, but I
    don't think its relevant to this specific issue :)

    In general, it seems like most DBMS have no hard limit, but definitely
    a practical limit.

    On 2/6/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > I wouldn't be surprised. But then this is SQLTemplate we are talking
    > about, and Cayenne shouldn't try to second-guess the user. Any better
    > ideas?
    >
    > Andrus
    >
    >
    > On Feb 6, 2006, at 7:26 PM, Joshua Pyle wrote:
    >
    > > Some Databases have size limits for the IN statement
    > >
    > > --
    > > Joshua T. Pyle
    > > Go has always existed.
    > >
    > >
    > > On 2/6/06, Cris Daniluk <cris.danilu..mail.com> wrote:
    > >> I'm experimenting with a patch I created to do just that.
    > >> Hopefully it works :)
    > >>
    > >> On 2/6/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > >>> For now Velocity #foreach is your friend.
    > >>>
    > >>> Also I would happily commit a patch to the
    > >>> org.objectstyle.cayenne.access.jdbc.BindDirective that would
    > >>> internally expand a list of objects the the comma-separated
    > >>> syntax :-)
    > >>>
    > >>> So that you could write "WHERE field IN (#bind($list CHAR))"
    > >>>
    > >>> Andrus
    > >>>
    > >>>
    > >>> On Feb 6, 2006, at 3:43 PM, Cris Daniluk wrote:
    > >>>
    > >>>> Apologies if I've overlooked something simple, but for the life
    > >>>> of me
    > >>>> I can't figure out how to bind a list to a query using something
    > >>>> like
    > >>>> #bind().
    > >>>>
    > >>>> I'd basically like to do a simple IN query:
    > >>>>
    > >>>> SELECT * FROM table WHERE field IN ($list)
    > >>>>
    > >>>> It doesn't seem like SQLTemplateProcessor and BindDirective
    > >>>> support it
    > >>>> now, but it seems like it could by simply detecting Collection and
    > >>>> making a few simple changes to the query output.
    > >>>>
    > >>>> Is there another way?
    > >>>>
    > >>>> Cris
    > >>>>
    > >>>
    > >>>
    > >>
    > >
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Feb 06 2006 - 19:50:16 EST