Author: rgrabowski
Date: Sun Jun 28 16:11:37 2009
New Revision: 789119

URL: http://svn.apache.org/viewvc?rev=789119&view=rev
Log:
Renamed condenseSql to preserveWhitespace for controlling formating of SQL text 
within <statement /> nodes.

Added:
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Fixtures/PreserveWhitespaceTestFixture.cs
      - copied, changed from r789113, 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Fixtures/CondenseSqlTestFixture.cs
Removed:
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Fixtures/CondenseSqlTestFixture.cs
Modified:
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Apache.Ibatis.DataMapper.Sqlite.Test.csproj
    ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/SqlMap.config
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/ConfigurationSetting.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/DefaultConfigurationEngine.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/DefaultModelBuilder.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Interpreters/Config/ConfigConstants.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Interpreters/Config/Xml/Processor/Handlers/ProcessStatementElement.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/ModelBuilder/BuildStatements.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/BaseStatementDeSerializer.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/DeleteDeSerializer.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/InsertDeSerializer.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/ProcedureDeSerializer.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/SelectDeSerializer.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/SelectKeyDeSerializer.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/StatementDeSerializer.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/UpdateDeSerializer.cs
    ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Delete.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/IStatement.cs
    ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Insert.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Procedure.cs
    ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Select.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/SelectKey.cs
    
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Statement.cs
    ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Update.cs
    ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/SqlMap.xsd
    ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/SqlMapConfig.xsd

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Apache.Ibatis.DataMapper.Sqlite.Test.csproj
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Apache.Ibatis.DataMapper.Sqlite.Test.csproj?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Apache.Ibatis.DataMapper.Sqlite.Test.csproj
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Apache.Ibatis.DataMapper.Sqlite.Test.csproj
 Sun Jun 28 16:11:37 2009
@@ -51,8 +51,8 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Domain\Account.cs" />
-    <Compile Include="Fixtures\CondenseSqlTestFixture.cs" />
     <Compile Include="Fixtures\BaseTest.cs" />
+    <Compile Include="Fixtures\PreserveWhitespaceTestFixture.cs" />
     <Compile Include="Fixtures\ScriptBase.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>

Copied: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Fixtures/PreserveWhitespaceTestFixture.cs
 (from r789113, 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Fixtures/CondenseSqlTestFixture.cs)
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Fixtures/PreserveWhitespaceTestFixture.cs?p2=ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Fixtures/PreserveWhitespaceTestFixture.cs&p1=ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Fixtures/CondenseSqlTestFixture.cs&r1=789113&r2=789119&rev=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Fixtures/CondenseSqlTestFixture.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/Fixtures/PreserveWhitespaceTestFixture.cs
 Sun Jun 28 16:11:37 2009
@@ -7,10 +7,10 @@
 namespace Apache.Ibatis.DataMapper.Sqlite.Test.Fixtures
 {
     [TestFixture]
-    public class CondenseSqlTestFixture : BaseTest
+    public class PreserveWhitespaceTestFixture : BaseTest
     {
         [Test]
-        public void CondenseSql()
+        public void PreserveWhitespace()
         {
             LogManager.Adapter = new ConsoleOutLoggerFA(new 
NameValueCollection());
 

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/SqlMap.config
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/SqlMap.config?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/SqlMap.config 
(original)
+++ ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper.Sqlite.Test/SqlMap.config 
Sun Jun 28 16:11:37 2009
@@ -6,7 +6,7 @@
                <setting cacheModelsEnabled="false"/>
                <setting validateSqlMap="false"/>
                <setting useReflectionOptimizer="false"/>
-               <setting condenseSql="false"/>
+               <setting preserveWhitespace="false"/>
        </settings>     
        <providers uri="file://providers.config"/>      
        <database>

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/ConfigurationSetting.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/ConfigurationSetting.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/ConfigurationSetting.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/ConfigurationSetting.cs
 Sun Jun 28 16:11:37 2009
@@ -51,7 +51,7 @@
         private bool useStatementNamespaces = false;
         private bool isCacheModelsEnabled = false;
         private bool useReflectionOptimizer = true;
-        private bool condenseSql = true;
+        private bool preserveWhitespace;
 
         /// <summary>
         /// Gets or sets the dynamic SQL engine.
@@ -181,12 +181,16 @@
         }
 
         /// <summary>
-        /// 
+        /// Gets or sets a value indicating whether whitespace within 
&lt;statement&gt; nodes should be preserved.
         /// </summary>
-        public bool CondenseSql
+        /// <remarks>
+        /// Using the default value of false may cause single line SQL 
comments '--' to comment out more than expected. A 
+        /// safer commenting syntax is to always use the multi-line comments 
supported by most vendors: '/* ... */'
+        /// </remarks>
+        public bool PreserveWhitespace
         {
-            get { return condenseSql; }
-            set { condenseSql = value; }
+            get { return preserveWhitespace; }
+            set { preserveWhitespace = value; }
         }
     }
 }

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/DefaultConfigurationEngine.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/DefaultConfigurationEngine.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/DefaultConfigurationEngine.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/DefaultConfigurationEngine.cs
 Sun Jun 28 16:11:37 2009
@@ -145,18 +145,6 @@
             modules.Add(module);
         }
 
-        private bool tryGetSettingBoolean(string attributeKey, bool 
defaultValue)
-        {
-            var setting = configurationStore.Settings[attributeKey];
-            if (setting != null)
-            {
-                return (bool)setting.GetValue(typeof(bool), defaultValue);
-            }
-
-            return defaultValue;
-        }
-
-
         /// <summary>
         /// Builds the mapper factory.
         /// </summary>
@@ -169,11 +157,11 @@
                 interpreter.ProcessResource(configurationStore);
 
                 // ensure that the default configuration settings get updated 
after the interpreter runs
-                configurationSetting.CondenseSql = 
tryGetSettingBoolean(ConfigConstants.ATTRIBUTE_CONDENSESQL, 
configurationSetting.CondenseSql);
-                configurationSetting.UseReflectionOptimizer = 
tryGetSettingBoolean(ConfigConstants.ATTRIBUTE_USE_REFLECTION_OPTIMIZER, 
configurationSetting.UseReflectionOptimizer);
-                configurationSetting.IsCacheModelsEnabled = 
tryGetSettingBoolean(ConfigConstants.ATTRIBUTE_CACHE_MODELS_ENABLED, 
configurationSetting.IsCacheModelsEnabled);
-                configurationSetting.UseStatementNamespaces = 
tryGetSettingBoolean(ConfigConstants.ATTRIBUTE_USE_STATEMENT_NAMESPACES, 
configurationSetting.UseStatementNamespaces);
-                configurationSetting.ValidateMapperConfigFile = 
tryGetSettingBoolean(ConfigConstants.ATTRIBUTE_VALIDATE_SQLMAP, 
configurationSetting.ValidateMapperConfigFile);
+                configurationSetting.PreserveWhitespace = 
TryGetSettingBoolean(ConfigConstants.ATTRIBUTE_PRESERVEWHITSPACE, 
configurationSetting.PreserveWhitespace);
+                configurationSetting.UseReflectionOptimizer = 
TryGetSettingBoolean(ConfigConstants.ATTRIBUTE_USE_REFLECTION_OPTIMIZER, 
configurationSetting.UseReflectionOptimizer);
+                configurationSetting.IsCacheModelsEnabled = 
TryGetSettingBoolean(ConfigConstants.ATTRIBUTE_CACHE_MODELS_ENABLED, 
configurationSetting.IsCacheModelsEnabled);
+                configurationSetting.UseStatementNamespaces = 
TryGetSettingBoolean(ConfigConstants.ATTRIBUTE_USE_STATEMENT_NAMESPACES, 
configurationSetting.UseStatementNamespaces);
+                configurationSetting.ValidateMapperConfigFile = 
TryGetSettingBoolean(ConfigConstants.ATTRIBUTE_VALIDATE_SQLMAP, 
configurationSetting.ValidateMapperConfigFile);
             }
 
             // Registers code configuration element
@@ -225,6 +213,20 @@
             return new DefaultMapperFactory(dataMapper);
         }
 
+        /// <summary>
+        /// Used by BuildMapperFactory to retrieve configuration values from 
configurationStore. 
+        /// </summary>
+        private bool TryGetSettingBoolean(string attributeKey, bool 
defaultValue)
+        {
+            var setting = configurationStore.Settings[attributeKey];
+            if (setting != null)
+            {
+                return (bool)setting.GetValue(typeof(bool), defaultValue);
+            }
+
+            return defaultValue;
+        }
+
         #endregion
 
         private IConfiguration ResolveExtendResultMap(IList<IConfiguration> 
resolvedResultMap, IConfiguration resultMap)

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/DefaultModelBuilder.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/DefaultModelBuilder.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/DefaultModelBuilder.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/DefaultModelBuilder.cs
 Sun Jun 28 16:11:37 2009
@@ -72,7 +72,7 @@
         private bool useStatementNamespaces = false;
         private bool isCacheModelsEnabled = false;
         private bool useReflectionOptimizer = true;
-        private bool condenseSql = true;
+        private bool preserveWhitespace;
         private int commandTimeOut = -1;
 
         private readonly WaitResultPropertyResolution 
waitResultPropertyResolution = null;
@@ -123,7 +123,7 @@
                 isCacheModelsEnabled = 
configurationSetting.IsCacheModelsEnabled;
                 useStatementNamespaces = 
configurationSetting.UseStatementNamespaces;
                 useReflectionOptimizer = 
configurationSetting.UseReflectionOptimizer;
-                condenseSql = configurationSetting.CondenseSql;
+                preserveWhitespace = configurationSetting.PreserveWhitespace;
             }
             
             // Xml setting override code setting

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Interpreters/Config/ConfigConstants.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Interpreters/Config/ConfigConstants.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Interpreters/Config/ConfigConstants.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Interpreters/Config/ConfigConstants.cs
 Sun Jun 28 16:11:37 2009
@@ -52,9 +52,9 @@
         #region Token attribute
 
         /// <summary>
-        /// Token for attribute condenseSql
+        /// Token for attribute preserveWhitespace
         /// </summary>
-        public const string ATTRIBUTE_CONDENSESQL = "condenseSql";
+        public const string ATTRIBUTE_PRESERVEWHITSPACE = "preserveWhitespace";
 
         /// <summary>
         /// Token for attribute sqlSource
@@ -280,7 +280,7 @@
         /// <summary>
         /// Token to preserve whitespace in statements.
         /// </summary>
-        public const string ELEMENT_CONDENSESQL = "condenseSql";
+        public const string ELEMENT_PRESERVEWHITESPACE = "preserveWhitespace";
         /// <summary>
         /// Token to identify the empty parameter map.
         /// </summary>

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Interpreters/Config/Xml/Processor/Handlers/ProcessStatementElement.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Interpreters/Config/Xml/Processor/Handlers/ProcessStatementElement.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Interpreters/Config/Xml/Processor/Handlers/ProcessStatementElement.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Interpreters/Config/Xml/Processor/Handlers/ProcessStatementElement.cs
 Sun Jun 28 16:11:37 2009
@@ -45,7 +45,7 @@
             AddAttribute(config, ConfigConstants.ATTRIBUTE_CACHEMODEL, true);
             AddAttribute(config, ConfigConstants.ELEMENT_PARAMETERMAP, true);
             AddAttribute(config, ConfigConstants.ELEMENT_RESULTMAP, true);
-            AddAttribute(config, ConfigConstants.ELEMENT_CONDENSESQL, false);
+            AddAttribute(config, ConfigConstants.ELEMENT_PRESERVEWHITESPACE, 
false);
 
             configurationStore.AddStatementConfiguration(config);
             element.Configuration = config;

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/ModelBuilder/BuildStatements.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/ModelBuilder/BuildStatements.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/ModelBuilder/BuildStatements.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/ModelBuilder/BuildStatements.cs
 Sun Jun 28 16:11:37 2009
@@ -343,7 +343,7 @@
                 if (child.Type == ConfigConstants.ELEMENT_TEXT || child.Type 
== ConfigConstants.ELEMENT_CDATA)
                 {
                     string childValueString = child.Value;
-                    if (statement.CondenseSql)
+                    if (statement.PreserveWhitespace)
                     {
                         childValueString = childValueString
                             .Replace('\n', ' ')

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/BaseStatementDeSerializer.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/BaseStatementDeSerializer.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/BaseStatementDeSerializer.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/BaseStatementDeSerializer.cs
 Sun Jun 28 16:11:37 2009
@@ -58,7 +58,7 @@
         protected bool remapResults = false;
         protected string nameSpace = string.Empty;
         protected string sqlSourceClassName = string.Empty;
-        protected bool condenseSql = true;
+        protected bool preserveWhitespace;
 
         protected ResultMapCollection resultsMap = new ResultMapCollection();
         protected Type resultClass = null;
@@ -89,7 +89,7 @@
             resultMapName = 
ConfigurationUtils.GetStringAttribute(config.Attributes, 
ConfigConstants.ATTRIBUTE_RESULTMAP);
             remapResults = 
ConfigurationUtils.GetBooleanAttribute(config.Attributes, 
ConfigConstants.ATTRIBUTE_REMAPRESULTS, false);
             sqlSourceClassName = 
ConfigurationUtils.GetStringAttribute(config.Attributes, 
ConfigConstants.ATTRIBUTE_SQLSOURCE);
-            condenseSql = 
ConfigurationUtils.GetBooleanAttribute(config.Attributes, 
ConfigConstants.ATTRIBUTE_CONDENSESQL, configurationSetting.CondenseSql);
+            preserveWhitespace = 
ConfigurationUtils.GetBooleanAttribute(config.Attributes, 
ConfigConstants.ATTRIBUTE_PRESERVEWHITSPACE, 
configurationSetting.PreserveWhitespace);
 
             // Gets the results Map
             if (resultMapName.Length > 0)

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/DeleteDeSerializer.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/DeleteDeSerializer.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/DeleteDeSerializer.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/DeleteDeSerializer.cs
 Sun Jun 28 16:11:37 2009
@@ -65,7 +65,7 @@
                 remapResults,
                 extendsName,
                 sqlSource,
-                condenseSql);
+                preserveWhitespace);
 
         }
        }

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/InsertDeSerializer.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/InsertDeSerializer.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/InsertDeSerializer.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/InsertDeSerializer.cs
 Sun Jun 28 16:11:37 2009
@@ -71,7 +71,7 @@
                 extendsName,
                 selectKey,
                 sqlSource,
-                condenseSql
+                preserveWhitespace
                 );
         }
 

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/ProcedureDeSerializer.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/ProcedureDeSerializer.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/ProcedureDeSerializer.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/ProcedureDeSerializer.cs
 Sun Jun 28 16:11:37 2009
@@ -74,7 +74,7 @@
                 remapResults,
                 string.Empty,
                 sqlSource,
-                condenseSql);
+                preserveWhitespace);
         }
        }
 }

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/SelectDeSerializer.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/SelectDeSerializer.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/SelectDeSerializer.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/SelectDeSerializer.cs
 Sun Jun 28 16:11:37 2009
@@ -65,7 +65,7 @@
                 remapResults,
                 extendsName,
                 sqlSource,
-                condenseSql);
+                preserveWhitespace);
 
         }
 

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/SelectKeyDeSerializer.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/SelectKeyDeSerializer.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/SelectKeyDeSerializer.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/SelectKeyDeSerializer.cs
 Sun Jun 28 16:11:37 2009
@@ -62,7 +62,7 @@
                 resultsMap,
                 selectKeyType,
                 sqlSource,
-                condenseSql);
+                preserveWhitespace);
         }
 
         private SelectKeyType ReadSelectKeyType(string s)

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/StatementDeSerializer.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/StatementDeSerializer.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/StatementDeSerializer.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/StatementDeSerializer.cs
 Sun Jun 28 16:11:37 2009
@@ -72,7 +72,7 @@
                 remapResults,
                 extendsName,
                 sqlSource,
-                condenseSql);
+                preserveWhitespace);
 
         }
        }

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/UpdateDeSerializer.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/UpdateDeSerializer.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/UpdateDeSerializer.cs
 (original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Configuration/Serializers/UpdateDeSerializer.cs
 Sun Jun 28 16:11:37 2009
@@ -61,7 +61,7 @@
                 remapResults,
                 extendsName,
                 sqlSource,
-                condenseSql);
+                preserveWhitespace);
         }
        }
 }

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Delete.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Delete.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Delete.cs 
(original)
+++ ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Delete.cs 
Sun Jun 28 16:11:37 2009
@@ -61,6 +61,7 @@
         /// <param name="remapResults">if set to <c>true</c> [remap 
results].</param>
         /// <param name="extends">The extends.</param>
         /// <param name="sqlSource">The SQL source.</param>
+        /// <param name="preserveWhitespace">Preserve whitespace.</param>
         public Delete(
             string id, 
             Type parameterClass,
@@ -73,9 +74,9 @@
             bool remapResults,
             string extends,
             ISqlSource sqlSource,
-            bool condenseSql
+            bool preserveWhitespace
             )
-            : base(id, parameterClass, parameterMap, resultClass, resultMaps, 
listClass, listClassFactory, cacheModel, remapResults, extends, sqlSource, 
condenseSql)
+            : base(id, parameterClass, parameterMap, resultClass, resultMaps, 
listClass, listClassFactory, cacheModel, remapResults, extends, sqlSource, 
preserveWhitespace)
                {}
 
        }

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/IStatement.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/IStatement.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/IStatement.cs 
(original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/IStatement.cs 
Sun Jun 28 16:11:37 2009
@@ -116,9 +116,13 @@
         ISqlSource SqlSource { get; set; }
 
         /// <summary>
-        /// 
+        /// Gets or sets a value indicating whether whitespace within 
&lt;statement&gt; nodes should be preserved.
         /// </summary>
-        bool CondenseSql { get; }
+        /// <remarks>
+        /// Using the default value of false may cause single line SQL 
comments '--' to comment out more than expected. A 
+        /// safer commenting syntax is to always use the multi-line comments 
supported by most vendors: '/* ... */'
+        /// </remarks>
+        bool PreserveWhitespace { get; }
 
         #endregion
 

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Insert.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Insert.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Insert.cs 
(original)
+++ ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Insert.cs 
Sun Jun 28 16:11:37 2009
@@ -81,6 +81,7 @@
         /// <param name="extends">The extends.</param>
         /// <param name="selectKey">The select key.</param>
         /// <param name="sqlSource">The SQL source.</param>
+        /// <param name="preserveWhitespace">Preserve whitespace.</param>
         public Insert(
             string id, 
             Type parameterClass,
@@ -94,9 +95,9 @@
             string extends,
             SelectKey selectKey,
             ISqlSource sqlSource,
-            bool condenseSql
+            bool preserveWhitespace
             )
-            : base(id, parameterClass, parameterMap, resultClass, resultMaps, 
listClass, listClassFactory, cacheModel, remapResults, extends, sqlSource, 
condenseSql)
+            : base(id, parameterClass, parameterMap, resultClass, resultMaps, 
listClass, listClassFactory, cacheModel, remapResults, extends, sqlSource, 
preserveWhitespace)
                {
             this.selectKey = selectKey;
         }

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Procedure.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Procedure.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Procedure.cs 
(original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Procedure.cs 
Sun Jun 28 16:11:37 2009
@@ -80,6 +80,7 @@
         /// <param name="remapResults">if set to <c>true</c> [remap 
results].</param>
         /// <param name="extends">The extends.</param>
         /// <param name="sqlSource">The SQL source.</param>
+        /// <param name="preserveWhitespace">Preserve whitespace.</param>
         public Procedure(
             string id, 
             Type parameterClass,
@@ -92,9 +93,9 @@
             bool remapResults,
             string extends,
             ISqlSource sqlSource,
-            bool condenseSql
+            bool preserveWhitespace
             )
-            : base(id, parameterClass, parameterMap, resultClass, resultMaps, 
listClass, listClassFactory, cacheModel, remapResults, extends, sqlSource, 
condenseSql)
+            : base(id, parameterClass, parameterMap, resultClass, resultMaps, 
listClass, listClassFactory, cacheModel, remapResults, extends, sqlSource, 
preserveWhitespace)
                {}
 
        }

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Select.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Select.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Select.cs 
(original)
+++ ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Select.cs 
Sun Jun 28 16:11:37 2009
@@ -55,6 +55,7 @@
         /// <param name="remapResults">if set to <c>true</c> [remap 
results].</param>
         /// <param name="extends">The extends.</param>
         /// <param name="sqlSource">The SQL source.</param>
+        /// <param name="preserveWhitespace">Preserve whitespace.</param>
         public Select(
             string id, 
             Type parameterClass,
@@ -67,9 +68,9 @@
             bool remapResults,
             string extends,
             ISqlSource sqlSource,
-            bool condenseSql
+            bool preserveWhitespace
             )
-            : base(id, parameterClass, parameterMap, resultClass, resultMaps, 
listClass, listClassFactory, cacheModel, remapResults, extends, sqlSource, 
condenseSql)
+            : base(id, parameterClass, parameterMap, resultClass, resultMaps, 
listClass, listClassFactory, cacheModel, remapResults, extends, sqlSource, 
preserveWhitespace)
                {}
        }
 }

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/SelectKey.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/SelectKey.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/SelectKey.cs 
(original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/SelectKey.cs 
Sun Jun 28 16:11:37 2009
@@ -91,6 +91,7 @@
         /// <param name="resultMaps">The result maps.</param>
         /// <param name="selectKeyType">Type of the select key.</param>
         /// <param name="sqlSource">The SQL source.</param>
+        /// <param name="preserveWhitespace">Preserve whitespace.</param>
         public SelectKey(
             string id, 
             string propertyName,
@@ -98,9 +99,9 @@
             ResultMapCollection resultMaps,
             SelectKeyType selectKeyType,
             ISqlSource sqlSource,
-            bool condenseSql
+            bool preserveWhitespace
             )
-            : base(id, null, null, type, resultMaps, null, null, null, false, 
string.Empty, sqlSource, condenseSql)
+            : base(id, null, null, type, resultMaps, null, null, null, false, 
string.Empty, sqlSource, preserveWhitespace)
                {
             this.propertyName = propertyName;
             this.selectKeyType = selectKeyType;

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Statement.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Statement.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Statement.cs 
(original)
+++ 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Statement.cs 
Sun Jun 28 16:11:37 2009
@@ -79,7 +79,7 @@
         [NonSerialized]
         private ISqlSource sqlSource = null;
         [NonSerialized]
-        private readonly bool condenseSql = true;
+        private readonly bool preserveWhitespace;
 
         #endregion
 
@@ -211,11 +211,15 @@
         }
 
         /// <summary>
-        /// 
+        /// Gets or sets a value indicating whether whitespace within 
&lt;statement&gt; nodes should be preserved.
         /// </summary>
-        public bool CondenseSql
+        /// <remarks>
+        /// Using the default value of false may cause single line SQL 
comments '--' to comment out more than expected. A 
+        /// safer commenting syntax is to always use the multi-line comments 
supported by most vendors: '/* ... */'
+        /// </remarks>
+        public bool PreserveWhitespace
         {
-            get { return condenseSql; }
+            get { return preserveWhitespace; }
         }
 
         #endregion
@@ -234,7 +238,7 @@
         /// <param name="remapResults">if set to <c>true</c> [remap 
results].</param>
         /// <param name="extends">The extends.</param>
         /// <param name="sqlSource">The SQL source.</param>
-        /// <param name="condenseSql"></param>
+        /// <param name="preserveWhitespace">Preserve whitespace.</param>
         public Statement(
             string id, 
             Type parameterClass,
@@ -247,7 +251,7 @@
             bool remapResults,
             string extends,
             ISqlSource sqlSource,
-            bool condenseSql)
+            bool preserveWhitespace)
         {
             Contract.Require.That(id, Is.Not.Null & 
Is.Not.Empty).When("retrieving argument id");
 
@@ -262,7 +266,7 @@
             allowRemapping = remapResults;
             this.extends = extends;
             this.sqlSource = sqlSource;
-            this.condenseSql = condenseSql;
+            this.preserveWhitespace = preserveWhitespace;
         }
 
         #region Methods

Modified: 
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Update.cs
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Update.cs?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Update.cs 
(original)
+++ ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Statements/Update.cs 
Sun Jun 28 16:11:37 2009
@@ -52,6 +52,7 @@
         /// <param name="remapResults">if set to <c>true</c> [remap 
results].</param>
         /// <param name="extends">The extends.</param>
         /// <param name="sqlSource">The SQL source.</param>
+        /// <param name="preserveWhitespace">Preserve whitespace.</param>
         public Update(
             string id, 
             Type parameterClass,
@@ -59,8 +60,8 @@
             bool remapResults,
             string extends,
             ISqlSource sqlSource,
-            bool condenseSql)
-            : base(id, parameterClass, parameterMap, null, new 
ResultMapCollection(), null, null, null, remapResults, extends, sqlSource, 
condenseSql)
+            bool preserveWhitespace)
+            : base(id, parameterClass, parameterMap, null, new 
ResultMapCollection(), null, null, null, remapResults, extends, sqlSource, 
preserveWhitespace)
                {}
 
        }

Modified: ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/SqlMap.xsd
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/SqlMap.xsd?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/SqlMap.xsd (original)
+++ ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/SqlMap.xsd Sun Jun 28 
16:11:37 2009
@@ -102,7 +102,7 @@
                        <xs:attribute name="cacheModel" type="xs:string"/>
                        <xs:attribute name="listClass" type="xs:string"/>
                        <xs:attribute name="sqlSource" type="xs:string"/>
-                       <xs:attribute name="condenseSql" type="xs:boolean" 
default="true"/>
+                       <xs:attribute name="preserveWhitespace" 
type="xs:boolean" default="false"/>
                </xs:complexType>
        </xs:element>
        <xs:element name="delete">
@@ -131,7 +131,7 @@
                        <xs:attribute name="parameterClass" type="xs:string"/>
                        <xs:attribute name="extends" type="xs:string"/> 
                        <xs:attribute name="sqlSource" type="xs:string"/>
-      <xs:attribute name="condenseSql" type="xs:boolean" default="true"/>
+      <xs:attribute name="preserveWhitespace" type="xs:boolean" 
default="false"/>
                        <xs:attribute name="remapResults">        
                                <xs:simpleType>
                                        <xs:restriction base="xs:NMTOKEN">
@@ -216,7 +216,7 @@
                        <xs:attribute name="parameterMap" type="xs:string"/>
                        <xs:attribute name="resultClass" type="xs:string"/>
                        <xs:attribute name="sqlSource" type="xs:string"/>
-      <xs:attribute name="condenseSql" type="xs:boolean" default="true"/>
+      <xs:attribute name="preserveWhitespace" type="xs:boolean" 
default="false"/>
                        <xs:attribute name="remapResults">
                                <xs:simpleType>
                                        <xs:restriction base="xs:NMTOKEN">
@@ -725,7 +725,7 @@
                        <xs:attribute name="listClass" type="xs:string"/>
                        <xs:attribute name="extends" type="xs:string"/>
                        <xs:attribute name="sqlSource" type="xs:string"/>
-      <xs:attribute name="condenseSql" type="xs:boolean" default="true"/>
+      <xs:attribute name="preserveWhitespace" type="xs:boolean" 
default="false"/>
                        <xs:attribute name="remapResults">
                                <xs:simpleType>
                                        <xs:restriction base="xs:NMTOKEN">
@@ -751,7 +751,7 @@
                                        </xs:attribute>
                                        <xs:attribute name="resultClass" 
type="xs:string" use="required"/>
                                        <xs:attribute name="sqlSource" 
type="xs:string"/>
-          <xs:attribute name="condenseSql" type="xs:boolean" default="true"/>
+          <xs:attribute name="preserveWhitespace" type="xs:boolean" 
default="false"/>
                                </xs:extension>
                        </xs:simpleContent>
                </xs:complexType>
@@ -821,7 +821,7 @@
                        <xs:attribute name="listClass" type="xs:string"/>
                        <xs:attribute name="cacheModel" type="xs:string"/>
                        <xs:attribute name="sqlSource" type="xs:string"/>
-      <xs:attribute name="condenseSql" type="xs:boolean" default="true"/>
+      <xs:attribute name="preserveWhitespace" type="xs:boolean" 
default="false"/>
                        <xs:attribute name="remapResults">
                                <xs:simpleType>
                                        <xs:restriction base="xs:NMTOKEN">
@@ -878,7 +878,7 @@
                        <xs:attribute name="parameterClass" type="xs:string"/>
                        <xs:attribute name="extends" type="xs:string"/>
                        <xs:attribute name="sqlSource" type="xs:string"/>
-      <xs:attribute name="condenseSql" type="xs:boolean" default="true"/>
+      <xs:attribute name="preserveWhitespace" type="xs:boolean" 
default="false"/>
                        <xs:attribute name="remapResults">
                                <xs:simpleType>
                                        <xs:restriction base="xs:NMTOKEN">

Modified: ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/SqlMapConfig.xsd
URL: 
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/SqlMapConfig.xsd?rev=789119&r1=789118&r2=789119&view=diff
==============================================================================
--- ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/SqlMapConfig.xsd (original)
+++ ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/SqlMapConfig.xsd Sun Jun 28 
16:11:37 2009
@@ -86,7 +86,7 @@
                        <xs:attribute name="useEmbedStatementParams" 
type="xs:boolean" default="false"/>
                        <xs:attribute name="useReflectionOptimizer" 
type="xs:boolean" default="true"/>
                        <xs:attribute name="commandTimeout" 
type="xs:positiveInteger"/>
-                       <xs:attribute name="condenseSql" type="xs:boolean" 
default="true"/>
+                       <xs:attribute name="preserveWhitespace" 
type="xs:boolean" default="false"/>
                </xs:complexType>
        </xs:element>
        <xs:element name="settings">


Reply via email to