Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
21 | 2 | 3 | 0.989 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 21 | 34 | src/NHibernate.Test/Legacy/SQLLoaderTest.cs |
2 | 22 | 57 | src/NHibernate.Test/Legacy/SQLLoaderTest.cs |
| ||||
[Test] public void TS() { if (Dialect is Oracle8iDialect) { return; } ISession session = OpenSession(); ITransaction txn = session.BeginTransaction(); Simple sim = new Simple(); sim.Date = DateTime.Today; // NB We don't use Now() due to the millisecond alignment problem with SQL Server session.Save(sim, 1L); IQuery q = session.CreateSQLQuery("select {sim.*} from Simple {sim} where {sim}.date_ = ?"). AddEntity("sim", typeof(Simple)); q.SetTimestamp(0, sim.Date); Assert.AreEqual(1, q.List().Count, "q.List.Count"); session.Delete(sim); txn.Commit(); session.Close(); } |
| ||||
[Test] public void TSNamed() { if (Dialect is Oracle8iDialect) { return; } ISession session = OpenSession(); ITransaction txn = session.BeginTransaction(); Simple sim = new Simple(); sim.Date = DateTime.Today; // NB We don't use Now() due to the millisecond alignment problem with SQL Server session.Save(sim, 1L); IQuery q = session.CreateSQLQuery("select {sim.*} from Simple {sim} where {sim}.date_ = :fred"). AddEntity("sim", typeof(Simple)); q.SetTimestamp("fred", sim.Date); Assert.AreEqual(1, q.List().Count, "q.List.Count"); session.Delete(sim); txn.Commit(); session.Close(); } |
| |||
[Test] public void [[#variable67b214c0]]() { if (Dialect is Oracle8iDialect) { return; } ISession session = OpenSession(); ITransaction txn = session.BeginTransaction(); Simple sim = new Simple(); sim.Date = DateTime.Today; // NB We don't use Now() due to the millisecond alignment problem with SQL Server session.Save(sim, 1L); IQuery q = session.CreateSQLQuery( [[#variable67b213a0]]).AddEntity("sim", typeof(Simple)); q.SetTimestamp( [[#variable67b21320]], sim.Date); Assert.AreEqual(1, q.List().Count, "q.List.Count"); session.Delete(sim); txn.Commit(); session.Close(); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#67b214c0]] | TS |
1 | 2 | [[#67b214c0]] | TSNamed |
2 | 1 | [[#67b213a0]] | "select {sim.*} from Simple {sim} where {sim}.date_ = ?" |
2 | 2 | [[#67b213a0]] | "select {sim.*} from Simple {sim} where {sim}.date_ = :fred" |
3 | 1 | [[#67b21320]] | 0 |
3 | 2 | [[#67b21320]] | "fred" |