You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by Patrick Osborne <pa...@bea.com> on 2005/10/05 16:31:31 UTC

Is there JDBC control support for SQL IN?

Hi All,

I've been using Beehive pageflows and controls for a couple of 
applications and I find it a highly effective and productive tool to 
build webapps and to manipulate database data.

Recently I've been looking at invoking some SQL code via a JDBC control 
using the SQL IN command, similar to this:

SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..)

I've looked at the documentation, but I've been unable to find support 
for producing a list of values like (value1,value2,..) via databinding 
to a list or array.  Is this use case supported?  If not, any plans to 
add support for this sort of thing?

Thanks,
Patrick.
________________________________________________________________________________
BEAWorld 2005: coming to a city near you.  Everything you need for SOA and enterprise infrastructure success.

 
Register now at http://www.bea.com/4beaworld

 
London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct| Beijing 7-8 Dec

Re: Is there JDBC control support for SQL IN?

Posted by Eddie O'Neil <ek...@gmail.com>.
  Not following -- what do you mean?  What sort of insert behavior are
you looking for?

  And, as an aside, in the future, these questions are best addressed
on user@beehive.

  :)

Eddie


On 10/5/05, Patrick Osborne <pa...@bea.com> wrote:
>
> It could also be useful for insert statements.
>
> -- Patrick.
>
> Eddie O'Neil wrote:
>
> >Chad--
> >
> >  Couldn't you do that by building up the String outside of the DB
> >control, passing it in as a parameter, and doing the substitution with
> >something like:
> >
> >@SQL(SELECT column_name FROM table_name WHERE column_name IN ({sql:inClause})
> >public Customer[] getCustomersIn(String inClause);
> >
> >it's not an ideal solution, but it'd work at least.  We could concieve
> >of a filter object that could be used to build up complex where /
> >order by clauses with a simple JavaBean API.  Just a thought...
> >
> >Eddie
> >
> >
> >
> >On 10/5/05, Chad Schoettger <ch...@gmail.com> wrote:
> >
> >
> >>Hi Patrick,
> >>
> >>This use case is currently not supported. I think it could be supported, I
> >>would just need to spend a bit of time coming up with the proper design for
> >>it. If you would like, go ahead an file an enhancement request on JIRA for
> >>this use case.
> >>
> >>- Chad
> >>
> >>On 10/5/05, Patrick Osborne <pa...@bea.com> wrote:
> >>
> >>
> >>>Hi All,
> >>>
> >>>I've been using Beehive pageflows and controls for a couple of
> >>>applications and I find it a highly effective and productive tool to
> >>>build webapps and to manipulate database data.
> >>>
> >>>Recently I've been looking at invoking some SQL code via a JDBC control
> >>>using the SQL IN command, similar to this:
> >>>
> >>>SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..)
> >>>
> >>>I've looked at the documentation, but I've been unable to find support
> >>>for producing a list of values like (value1,value2,..) via databinding
> >>>to a list or array. Is this use case supported? If not, any plans to
> >>>add support for this sort of thing?
> >>>
> >>>Thanks,
> >>>Patrick.
> >>>
> >>>________________________________________________________________________________
> >>>BEAWorld 2005: coming to a city near you. Everything you need for SOA and
> >>>enterprise infrastructure success.
> >>>
> >>>
> >>>Register now at http://www.bea.com/4beaworld
> >>>
> >>>
> >>>London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct|
> >>>Beijing 7-8 Dec
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> >
> ________________________________________________________________________________
> BEAWorld 2005: coming to a city near you.  Everything you need for SOA and enterprise infrastructure success.
>
>
> Register now at http://www.bea.com/4beaworld
>
>
> London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct| Beijing 7-8 Dec
>

Re: Is there JDBC control support for SQL IN?

Posted by Patrick Osborne <pa...@bea.com>.
It could also be useful for insert statements.

-- Patrick.

Eddie O'Neil wrote:

>Chad--
>
>  Couldn't you do that by building up the String outside of the DB
>control, passing it in as a parameter, and doing the substitution with
>something like:
>
>@SQL(SELECT column_name FROM table_name WHERE column_name IN ({sql:inClause})
>public Customer[] getCustomersIn(String inClause);
>
>it's not an ideal solution, but it'd work at least.  We could concieve
>of a filter object that could be used to build up complex where /
>order by clauses with a simple JavaBean API.  Just a thought...
>
>Eddie
>
>
>
>On 10/5/05, Chad Schoettger <ch...@gmail.com> wrote:
>  
>
>>Hi Patrick,
>>
>>This use case is currently not supported. I think it could be supported, I
>>would just need to spend a bit of time coming up with the proper design for
>>it. If you would like, go ahead an file an enhancement request on JIRA for
>>this use case.
>>
>>- Chad
>>
>>On 10/5/05, Patrick Osborne <pa...@bea.com> wrote:
>>    
>>
>>>Hi All,
>>>
>>>I've been using Beehive pageflows and controls for a couple of
>>>applications and I find it a highly effective and productive tool to
>>>build webapps and to manipulate database data.
>>>
>>>Recently I've been looking at invoking some SQL code via a JDBC control
>>>using the SQL IN command, similar to this:
>>>
>>>SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..)
>>>
>>>I've looked at the documentation, but I've been unable to find support
>>>for producing a list of values like (value1,value2,..) via databinding
>>>to a list or array. Is this use case supported? If not, any plans to
>>>add support for this sort of thing?
>>>
>>>Thanks,
>>>Patrick.
>>>
>>>________________________________________________________________________________
>>>BEAWorld 2005: coming to a city near you. Everything you need for SOA and
>>>enterprise infrastructure success.
>>>
>>>
>>>Register now at http://www.bea.com/4beaworld
>>>
>>>
>>>London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct|
>>>Beijing 7-8 Dec
>>>
>>>      
>>>
>>    
>>
>
>  
>
________________________________________________________________________________
BEAWorld 2005: coming to a city near you.  Everything you need for SOA and enterprise infrastructure success.

 
Register now at http://www.bea.com/4beaworld

 
London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct| Beijing 7-8 Dec

Re: Is there JDBC control support for SQL IN?

Posted by Patrick Osborne <pa...@bea.com>.
That is exactly what I did in my app.  I think it would be a nice future 
feature for the JDBC control though.

-- Patrick.

Eddie O'Neil wrote:

>Chad--
>
>  Couldn't you do that by building up the String outside of the DB
>control, passing it in as a parameter, and doing the substitution with
>something like:
>
>@SQL(SELECT column_name FROM table_name WHERE column_name IN ({sql:inClause})
>public Customer[] getCustomersIn(String inClause);
>
>it's not an ideal solution, but it'd work at least.  We could concieve
>of a filter object that could be used to build up complex where /
>order by clauses with a simple JavaBean API.  Just a thought...
>
>Eddie
>
>
>
>On 10/5/05, Chad Schoettger <ch...@gmail.com> wrote:
>  
>
>>Hi Patrick,
>>
>>This use case is currently not supported. I think it could be supported, I
>>would just need to spend a bit of time coming up with the proper design for
>>it. If you would like, go ahead an file an enhancement request on JIRA for
>>this use case.
>>
>>- Chad
>>
>>On 10/5/05, Patrick Osborne <pa...@bea.com> wrote:
>>    
>>
>>>Hi All,
>>>
>>>I've been using Beehive pageflows and controls for a couple of
>>>applications and I find it a highly effective and productive tool to
>>>build webapps and to manipulate database data.
>>>
>>>Recently I've been looking at invoking some SQL code via a JDBC control
>>>using the SQL IN command, similar to this:
>>>
>>>SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..)
>>>
>>>I've looked at the documentation, but I've been unable to find support
>>>for producing a list of values like (value1,value2,..) via databinding
>>>to a list or array. Is this use case supported? If not, any plans to
>>>add support for this sort of thing?
>>>
>>>Thanks,
>>>Patrick.
>>>
>>>________________________________________________________________________________
>>>BEAWorld 2005: coming to a city near you. Everything you need for SOA and
>>>enterprise infrastructure success.
>>>
>>>
>>>Register now at http://www.bea.com/4beaworld
>>>
>>>
>>>London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct|
>>>Beijing 7-8 Dec
>>>
>>>      
>>>
>>    
>>
>
>  
>
________________________________________________________________________________
BEAWorld 2005: coming to a city near you.  Everything you need for SOA and enterprise infrastructure success.

 
Register now at http://www.bea.com/4beaworld

 
London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct| Beijing 7-8 Dec

Re: Is there JDBC control support for SQL IN?

Posted by Eddie O'Neil <ek...@gmail.com>.
Steve--

  It is actually somewhat doc'ed here:

    http://beehive.apache.org/docs/1.0/system-controls/jdbc/jdbcControlDevGuide.html

under Generic Substitution.  This is an example of the same.

  Fwiw...

Eddie



On 10/6/05, Steve Hanson <st...@gmail.com> wrote:
> Hey all:
>
>  Just a heads up.
>  I am going to doc this suggestion, unless anyone stops me.
>
>  -steveh.
>
>
>
> On 10/5/05, Eddie O'Neil <ek...@gmail.com> wrote:
> > Chad--
> >
> >   Couldn't you do that by building up the String outside of the DB
> > control, passing it in as a parameter, and doing the substitution with
> > something like:
> >
> > @SQL(SELECT column_name FROM table_name WHERE column_name IN
> ({sql:inClause})
> > public Customer[] getCustomersIn(String inClause);
> >
> > it's not an ideal solution, but it'd work at least.  We could concieve
> > of a filter object that could be used to build up complex where /
> > order by clauses with a simple JavaBean API.  Just a thought...
> >
> > Eddie
> >
> >
> >
> > On 10/5/05, Chad Schoettger <ch...@gmail.com> wrote:
> > > Hi Patrick,
> > >
> > > This use case is currently not supported. I think it could be supported,
> I
> > > would just need to spend a bit of time coming up with the proper design
> for
> > > it. If you would like, go ahead an file an enhancement request on JIRA
> for
> > > this use case.
> > >
> > > - Chad
> > >
> > > On 10/5/05, Patrick Osborne <pa...@bea.com> wrote:
> > > >
> > > >
> > > > Hi All,
> > > >
> > > > I've been using Beehive pageflows and controls for a couple of
> > > > applications and I find it a highly effective and productive tool to
> > > > build webapps and to manipulate database data.
> > > >
> > > > Recently I've been looking at invoking some SQL code via a JDBC
> control
> > > > using the SQL IN command, similar to this:
> > > >
> > > > SELECT column_name FROM table_name WHERE column_name IN
> (value1,value2,..)
> > > >
> > > > I've looked at the documentation, but I've been unable to find support
> > > > for producing a list of values like (value1,value2,..) via databinding
> > > > to a list or array. Is this use case supported? If not, any plans to
> > > > add support for this sort of thing?
> > > >
> > > > Thanks,
> > > > Patrick.
> > > >
> > > >
> ________________________________________________________________________________
> > > > BEAWorld 2005: coming to a city near you. Everything you need for SOA
> and
> > > > enterprise infrastructure success.
> > > >
> > > >
> > > > Register now at http://www.bea.com/4beaworld
> > > >
> > > >
> > > > London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct|
> > > > Beijing 7-8 Dec
> > > >
> > >
> > >
> >
>
>

Re: Is there JDBC control support for SQL IN?

Posted by Steve Hanson <st...@gmail.com>.
Hey all:

Just a heads up.
I am going to doc this suggestion, unless anyone stops me.

-steveh.


On 10/5/05, Eddie O'Neil <ek...@gmail.com> wrote:
>
> Chad--
>
> Couldn't you do that by building up the String outside of the DB
> control, passing it in as a parameter, and doing the substitution with
> something like:
>
> @SQL(SELECT column_name FROM table_name WHERE column_name IN
> ({sql:inClause})
> public Customer[] getCustomersIn(String inClause);
>
> it's not an ideal solution, but it'd work at least. We could concieve
> of a filter object that could be used to build up complex where /
> order by clauses with a simple JavaBean API. Just a thought...
>
> Eddie
>
>
>
> On 10/5/05, Chad Schoettger <ch...@gmail.com> wrote:
> > Hi Patrick,
> >
> > This use case is currently not supported. I think it could be supported,
> I
> > would just need to spend a bit of time coming up with the proper design
> for
> > it. If you would like, go ahead an file an enhancement request on JIRA
> for
> > this use case.
> >
> > - Chad
> >
> > On 10/5/05, Patrick Osborne <pa...@bea.com> wrote:
> > >
> > >
> > > Hi All,
> > >
> > > I've been using Beehive pageflows and controls for a couple of
> > > applications and I find it a highly effective and productive tool to
> > > build webapps and to manipulate database data.
> > >
> > > Recently I've been looking at invoking some SQL code via a JDBC
> control
> > > using the SQL IN command, similar to this:
> > >
> > > SELECT column_name FROM table_name WHERE column_name IN
> (value1,value2,..)
> > >
> > > I've looked at the documentation, but I've been unable to find support
> > > for producing a list of values like (value1,value2,..) via databinding
> > > to a list or array. Is this use case supported? If not, any plans to
> > > add support for this sort of thing?
> > >
> > > Thanks,
> > > Patrick.
> > >
> > >
> ________________________________________________________________________________
> > > BEAWorld 2005: coming to a city near you. Everything you need for SOA
> and
> > > enterprise infrastructure success.
> > >
> > >
> > > Register now at http://www.bea.com/4beaworld
> > >
> > >
> > > London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct|
> > > Beijing 7-8 Dec
> > >
> >
> >
>

Re: Is there JDBC control support for SQL IN?

Posted by Eddie O'Neil <ek...@gmail.com>.
Chad--

  Couldn't you do that by building up the String outside of the DB
control, passing it in as a parameter, and doing the substitution with
something like:

@SQL(SELECT column_name FROM table_name WHERE column_name IN ({sql:inClause})
public Customer[] getCustomersIn(String inClause);

it's not an ideal solution, but it'd work at least.  We could concieve
of a filter object that could be used to build up complex where /
order by clauses with a simple JavaBean API.  Just a thought...

Eddie



On 10/5/05, Chad Schoettger <ch...@gmail.com> wrote:
> Hi Patrick,
>
> This use case is currently not supported. I think it could be supported, I
> would just need to spend a bit of time coming up with the proper design for
> it. If you would like, go ahead an file an enhancement request on JIRA for
> this use case.
>
> - Chad
>
> On 10/5/05, Patrick Osborne <pa...@bea.com> wrote:
> >
> >
> > Hi All,
> >
> > I've been using Beehive pageflows and controls for a couple of
> > applications and I find it a highly effective and productive tool to
> > build webapps and to manipulate database data.
> >
> > Recently I've been looking at invoking some SQL code via a JDBC control
> > using the SQL IN command, similar to this:
> >
> > SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..)
> >
> > I've looked at the documentation, but I've been unable to find support
> > for producing a list of values like (value1,value2,..) via databinding
> > to a list or array. Is this use case supported? If not, any plans to
> > add support for this sort of thing?
> >
> > Thanks,
> > Patrick.
> >
> > ________________________________________________________________________________
> > BEAWorld 2005: coming to a city near you. Everything you need for SOA and
> > enterprise infrastructure success.
> >
> >
> > Register now at http://www.bea.com/4beaworld
> >
> >
> > London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct|
> > Beijing 7-8 Dec
> >
>
>

Re: Is there JDBC control support for SQL IN?

Posted by Chad Schoettger <ch...@gmail.com>.
Hi Patrick,

This use case is currently not supported. I think it could be supported, I
would just need to spend a bit of time coming up with the proper design for
it. If you would like, go ahead an file an enhancement request on JIRA for
this use case.

- Chad

On 10/5/05, Patrick Osborne <pa...@bea.com> wrote:
>
>
> Hi All,
>
> I've been using Beehive pageflows and controls for a couple of
> applications and I find it a highly effective and productive tool to
> build webapps and to manipulate database data.
>
> Recently I've been looking at invoking some SQL code via a JDBC control
> using the SQL IN command, similar to this:
>
> SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..)
>
> I've looked at the documentation, but I've been unable to find support
> for producing a list of values like (value1,value2,..) via databinding
> to a list or array. Is this use case supported? If not, any plans to
> add support for this sort of thing?
>
> Thanks,
> Patrick.
>
> ________________________________________________________________________________
> BEAWorld 2005: coming to a city near you. Everything you need for SOA and
> enterprise infrastructure success.
>
>
> Register now at http://www.bea.com/4beaworld
>
>
> London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct|
> Beijing 7-8 Dec
>