|
|
Choosing A Webhost: |
CVS update of carob (4 files): msg#00053db.carob.cvs
Date: Wednesday, February 15, 2006 @ 12:34:46 Author: gilles Path: /cvsroot/carob/carob Modified: include/Connection.hpp (1.57 -> 1.58) include/DriverResultSet.hpp (1.30 -> 1.31) include/Statement.hpp (1.31 -> 1.32) src/DriverResultSet.cpp (1.37 -> 1.38) Removed Connection <> DriverResultSet full friendship Only DriverResultSet constructor and next() functions are friends. This lead to changing receiveRows() so it now takes DriverSocket as parameter Part of CAROB-59 -----------------------------+ include/Connection.hpp | 10 +++++++--- include/DriverResultSet.hpp | 6 ++++-- include/Statement.hpp | 1 - src/DriverResultSet.cpp | 8 ++++---- 4 files changed, 15 insertions(+), 10 deletions(-) Index: carob/include/Connection.hpp diff -u carob/include/Connection.hpp:1.57 carob/include/Connection.hpp:1.58 --- carob/include/Connection.hpp:1.57 Wed Feb 15 11:03:42 2006 +++ carob/include/Connection.hpp Wed Feb 15 12:34:46 2006 @@ -114,9 +114,13 @@ */ class Connection { -// For now, DriverResultSet must access getDriverSocket() function -// TODO: change this to remove the friendship -friend class DriverResultSet; +// These functions need access to getDriverSocket() +friend DriverResultSet::DriverResultSet(Connection* conn) + throw (ProtocolException, SocketIOException, NotImplementedException, + UnexpectedException); +friend bool DriverResultSet::next() throw (SocketIOException, + ControllerException, ProtocolException, BackendException, + UnexpectedException); public: /** Index: carob/include/DriverResultSet.hpp diff -u carob/include/DriverResultSet.hpp:1.30 carob/include/DriverResultSet.hpp:1.31 --- carob/include/DriverResultSet.hpp:1.30 Wed Feb 1 13:39:24 2006 +++ carob/include/DriverResultSet.hpp Wed Feb 15 12:34:46 2006 @@ -323,11 +323,13 @@ /** * De-serialize only data rows, not any metadata. * + * @param socket opened socket to controller * @throw SocketIOException stream error * @throw ProtocolException protocol corruption */ - void receiveRows() throw (SocketIOException, - ProtocolException, UnexpectedException); + void receiveRows(const DriverSocket& socket) + throw (SocketIOException, ProtocolException, + UnexpectedException); /** * Sets the statement. * Index: carob/include/Statement.hpp diff -u carob/include/Statement.hpp:1.31 carob/include/Statement.hpp:1.32 --- carob/include/Statement.hpp:1.31 Wed Feb 1 11:30:56 2006 +++ carob/include/Statement.hpp Wed Feb 15 12:34:46 2006 @@ -53,7 +53,6 @@ class Connection; class ResultSetMetaData; -class DriverResultSet; class RequestWithResultSetParameters; /** Index: carob/src/DriverResultSet.cpp diff -u carob/src/DriverResultSet.cpp:1.37 carob/src/DriverResultSet.cpp:1.38 --- carob/src/DriverResultSet.cpp:1.37 Wed Feb 15 11:03:42 2006 +++ carob/src/DriverResultSet.cpp Wed Feb 15 12:34:46 2006 @@ -142,7 +142,7 @@ columnTypeTags.push_back(tag); } } - receiveRows(); + receiveRows(socket); if (hasMoreData) socket>>cursorName; isClosed = false; @@ -185,7 +185,7 @@ // TODO: what happens if user closed this connection? What says JDBC? connectionPtr->tryFetchNext(cursorName, fetchSize); // no exception from controller, so let's receive our new rows - receiveRows(); + receiveRows(connectionPtr->getDriverSocket()); currentRow = 0; if (dataIsNull) { @@ -576,11 +576,11 @@ isClosed = true; } -void DriverResultSet::receiveRows() throw (SocketIOException, ProtocolException, +void DriverResultSet::receiveRows(const DriverSocket& socket) + throw (SocketIOException, ProtocolException, UnexpectedException) { clearAllData(); - const DriverSocket& socket = connectionPtr->getDriverSocket(); socket>>nbOfRows; vector<bool> nullsForThisRow;
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of carob (8 files), gilles-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of carob (include/Connection.hpp src/Connection.cpp), gilles-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of carob (4 files), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of carob (4 files), gilles-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|