Represents a default value for a column
コード例 #1
0
 public void GetSet_Default()
 {
     var test = new Column();
     var d = new Default("", "");
     test.Default = d;
     Assert.Equal(d, test.Default);
 }
コード例 #2
0
ファイル: Column.cs プロジェクト: blehnen/DotNetWorkQueue
        /// <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;
		}
コード例 #3
0
 public void Script()
 {
     var test = new Default("test", "test1");
     Assert.Contains("test", test.Script());
     Assert.Contains("test1", test.Script());
 }
コード例 #4
0
 public void Default()
 {
     var test = new Default("test", "test1");
     Assert.Equal("test", test.Name);
     Assert.Equal("test1", test.Value);
 }
コード例 #5
0
ファイル: Column.cs プロジェクト: blehnen/DotNetWorkQueue
        /// <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;
		}
コード例 #6
0
ファイル: Column.cs プロジェクト: blehnen/DotNetWorkQueue
        /// <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;
		}
コード例 #7
0
ファイル: Column.cs プロジェクト: zephyrInk/DotNetWorkQueue
 /// <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
ファイル: Column.cs プロジェクト: zephyrInk/DotNetWorkQueue
 /// <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;
 }