Exemplo n.º 1
0
 /// <summary>
 /// Constructor for creating a unique constraint on a single column that is marked unique.
 /// </summary>
 /// <param name="table"></param>
 /// <param name="column"></param>
 internal ConstraintInfo(TableInfo table, ColumnInfo column)
     : this("UQ_", table.Name, new [] { column })
 {
 }
Exemplo n.º 2
0
		/// <summary>
		/// Constructor for creating a unique constraint on a single column that is marked unique.
		/// </summary>
		/// <param name="table"></param>
		/// <param name="column"></param>
		internal ConstraintInfo(TableInfo table, ColumnInfo column)
			: this("UQ_", table.Name, new [] { column })
		{
		}
Exemplo n.º 3
0
		/// <summary>
		/// Returns true if this column matches that, property for property.
		/// </summary>
		/// <param name="that"></param>
		/// <returns></returns>
		public bool Matches(ColumnInfo that)
		{
			return this.Name == that.Name
                // for backwards compatability reasons with NH pre 2.0, treat (-1) as a wildcard (ie "no length" or "any length")
				&& (this.Length == that.Length || this.Length == -1 || that.Length == -1)
				&& this.Nullable == that.Nullable
				&& this.SqlType == that.SqlType;
		}