You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by co...@apache.org on 2007/10/27 06:58:05 UTC
[CONF] Apache Tuscany: RDB DAS CPP - ResultSetDrivenDataObjectTypes
(page edited)
RDB DAS CPP - ResultSetDrivenDataObjectTypes (TUSCANY) edited by Adriano Crestani
Page: http://cwiki.apache.org/confluence/display/TUSCANY/RDB+DAS+CPP+-+ResultSetDrivenDataObjectTypes
Changes: http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=69450&originalVersion=2&revisedVersion=3
Content:
---------------------------------------------------------------------
h1. ResultSetDrivenDataObjectTypes
RDB DAS uses the database metadata retrieved by ODBC driver to create the set of SDO Types used to construct the data graph returned as a result of a query. ODBC returns the data resulting from a query as a set of rows of column values. The metadata associated with this result set provides information about these values. Table name, column name, column type, etc. are all provided for each returned value.
For example, consider a database with the following table:
{noformat}
TABLE CUSTOMER
ID INTEGER
LASTNAME VARCHAR(20)
ADDRESS VARCHAR(30)
{noformat}
The user might query the database like this:
{panel}
DASImpl\* das = (DASImpl*) DASImpl::getFactory().createDAS(getConnection());
CommandPtr readCustomers = das->createCommand("select * from CUSTOMER where LASTNAME = 'Williams'");
DataObjectPtr root = readCustomers0->executeQuery();
{panel}
The DAS returns a graph of DataObjects each of Type CUSTOMER and each instance will have three properties: (ID, LASTNAME, ADDRESS). Since this example does not pass the DAS a set of SDO Types to use, the DAS creates the Types dynamically based on the metadata.
---------------------------------------------------------------------
CONFLUENCE INFORMATION
This message is automatically generated by Confluence
Unsubscribe or edit your notifications preferences
http://cwiki.apache.org/confluence/users/viewnotifications.action
If you think it was sent incorrectly contact one of the administrators
http://cwiki.apache.org/confluence/administrators.action
If you want more information on Confluence, or have a bug to report see
http://www.atlassian.com/software/confluence
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org