⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 columnmetadata.cs

📁 NHibernate NET开发者所需的
💻 CS
字号:
namespace NHibernate.Tool.hbm2ddl
{
	using System;
	using System.Data;
	using Util;

	public class ColumnMetadata
	{
		private readonly String name;
		private readonly String typeName;
		private readonly int columnSize;
		private readonly int numericalPrecision;
		private readonly String isNullable;

		public ColumnMetadata(DataRow rs)
		{
			name = (string) rs["COLUMN_NAME"];
			if (rs["CHARACTER_MAXIMUM_LENGTH"]!=DBNull.Value)
				columnSize = (int)rs["CHARACTER_MAXIMUM_LENGTH"];
			if (rs["NUMERIC_PRECISION"] != DBNull.Value)
				numericalPrecision = Convert.ToInt32(rs["NUMERIC_PRECISION"]);
			isNullable = (string) rs["IS_NULLABLE"];
			typeName = (string)rs["DATA_TYPE"];
		}

		public string Name
		{
			get { return name; }
		}

		public string TypeName
		{
			get { return typeName; }
		}

		public int ColumnSize
		{
			get { return columnSize; }
		}

		public int NumericalPrecision
		{
			get { return numericalPrecision; }
		}

		public string Nullable
		{
			get { return isNullable; }
		}

		public override String ToString()
		{
			return "ColumnMetadata(" + name + ')';
		}

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -