| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 9 | 2 | 3 | 0.983 | statement_list[5] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 9 | 32 | src/NHibernate.Test/DialectTest/MsSqlDialectFixture.cs |
| 2 | 9 | 54 | src/NHibernate.Test/DialectTest/MsSqlDialectFixture.cs |
| ||||
Assert.AreEqual("select top 100 id, col1, col2 from someTable", limitedSql.ToString(),
"Bad limit SQL");
// test when building with SqlParts
builder = new SqlStringBuilder();
builder.Add("select").Add(" id, col1, col2 ").Add("from someTable");
limitedSql = d.GetLimitString(builder.ToSqlString(), 0, 100);
Assert.AreEqual("select top 100 id, col1, col2 from someTable", limitedSql.ToString(),
"Bad limit SQL");
|
| ||||
Assert.AreEqual("select distinct top 100 id, col1, col2 from someTable", limitedSql.ToString(),
"Bad limit SQL");
// now with parts
builder = new SqlStringBuilder();
builder.Add("select").Add(" distinct").Add(" id, col1, col2 from someTable");
limitedSql = d.GetLimitString(builder.ToSqlString(), 0, 100);
Assert.AreEqual("select distinct top 100 id, col1, col2 from someTable", limitedSql.ToString(),
"Bad limit SQL");
|
| |||
Assert.AreEqual( [[#variable6f4b3be0]], limitedSql.ToString(), "Bad limit SQL");
// test when building with SqlParts
// now with parts
builder = new SqlStringBuilder();
builder.Add("select").Add( [[#variable6f4b3240]]).Add( [[#variable6f4b3a00]]);
limitedSql = d.GetLimitString(builder.ToSqlString(), 0, 100);
Assert.AreEqual( [[#variable6f4b3be0]], limitedSql.ToString(), "Bad limit SQL");
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#6f4b3be0]] | "select top 100 id, col1, col2 from someTable" |
| 1 | 2 | [[#6f4b3be0]] | "select distinct top 100 id, col1, col2 from someTable" |
| 2 | 1 | [[#6f4b3240]] | " id, col1, col2 " |
| 2 | 2 | [[#6f4b3240]] | " distinct" |
| 3 | 1 | [[#6f4b3a00]] | "from someTable" |
| 3 | 2 | [[#6f4b3a00]] | " id, col1, col2 from someTable" |