Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
7 | 2 | 3 | 0.963 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 7 | 87 | src/NHibernate/Mapping/ForeignKey.cs |
2 | 6 | 76 | src/NHibernate/Mapping/PrimaryKey.cs |
| ||||
#region IRelationalModel Memebers /// <summary> /// Get the SQL string to drop this Constraint in the database. /// </summary> /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> /// <param name="defaultSchema"></param> /// <param name="defaultCatalog"></param> /// <returns> /// A string that contains the SQL to drop this Constraint. /// </returns> public override string SqlDropString(Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) { string ifExists = dialect.GetIfExistsDropConstraint(Table, Name); string drop = string.Format("alter table {0} {1}", Table.GetQualifiedName(dialect, defaultCatalog, defaultSchema), dialect.GetDropForeignKeyConstraintString(Name)); string end = dialect.GetIfExistsDropConstraintEnd(Table, Name); return ifExists + System.Environment.NewLine + drop + System.Environment.NewLine + end; } |
| ||||
#region IRelationalModel Members /// <summary> /// Get the SQL string to drop this Constraint in the database. /// </summary> /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> /// <param name="defaultCatalog"></param> /// <param name="defaultSchema"></param> /// <returns> /// A string that contains the SQL to drop this Constraint. /// </returns> public override string SqlDropString(Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) { string ifExists = dialect.GetIfExistsDropConstraint(Table, Name); string drop = string.Format("alter table {0}{1}", Table.GetQualifiedName(dialect, defaultCatalog, defaultSchema), dialect.GetDropPrimaryKeyConstraintString(Name)); string end = dialect.GetIfExistsDropConstraintEnd(Table, Name); return ifExists + Environment.NewLine + drop + Environment.NewLine + end; } |
| |||
#region IRelationalModel Memebers #region IRelationalModel Members /// <summary> /// Get the SQL string to drop this Constraint in the database. /// </summary> /// <param name="dialect">The <see cref="Dialect.Dialect"/> to use for SQL rules.</param> /// <param name="defaultSchema"></param> /// <param name="defaultCatalog"></param> /// <param name="defaultSchema"></param> /// <returns> /// A string that contains the SQL to drop this Constraint. /// </returns> public override string SqlDropString(Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) { string ifExists = dialect.GetIfExistsDropConstraint(Table, Name); string drop = string.Format( [[#variable700a6100]], Table.GetQualifiedName(dialect, defaultCatalog, defaultSchema), dialect. [[#variable673b3700]](Name)); string end = dialect.GetIfExistsDropConstraintEnd(Table, Name); return ifExists + [[#variable50f0ee60]].NewLine + drop + [[#variable50f0ee60]].NewLine + end; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#700a6100]] | "alter table {0} {1}" |
1 | 2 | [[#700a6100]] | "alter table {0}{1}" |
2 | 1 | [[#673b3700]] | GetDropForeignKeyConstraintString |
2 | 2 | [[#673b3700]] | GetDropPrimaryKeyConstraintString |
3 | 1 | [[#50f0ee60]] | System.Environment |
3 | 2 | [[#50f0ee60]] | Environment |