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-cpp-changesummaryprocessing.html | 135 +++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 site/trunk/site-publish/rdb-das-cpp-changesummaryprocessing.html (limited to 'site/trunk/site-publish/rdb-das-cpp-changesummaryprocessing.html') diff --git a/site/trunk/site-publish/rdb-das-cpp-changesummaryprocessing.html b/site/trunk/site-publish/rdb-das-cpp-changesummaryprocessing.html new file mode 100644 index 0000000000..975972b91a --- /dev/null +++ b/site/trunk/site-publish/rdb-das-cpp-changesummaryprocessing.html @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + Apache Tuscany : RDB DAS CPP - ChangeSummaryProcessing + + + + + + + + + + + + + + + +
+ + + + +   + +
+ + +
+
+ + + + + + + + + +
+  Apache Tuscany > Home > DAS Overview > DAS C++ > DAS C++ Documentation Menu > RDB DAS C++ - User Guide > RDB DAS CPP - 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::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);

+ +

 delete das;

+
+

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 rather 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