Represents a default value for a column
Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Column" /> class.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="type">The type.</param>
        /// <param name="null">if set to <c>true</c> [null].</param>
        /// <param name="default">The default.</param>
        public Column(string name, ColumnTypes type, bool @null, Default @default)
        {
			Name = name;
			Type = type;
			Default = @default;
            Nullable = @null;
		}
Пример #2
0
 public void GetSet_Default()
 {
     var test = new Column();
     var d = new Default("", "");
     test.Default = d;
     Assert.Equal(d, test.Default);
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Column" /> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 /// <param name="precision">The precision.</param>
 /// <param name="scale">The scale.</param>
 /// <param name="null">if set to <c>true</c> [null].</param>
 /// <param name="default">The default.</param>
 public Column(string name, ColumnTypes type, byte precision, int scale, bool @null, Default @default)
     : this(name, type, @null, @default)
 {
     Precision = precision;
     Scale     = scale;
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Column" /> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 /// <param name="length">The length.</param>
 /// <param name="null">if set to <c>true</c> [null].</param>
 /// <param name="default">The default.</param>
 public Column(string name, ColumnTypes type, int length, bool @null, Default @default)
     : this(name, type, @null, @default)
 {
     Length = length;
 }
Пример #5
0
 public void Script()
 {
     var test = new Default("test", "test1");
     Assert.Contains("test", test.Script());
     Assert.Contains("test1", test.Script());
 }
Пример #6
0
 public void Default()
 {
     var test = new Default("test", "test1");
     Assert.Equal("test", test.Name);
     Assert.Equal("test1", test.Value);
 }
Пример #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Column" /> class.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="type">The type.</param>
        /// <param name="precision">The precision.</param>
        /// <param name="scale">The scale.</param>
        /// <param name="null">if set to <c>true</c> [null].</param>
        /// <param name="default">The default.</param>
        public Column(string name, ColumnTypes type, byte precision, int scale, bool @null, Default @default)
			: this(name, type, @null, @default) 
        {
			Precision = precision;
			Scale = scale;
		}
Пример #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Column" /> class.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="type">The type.</param>
        /// <param name="length">The length.</param>
        /// <param name="null">if set to <c>true</c> [null].</param>
        /// <param name="default">The default.</param>
        public Column(string name, ColumnTypes type, int length, bool @null, Default @default)
			: this(name, type, @null, @default) 
        {
			Length = length;
		}