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 --- .../rdb-das-c-changesummaryprocessing.html | 133 +++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 site/trunk/site-publish/rdb-das-c-changesummaryprocessing.html (limited to 'site/trunk/site-publish/rdb-das-c-changesummaryprocessing.html') diff --git a/site/trunk/site-publish/rdb-das-c-changesummaryprocessing.html b/site/trunk/site-publish/rdb-das-c-changesummaryprocessing.html new file mode 100644 index 0000000000..ff2b60a39c --- /dev/null +++ b/site/trunk/site-publish/rdb-das-c-changesummaryprocessing.html @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + Apache Tuscany : RDB DAS C++ - ChangeSummaryProcessing + + + + + + + + + + + + + + + +
+ + + + +   + +
+ + +
+
+ + + + + + + + + +
+  Apache Tuscany > Home > DAS Overview > DAS Java > DAS Java Documentation Menu > DAS Java Developer Guide > RDB DAS Java > RDB DAS - User Guide > RDB DAS C++ - ChangeSummaryProcessing + + User List | Dev List | Issue Tracker   +
+ + + + + + + +
+ + +
+ +
+
+

ChangeSummaryProcessing

+ +

SDO provides an important feature called the ChangeSummary. Using this feature, a graph of related DataObjects can track changes made to iteself. These changes include additions to the graph, deletions, DataObject property (attribute) changes and even changes to object relationships.

+ +

The RDB DAS leverages the SDO ChangeSummary to drive graph chages to a database. Here is a simple example:

+
+

DASImpl* das = (DASImpl*) DASImpl::getFactory().createDAS(getConnection());
+ CommandPtr select = das->createCommand("Select * from CUSTOMER where ID = 1");
+ DataObjectPtr root = select->executeQuery();

+ +

DataObjectPtr customer = root->getDataObject("CUSTOMER[1]");
+ customer->setCString("LASTNAME", "Pavick");
+ das->applyChanges(root);

+
+

The first half of this example creates a new read command and executes it. The result is a graph of DataObjects (in this case just one) represented by the containing "root".

+ +

The second half of the example makes modification to a single object in the graph and then calls the applyChanges() method. As part of the applyChanges processing, the das will scan the SDO ChangeSummary and notice the modified DataObject. It will then generate the UPDATE statement required to reflect the change to the database:

+
+
UPDATE CUSTOMER SET LASTNAME = 'Pavick' WHERE ID = 1
+
+
+

Notice that only a single column is updated rahther than all columns. This is because the SDO ChangeSummary has enough fidelity to track changes on a property-by-property bases and the das has the ability to generate partial updates.

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