The named parameter support was removed from earlier versions of DAS,
here is some previous discussion around the subject [1] See also
tuscany-658. We might need to do further cleanup on the impl, if I
understood correctly.

As for your second suggestion (parameter column types), could you
expose some use cases scenarios where this would be helpful ? Also,
have you thought about multiple queries retrieving the same column,
you would have to configure the parameter in multiple places.

[1] http://www.mail-archive.com/[email protected]/msg04672.html
[2] http://issues.apache.org/jira/browse/TUSCANY-658

On 7/12/07, Amita Vadhavkar <[EMAIL PROTECTED]> wrote:
Hi,
A few days ago there was a user question about passing name in Parameter:-
http://www.mail-archive.com/[email protected]/msg19339.html

When checking how Parameters are used in Config, came across the following
points.
There is a difference in Config (SDO) generated Parameter and
org.apache.tuscany.das.rdb.impl.ParameterImpl.

The one from Config has only ColumnType, Direction and Index whereas in
impl, it has
in addition Name and some other attributes. Not having Name in Config
generated version
does not cause any problems anywhere as JDBC PreparedStatement
setParameter() requires
Index and not Name. But to give a consistent user experience, it can be good
to add Name
(Optional).

Also, when supporting <Create>, <Update>, <Delete> in RDB DAS Config, the
attribute
"parameters" is String, which is internally interpreted in Index and Name.
This misses
the ColumnType and Direction.Direction can be safely assumed as IN for these
statements.
Also, not supplying ColumnType again causes no issues, as DAS tries to get
it from database
metadata or using SDO standards. Still here again, if user can specify
ColumnType (optional),
it will give a consistent user experiece.

So, question here, for the sake of consistency and uniform user experience,
is it a good
idea to replace [1] with [2]? (Same for <Update> and <Delete>)

[1]<xsd:complexType name="Create">
         <xsd:attribute name="sql" type="xsd:string"/>
         <xsd:attribute name="parameters" type="xsd:string"/>
   </xsd:complexType>


[2]<xsd:complexType name="Create">
      <xsd:sequence>
          <xsd:element  maxOccurs="unbounded" minOccurs="0" name="Parameter"
            type="config:Parameter"/>
      </xsd:sequence>
         <xsd:attribute name="sql" type="xsd:string"/>
   </xsd:complexType>

Regards,
Amita



--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to