Skip to content

Commit 0a48479

Browse files
author
richard.waspcroft@gmail.com
committed
RJB: Added "bind" element and ability to compare against the current item within a nested iteration.
1 parent f2bce52 commit 0a48479

39 files changed

+3721
-2929
lines changed

src/MyBatis.Common/MyBatis.Common.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@
295295
<Compile Include="Utilities\ScriptRunner.cs">
296296
<SubType>Code</SubType>
297297
</Compile>
298+
<Compile Include="Utilities\StringHandler.cs" />
298299
<Compile Include="Utilities\StringTokenizer.cs">
299300
<SubType>Code</SubType>
300301
</Compile>

src/MyBatis.Common/Resources/CustomUriBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public Uri Uri
6666
/// <param name="resourceUri">The specified path or fragment identifier</param>
6767
/// <param name="basePath">The base directory</param>
6868
/// <exception cref="ResourceException">Thrown when the resource doesn't exist for the supplied URI</exception>
69+
[System.Diagnostics.DebuggerStepThrough]
6970
public CustomUriBuilder(string resourceUri, string basePath)
7071
{
7172
string originalResourceName = resourceUri;

src/MyBatis.DataMapper.Sqlite.Test/MyBatis.DataMapper.Sqlite.Test.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@
9393
<Compile Include="Domain\Category.cs" />
9494
<Compile Include="Domain\Child.cs" />
9595
<Compile Include="Domain\Complex.cs" />
96+
<Compile Include="Domain\ComplexStructure\ColumnDataTypeEnum.cs" />
97+
<Compile Include="Domain\ComplexStructure\CustomField.cs" />
98+
<Compile Include="Domain\ComplexStructure\Compare.cs" />
99+
<Compile Include="Domain\ComplexStructure\DateCompare.cs" />
100+
<Compile Include="Domain\ComplexStructure\Filter.cs" />
101+
<Compile Include="Domain\ComplexStructure\Operator.cs" />
102+
<Compile Include="Domain\ComplexStructure\Rules.cs" />
96103
<Compile Include="Domain\Coupon.cs" />
97104
<Compile Include="Domain\CustomInheritance.cs" />
98105
<Compile Include="Domain\D.cs" />
@@ -134,6 +141,7 @@
134141
<Compile Include="Domain\User.cs" />
135142
<Compile Include="Fixtures\BaseTest.cs" />
136143
<Compile Include="Fixtures\CodeConfigurationInterpreterTestFixture.cs" />
144+
<Compile Include="Fixtures\ComplexBindNestedIterateTestFixture.cs" />
137145
<Compile Include="Fixtures\DefaultModelBuilderTest.cs" />
138146
<Compile Include="Fixtures\Mapping\CacheTest.cs" />
139147
<Compile Include="Fixtures\Modules\AccountModule.cs" />
@@ -153,6 +161,8 @@
153161
<Content Include="Maps\Category.xml" />
154162
<Content Include="Maps\Complex.xml" />
155163
<Content Include="Maps\ConstructorInjection.xml" />
164+
<Content Include="Maps\SQLiteLineItem.xml" />
165+
<Content Include="Maps\SQLiteCategory.xml" />
156166
<Content Include="Maps\Coupons.xml" />
157167
<Content Include="Maps\Document.xml" />
158168
<Content Include="Maps\DocumentModule.xml" />
@@ -165,10 +175,12 @@
165175
<Content Include="Maps\Iterate.xml" />
166176
<Content Include="Maps\LineItem.xml" />
167177
<Content Include="Maps\Mapping1.xml" />
178+
<Content Include="Scripts\nested-iterate.sql" />
168179
<EmbeddedResource Include="Maps\Mapping2.xml" />
169180
<Content Include="Maps\Mapping3.xml" />
170181
<Content Include="Maps\Mapping4.xml" />
171182
<EmbeddedResource Include="Maps\Mapping5.xml" />
183+
<Content Include="Maps\ComplexBindNestedIterate.xml" />
172184
<Content Include="Maps\NewsPaper.xml" />
173185
<Content Include="Maps\Nullable.xml" />
174186
<Content Include="Maps\Order.xml" />
Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<sqlMapConfig xmlns="http://ibatis.apache.org/dataMapper"
2+
<sqlMapConfig xmlns="http://ibatis.apache.org/dataMapper"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
4-
<settings>
5-
<setting useStatementNamespaces="true"/>
6-
<setting cacheModelsEnabled="false"/>
7-
<setting validateSqlMap="false"/>
8-
<setting useReflectionOptimizer="false"/>
9-
<setting preserveWhitespace="false"/>
10-
</settings>
11-
<providers uri="file://providers.config"/>
12-
<database>
13-
<provider name="SQLite3"/>
14-
<dataSource name="ibatisnet.sqlmap" connectionString="Data Source=ibatisnet.sqlite;Version=3;"/>
15-
</database>
16-
<alias>
17-
<typeAlias alias="Account" type="MyBatis.DataMapper.Sqlite.Test.Domain.Account, MyBatis.DataMapper.Sqlite.Test"/>
18-
<typeAlias alias="OuiNonBool" type="MyBatis.DataMapper.Sqlite.Test.Domain.OuiNonBoolTypeHandlerCallback, MyBatis.DataMapper.Sqlite.Test"/>
19-
</alias>
20-
<sqlMaps>
21-
<sqlMap uri="file://../../Maps/Account.xml"/>
22-
<sqlMap uri="file://../../Maps/DynamicAccount.xml"/>
23-
<sqlMap uri="file://../../Maps/Order.xml"/>
24-
<sqlMap uri="file://../../Maps/Category.xml"/>
25-
<sqlMap uri="file://../../Maps/Complex.xml"/>
26-
<sqlMap uri="file://../../Maps/LineItem.xml"/>
27-
<sqlMap uri="file://../../Maps/Enumeration.xml"/>
28-
<sqlMap uri="file://../../Maps/Other.xml"/>
29-
<sqlMap uri="file://../../Maps/ParameterClass.xml"/>
30-
<sqlMap uri="file://../../Maps/ResultClass.xml"/>
31-
<sqlMap uri="file://../../Maps/NewsPaper.xml"/>
32-
<sqlMap uri="file://../../Maps/Document.xml"/>
33-
<sqlMap uri="file://../../Maps/EmbedParameter.xml"/>
34-
<sqlMap uri="file://../../Maps/Nullable.xml"/>
35-
<sqlMap uri="file://../../Maps/Simple.xml"/>
36-
<sqlMap uri="file://../../Maps/ConstructorInjection.xml"/>
37-
<sqlMap uri="file://../../Maps/GroupByMapping.xml"/>
38-
<sqlMap uri="file://../../Maps/Coupons.xml"/>
39-
<sqlMap uri="file://../../Maps/ParentChild1.xml"/>
40-
<sqlMap uri="file://../../Maps/ParentChild2.xml"/>
41-
<sqlMap uri="file://../../Maps/Iterate.xml"/>
42-
</sqlMaps>
4+
<settings>
5+
<setting useStatementNamespaces="true"/>
6+
<setting cacheModelsEnabled="false"/>
7+
<setting validateSqlMap="false"/>
8+
<setting useReflectionOptimizer="false"/>
9+
<setting preserveWhitespace="false"/>
10+
</settings>
11+
<providers uri="file://providers.config"/>
12+
<database>
13+
<provider name="SQLite3"/>
14+
<dataSource name="ibatisnet.sqlmap" connectionString="Data Source=ibatisnet.sqlite;Version=3;"/>
15+
</database>
16+
<alias>
17+
<typeAlias alias="Account" type="MyBatis.DataMapper.Sqlite.Test.Domain.Account, MyBatis.DataMapper.Sqlite.Test"/>
18+
<typeAlias alias="OuiNonBool" type="MyBatis.DataMapper.Sqlite.Test.Domain.OuiNonBoolTypeHandlerCallback, MyBatis.DataMapper.Sqlite.Test"/>
19+
</alias>
20+
<sqlMaps>
21+
<sqlMap uri="file://../../Maps/Account.xml"/>
22+
<sqlMap uri="file://../../Maps/DynamicAccount.xml"/>
23+
<sqlMap uri="file://../../Maps/Order.xml"/>
24+
<sqlMap uri="file://../../Maps/SQLiteCategory.xml"/>
25+
<sqlMap uri="file://../../Maps/Complex.xml"/>
26+
<sqlMap uri="file://../../Maps/SQLiteLineItem.xml"/>
27+
<sqlMap uri="file://../../Maps/Enumeration.xml"/>
28+
<sqlMap uri="file://../../Maps/Other.xml"/>
29+
<sqlMap uri="file://../../Maps/ParameterClass.xml"/>
30+
<sqlMap uri="file://../../Maps/ResultClass.xml"/>
31+
<sqlMap uri="file://../../Maps/NewsPaper.xml"/>
32+
<sqlMap uri="file://../../Maps/Document.xml"/>
33+
<sqlMap uri="file://../../Maps/EmbedParameter.xml"/>
34+
<sqlMap uri="file://../../Maps/Nullable.xml"/>
35+
<sqlMap uri="file://../../Maps/Simple.xml"/>
36+
<sqlMap uri="file://../../Maps/ConstructorInjection.xml"/>
37+
<sqlMap uri="file://../../Maps/GroupByMapping.xml"/>
38+
<sqlMap uri="file://../../Maps/Coupons.xml"/>
39+
<sqlMap uri="file://../../Maps/ParentChild1.xml"/>
40+
<sqlMap uri="file://../../Maps/ParentChild2.xml"/>
41+
<sqlMap uri="file://../../Maps/Iterate.xml"/>
42+
<sqlMap uri="file://../../Maps/ComplexBindNestedIterate.xml"/>
43+
</sqlMaps>
4344
</sqlMapConfig>

0 commit comments

Comments
 (0)