From 200a40b332420f94992eb39a6d0ea1cf1490ffc4 Mon Sep 17 00:00:00 2001 From: coreyg Date: Fri, 21 Nov 2014 09:30:19 +0000 Subject: Adding tuscany's website to their svn repo for svnpubsub git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1640879 13f79535-47bb-0310-9956-ffa450edef68 --- .../explicit-resultset-shape-definition.html | 157 +++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 site/trunk/site-publish/explicit-resultset-shape-definition.html (limited to 'site/trunk/site-publish/explicit-resultset-shape-definition.html') diff --git a/site/trunk/site-publish/explicit-resultset-shape-definition.html b/site/trunk/site-publish/explicit-resultset-shape-definition.html new file mode 100644 index 0000000000..b194a81d25 --- /dev/null +++ b/site/trunk/site-publish/explicit-resultset-shape-definition.html @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + Apache Tuscany : Explicit ResultSet shape definition + + + + + + + + + + + + + + + +
+ + + + +   + +
+ + +
+
+ + + + + + + + + +
+  Apache Tuscany > Home > DAS Overview > DAS Java > DAS Java Documentation Menu > DAS Java Developer Guide > RDB DAS Java > RDB DAS - User Guide > Explicit ResultSet shape definition + + User List | Dev List | Issue Tracker   +
+ + + + + + + +
+ + +
+ +
+
+

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:sequence>
+     ....
+      <xsd:element  maxOccurs="unbounded" minOccurs="0"
+            name="ResultDescriptor"  type="config:ResultDescriptor"/>
+   </xsd:sequence>
+   ....
+</xsd:complexType>
+
+<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"/>
+</xsd:complexType>
+...
+
+
+

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"
+         columnType="commonj.sdo.Long"/>
+     <ResultDescriptor columnName="LASTNAME" tableName="CUSTOMER"
+         columnType="commonj.sdo.String"/>
+     <ResultDescriptor columnName="ADDRESS" tableName="CUSTOMER"
+        columnType="commonj.sdo.String"/>
+  </Command>
+   <Table tableName="CUSTOMER">        <Column columnName="ID" converterClassName="org.apache.tuscany.das.rdb.test.mappings.StringToLongConverter"/>
+   </Table>
+</Config>
+
+
+ +

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()

+
+
+
+ + +
+ + + + + + website stats + + + + + + -- cgit v1.2.3