You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by Dave Birdsall <da...@esgyn.com> on 2018/01/24 04:48:44 UTC

Rowsets in Trafodion

Hi,

Is there a way to use rowsets in Trafci? (Regression test executor/TEST015 suggests that sqlci does not support rowsets.)

Or must one write JDBC code to use rowsets?

Are there examples of JDBC code that use rowsets for input? (I did find an output example, in trafodion/core/conn/jdbc_type2/samples/JdbcRowSetSample.java).

Thanks,

Dave

RE: Rowsets in Trafodion

Posted by Anoop Sharma <an...@esgyn.com>.
hi
  you can look at file executor/ExExeUtilCli.h/cpp.
It has code/examples on how to use columnwise or rowwise rowsets
from C code in case you want to test different interfaces.
Look for cwrs*  or rwrs* in that file.

java/jdbc app will be easier to use though from a user app interface.
But there may be restriction on what kind of rowsets are used
for inserts or selects.

  anoop

-----Original Message-----
From: Dave Birdsall [mailto:dave.birdsall@esgyn.com] 
Sent: Tuesday, January 23, 2018 8:49 PM
To: dev@trafodion.apache.org
Subject: Rowsets in Trafodion

Hi,

Is there a way to use rowsets in Trafci? (Regression test executor/TEST015 suggests that sqlci does not support rowsets.)

Or must one write JDBC code to use rowsets?

Are there examples of JDBC code that use rowsets for input? (I did find an output example, in trafodion/core/conn/jdbc_type2/samples/JdbcRowSetSample.java).

Thanks,

Dave

RE: Rowsets in Trafodion

Posted by Selva Govindarajan <se...@esgyn.com>.
Hi Dave,

There is sample program at $TRAF_HOME/../conn/jdbcT4/src/main/samples/BatchSample directory. This directory also has README file containing the instructions to compile and run the program.

Selva

-----Original Message-----
From: Suresh Subbiah [mailto:suresh.subbiah60@gmail.com] 
Sent: Wednesday, January 24, 2018 6:19 AM
To: dev@trafodion.apache.org
Subject: Re: Rowsets in Trafodion

Hi Dave,

SQL statements with rowsets can be prepared from trafci, but we  cannot execute them ssince we have not provided a way to sat array parameters from trafci/sqlci yet.
To prepare we can use this syntax
prepare s1 from insert into t1 values (?[10], ?[10]) ; Here 10 is the maximum size of input rowset.

We can test changes for rowset code using ODB. It uses rowsets to insert/upsert.

I don't have a rowset for input JDBC example. I will look some more.

Thank you
Suresh


On Tue, Jan 23, 2018 at 10:48 PM, Dave Birdsall <da...@esgyn.com>
wrote:

> Hi,
>
> Is there a way to use rowsets in Trafci? (Regression test 
> executor/TEST015 suggests that sqlci does not support rowsets.)
>
> Or must one write JDBC code to use rowsets?
>
> Are there examples of JDBC code that use rowsets for input? (I did 
> find an output example, in trafodion/core/conn/jdbc_type2/samples/
> JdbcRowSetSample.java).
>
> Thanks,
>
> Dave
>

Re: Rowsets in Trafodion

Posted by Suresh Subbiah <su...@gmail.com>.
Hi Dave,

SQL statements with rowsets can be prepared from trafci, but we  cannot
execute them ssince we have not provided a way to sat array parameters from
trafci/sqlci yet.
To prepare we can use this syntax
prepare s1 from insert into t1 values (?[10], ?[10]) ;
Here 10 is the maximum size of input rowset.

We can test changes for rowset code using ODB. It uses rowsets to
insert/upsert.

I don't have a rowset for input JDBC example. I will look some more.

Thank you
Suresh


On Tue, Jan 23, 2018 at 10:48 PM, Dave Birdsall <da...@esgyn.com>
wrote:

> Hi,
>
> Is there a way to use rowsets in Trafci? (Regression test executor/TEST015
> suggests that sqlci does not support rowsets.)
>
> Or must one write JDBC code to use rowsets?
>
> Are there examples of JDBC code that use rowsets for input? (I did find an
> output example, in trafodion/core/conn/jdbc_type2/samples/
> JdbcRowSetSample.java).
>
> Thanks,
>
> Dave
>