tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Tuscany: Explicit ResultSet shape definition (page edited)
Date Thu, 13 Sep 2007 06:41:00 GMT
Explicit ResultSet shape definition (TUSCANY) edited by Amita Vadhavkar
      Page: http://cwiki.apache.org/confluence/display/TUSCANY/Explicit+ResultSet+shape+definition
   Changes: http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=53832&originalVersion=4&revisedVersion=5


h1. Explicit ResultSet shape definition

The RDB DAS provides the ability to specify format(shape) of the ResultSet. This is necessary
when the JDBC driver in use does not provide adequate support for ResultSetMetaData. Also,
we expect that specifying the result set shape will increase the performance. The following
is the provision in RDB DAS config to specify result set shape:
<xsd:complexType name="Command">
      <xsd:element  maxOccurs="unbounded" minOccurs="0"
            name="ResultDescriptor"  type="config:ResultDescriptor"/>

<xsd:complexType name="ResultDescriptor">
   <xsd:attribute name="columnIndex" type="xsd:int" default="-1"/>
   <xsd:attribute name="columnName" type="xsd:string"/>
   <xsd:attribute name="tableName" type="xsd:string"/>
   <xsd:attribute name="schemaName" type="xsd:string"/>
   <xsd:attribute name="columnType" type="xsd:string"/>
The following is an example config file that defines a result set shape: :
<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
  <Command name="literal" SQL="Select 99, 'Roosevelt', '1600 Pennsylvania Avenue' from
customer" kind="Select">
     <ResultDescriptor columnName="ID" tableName="CUSTOMER"
     <ResultDescriptor columnName="LASTNAME" tableName="CUSTOMER"
     <ResultDescriptor columnName="ADDRESS" tableName="CUSTOMER"
   <Table tableName="CUSTOMER">        <Column columnName="ID" converterClassName="org.apache.tuscany.das.rdb.test.mappings.StringToLongConverter"/>

h1. Result Descriptor on Dynamic Commands

Allow passing ResultDescriptor to Dynamic Commands. i.e. Command x = das.createCommand("y");
x can have set/get of single/list of ResultDescriptors. Useful for databases like Oracle
which require user to pass ResultDescriptor and for cases when the commands are created dynamically
using createCommand()

This message is automatically generated by Confluence

Unsubscribe or edit your notifications preferences

If you think it was sent incorrectly contact one of the administrators

If you want more information on Confluence, or have a bug to report see

To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org

View raw message