Date: Friday, November 25, 2005 @ 16:21:31
  Author: gilles
    Path: /cvsroot/carob/carob

Modified: include/Request.hpp (1.5 -> 1.6)
          include/RequestWithResultSetParameters.hpp (1.4 -> 1.5)
          src/Request.cpp (1.3 -> 1.4)
          src/RequestWithResultSetParameters.cpp (1.3 -> 1.4)

Applied new convention for member variables: 
members like memberVariable is now member_variable
This allows us to keep java function names like bool isReadOnly() - This was 
impossible
with a member variable named isReadOnly


--------------------------------------------+
 include/Request.hpp                        |   58 +++++++++++++--------------
 include/RequestWithResultSetParameters.hpp |   22 +++++-----
 src/Request.cpp                            |   12 ++---
 src/RequestWithResultSetParameters.cpp     |   12 ++---
 4 files changed, 52 insertions(+), 52 deletions(-)


Index: carob/include/Request.hpp
diff -u carob/include/Request.hpp:1.5 carob/include/Request.hpp:1.6
--- carob/include/Request.hpp:1.5       Fri Nov 25 15:44:03 2005
+++ carob/include/Request.hpp   Fri Nov 25 16:21:31 2005
@@ -38,12 +38,12 @@
    * @param sql the SQL statement
    */
   Request(wstring sql) :
-    sqlQuery(sql),
-    sqlTemplateIsNull(true),
-    isReadOnly(false),
-    isAutoCommit(true),
-    timeoutInSeconds(0),
-    escapeProcessing(true) // default = true according to the JDBC spec
+    sql_query(sql),
+    sql_template_is_null(true),
+    is_read_only(false),
+    is_auto_commit(true),
+    timeout_in_seconds(0),
+    escape_processing(true) // default = true according to the JDBC spec
   {
   }
 
@@ -64,76 +64,76 @@
    * Returns the escapeProcessing value.
    * @return the escapeProcessing.
    */
-  bool              isEscapeProcessing() const { return escapeProcessing; }
+  bool              isEscapeProcessing() const { return escape_processing; }
   /**
    * Sets the escapeProcessing value.
    * @param escapeProcessingPrm escapeProcessing to set.
    */
-  Request&              setEscapeProcessing (bool escapeProcessingPrm)
-                         { escapeProcessing = escapeProcessingPrm; return 
*this;}
+  Request&          setEscapeProcessing (bool escapeProcessingPrm)
+                         { escape_processing = escapeProcessingPrm; return 
*this;}
   /**
    * Returns the sqlQuery value.
    * @return Returns the sqlQuery.
    */
-  wstring           getSqlQuery() const { return sqlQuery; }
+  wstring           getSqlQuery() const { return sql_query; }
   /**
    * Sets the sqlTemplate.
    */
   Request&          setSqlTemplate(wstring sqlTemplatePrm)
-       { sqlTemplateIsNull = false; sqlTemplate = sqlTemplatePrm; return 
*this;}
+       { sql_template_is_null = false; sql_template = sqlTemplatePrm; return 
*this;}
   /**
    * Sets the sqlQuery value.
    */
-  void              setSqlQuery(wstring sqlQueryPrm) { sqlQuery = sqlQueryPrm; 
}
+  void              setSqlQuery(wstring sqlQueryPrm) { sql_query = 
sqlQueryPrm; }
   /**
    * Cast to wstring operator to ease printing (for debug/traces).
    * @return sql query as a string
    */
-  operator          wstring& () { return sqlQuery; }
+  operator          wstring& () { return sql_query; }
   /**
    * Returns the sqlTemplateNull value.
    * @return true if the sqlTemplate string is NULL (inconsistent)
    */
-  bool              isSqlTemplateNull() const { return sqlTemplateIsNull; }
+  bool              isSqlTemplateNull() const { return sql_template_is_null; }
   /**
    * Returns the sqlTemplate value. A check should be done previously on
    * isSqlTemplateNull() to ensure this value consistency
    * @return Returns the sqlTemplate.
    */
-  wstring           getSqlTemplate() const { return sqlTemplate; }
+  wstring           getSqlTemplate() const { return sql_template; }
   /**
    * Returns the isReadOnly value.
    * @return true if the connection has been set to read only
    */
-  bool              getIsReadOnly() { return isReadOnly; }
+  bool              isReadOnly() { return is_read_only; }
   /**
    * Sets the isReadOnly value.
    * @param isReadOnlyPrm value to set.
    */
   void              setIsReadOnly(bool isReadOnlyPrm)
-                        { isReadOnly = isReadOnlyPrm; }
+                        { is_read_only = isReadOnlyPrm; }
   /**
    * Returns the isAutoCommit value.
    * @return the isAutoCommit
    */
-  bool              getIsAutoCommit() const { return isAutoCommit; }
+  bool              isAutoCommit() const { return is_auto_commit; }
   /**
    * Sets the isAutoCommit value.
    * @param isAutoCommitPrm The isAutoCommit to set.
    */
   void              setIsAutoCommit(bool isAutoCommitPrm)
-                        { isAutoCommit = isAutoCommitPrm; }
+                        { is_auto_commit = isAutoCommitPrm; }
   /**
    * Returns the timeoutInSeconds value.
    * @return Returns the timeoutInSeconds.
    */
-  int               getTimeoutInSeconds() const { return timeoutInSeconds; }
+  int               getTimeoutInSeconds() const { return timeout_in_seconds; }
   /**
    * Sets the timeoutInSeconds value.
    * @param timeoutInSecondsPrm The timeoutInSeconds to set.
    */
-  Request&           setTimeoutInSeconds(int timeoutInSecondsPrm)
-                        { timeoutInSeconds = timeoutInSecondsPrm; return 
*this;}
+  Request&          setTimeoutInSeconds(int timeoutInSecondsPrm)
+                        { timeout_in_seconds = timeoutInSecondsPrm; return 
*this;}
 
 protected:
 
@@ -141,35 +141,35 @@
   // forbid copies (java style)
   Request (const Request&);
   /** SQL query (should be set in constructor). TODO: should probably be const 
*/
-  wstring           sqlQuery;
+  wstring           sql_query;
   /**
    * SQL query skeleton as it appears in PreparedStatements.
    * sqlTemplateIsNull must be set to true if is not a PreparedStatement
    */
-  wstring           sqlTemplate;
+  wstring           sql_template;
   /** Whether the sqlTemplate string is NULL */
-  bool              sqlTemplateIsNull;
+  bool              sql_template_is_null;
   /** True if the connection has been set to read-only */
-  bool              isReadOnly;
+  bool              is_read_only;
   /**
    * Whether this request has been sent in <code>autocommit</code> mode or
    * not.
    */
-  bool              isAutoCommit;
+  bool              is_auto_commit;
   /**
    * Timeout for this request in seconds, value 0 means no timeout (should be
    * set in constructor). This timeout is in seconds, reflecting the jdbc-spec,
    * and is passed as-is to the backends jdbc-driver. Internally converted to 
ms
    * via getTimeoutMs().
    */
-  int               timeoutInSeconds;
+  int               timeout_in_seconds;
 
   /**
    * Should the backend driver do escape processing before sending to the
    * database? Simply forwarded to backend driver. No setter for this member,
    * should be set in constructor.
    */
-  bool              escapeProcessing;
+  bool              escape_processing;
 };
 
 #endif /*REQUEST_HPP_*/
Index: carob/include/RequestWithResultSetParameters.hpp
diff -u carob/include/RequestWithResultSetParameters.hpp:1.4 
carob/include/RequestWithResultSetParameters.hpp:1.5
--- carob/include/RequestWithResultSetParameters.hpp:1.4        Fri Nov 25 
15:44:03 2005
+++ carob/include/RequestWithResultSetParameters.hpp    Fri Nov 25 16:21:31 2005
@@ -52,47 +52,47 @@
    * Returns the cursorNameIsNull value
    * @return true if the cursorName is NULL (not valid)
    */
-  bool              isCursorNameNull() const { return cursorNameIsNull; }
+  bool              isCursorNameNull() const { return cursor_name_is_null; }
   /**
    * Returns the cursorName value.
    * @return Returns the cursorName.
    */
-  wstring           getCursorName() const { return cursorName; }
+  wstring           getCursorName() const { return cursor_name; }
   /**
    * Sets the cursorName value.
    * @param cursorNamePrm cursorName to set.
    */
   void              setCursorName(wstring cursorNamePrm)
-                        { cursorName = cursorNamePrm; }
+                        { cursor_name = cursorNamePrm; }
   /**
    * Returns the fetchSize value.
    * @return Returns the fetchSize.
    */
-  int               getFetchSize () const { return fetchSize; }
+  int               getFetchSize () const { return fetch_size; }
   /**
    * Sets the fetchSize value.
    * @param fetchSizePrm fetchSize to set.
    */
-  void              setFetchSize(int fetchSizePrm) { fetchSize = fetchSizePrm; 
}
+  void              setFetchSize(int fetchSizePrm) { fetch_size = 
fetchSizePrm; }
   /**
    * Returns the maxRows value.
    * @return maximum number of rows.
    */
-  int               getMaxRows() const { return maxRows; }
+  int               getMaxRows() const { return max_rows; }
   /**
    * Sets the maxRows value.
    * @param maxRowsPrm maxRows to set.
    */
-  void              setMaxRows(int maxRowsPrm) { maxRows = maxRowsPrm; }
+  void              setMaxRows(int maxRowsPrm) { max_rows = maxRowsPrm; }
 private:
   /** Maximum number of rows for the ResultSet*/
-  int               maxRows;
+  int               max_rows;
   /** Size to be fetched for the ResultSet */
-  int               fetchSize;
+  int               fetch_size;
   /** Name of the cursor of the ResultSet */
-  wstring           cursorName;
+  wstring           cursor_name;
   /** Whether the cursor name is valid */
-  bool              cursorNameIsNull;
+  bool              cursor_name_is_null;
 
 };
 #endif /*REQUESTWITHRESULTSETPARAMETERS_HPP_*/
Index: carob/src/Request.cpp
diff -u carob/src/Request.cpp:1.3 carob/src/Request.cpp:1.4
--- carob/src/Request.cpp:1.3   Thu Nov 24 15:55:23 2005
+++ carob/src/Request.cpp       Fri Nov 25 16:21:31 2005
@@ -8,16 +8,16 @@
                            bool controllerWantsSqlSkeleton) const
     throw (SocketIOException, UnexpectedException)
 {
-  out<<sqlQuery;
-  out<<escapeProcessing;
-  out<<timeoutInSeconds;
-  out<<isAutoCommit;
+  out<<sql_query;
+  out<<escape_processing;
+  out<<timeout_in_seconds;
+  out<<is_auto_commit;
   // If Statements are not processed by the driver, the controller
   // will need the skeleton.
-  if (controllerWantsSqlSkeleton && !sqlTemplateIsNull)
+  if (controllerWantsSqlSkeleton && !sql_template_is_null)
   {
     out<<true;
-    out<<sqlTemplate;
+    out<<sql_template;
   }
   else
     out<<false;
Index: carob/src/RequestWithResultSetParameters.cpp
diff -u carob/src/RequestWithResultSetParameters.cpp:1.3 
carob/src/RequestWithResultSetParameters.cpp:1.4
--- carob/src/RequestWithResultSetParameters.cpp:1.3    Thu Nov 24 15:54:46 2005
+++ carob/src/RequestWithResultSetParameters.cpp        Fri Nov 25 16:21:31 2005
@@ -2,9 +2,9 @@
 
 RequestWithResultSetParameters::RequestWithResultSetParameters(wstring sql) :
 Request(sql),
-maxRows(0),
-fetchSize(0),
-cursorNameIsNull(true)
+max_rows(0),
+fetch_size(0),
+cursor_name_is_null(true)
 { }
 
 RequestWithResultSetParameters::~RequestWithResultSetParameters()
@@ -16,13 +16,13 @@
 {
     Request::sendToStream(out, controllerWantsSqlSkeleton);
 
-    out<<maxRows;
-    out<<fetchSize;
+    out<<max_rows;
+    out<<fetch_size;
 
     if (!isCursorNameNull()) // do we have a cursor name ?
     {
       out<<true;
-      out<<cursorName;
+      out<<cursor_name;
     }
     else
       out<<false;

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to