当前位置: 首页>>代码示例>>C#>>正文


C# Dialect.GetTypeName方法代码示例

本文整理汇总了C#中Dialect.GetTypeName方法的典型用法代码示例。如果您正苦于以下问题:C# Dialect.GetTypeName方法的具体用法?C# Dialect.GetTypeName怎么用?C# Dialect.GetTypeName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dialect的用法示例。


在下文中一共展示了Dialect.GetTypeName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SqlCreateStrings

		public virtual string[] SqlCreateStrings(Dialect.Dialect dialect)
		{
			return new String[]
			       	{
			       		"create table " + tableName + " ( " + valueColumnName + " " + dialect.GetTypeName(SqlTypeFactory.Int64)
			       		+ " )", "insert into " + tableName + " values ( " + initialValue + " )"
			       	};
		}
开发者ID:renefc3,项目名称:nhibernate,代码行数:8,代码来源:TableStructure.cs

示例2: SqlCreateStrings

		public virtual string[] SqlCreateStrings(Dialect.Dialect dialect)
		{
			string createString = dialect.CreateTableString + " " + TableName
				+ " ( "
				+ SegmentColumnName + " " + dialect.GetTypeName(SqlTypes.SqlTypeFactory.GetAnsiString(SegmentValueLength)) + " not null, "
				+ ValueColumnName + " " + dialect.GetTypeName(SqlTypes.SqlTypeFactory.Int64) + ", "
				+ dialect.PrimaryKeyString + " ( " + SegmentColumnName + ") "
				+ ")";

			return new string[] { createString };
		}
开发者ID:nhibernate,项目名称:nhibernate-core,代码行数:11,代码来源:TableGenerator.cs

示例3: GetSqlType

 /// <summary>
 /// Gets the SQL type of this column.
 /// Returned type will be the SqlType, or be looked up by the Type property if SqlType is not set.
 /// </summary>
 public String GetSqlType(Dialect dialect)
 {
     return SqlType == null ? dialect.GetTypeName(DbType, Length, Precision, Scale) : SqlType;
 }
开发者ID:longshine,项目名称:EasyDb.NET,代码行数:8,代码来源:Mapping.cs

示例4: GetDialectTypeName

		private string GetDialectTypeName(Dialect.Dialect dialect, IMapping mapping)
		{
			if (IsCaracteristicsDefined())
			{
				// NH-1070 (the size should be 0 if the precision is defined)
				return dialect.GetTypeName(GetSqlTypeCode(mapping), (!IsPrecisionDefined()) ? Length:0, Precision, Scale);
			}
			else
				return dialect.GetTypeName(GetSqlTypeCode(mapping));
		}
开发者ID:NikGovorov,项目名称:nhibernate-core,代码行数:10,代码来源:Column.cs

示例5: GetSqlType

		/// <summary>
		/// Gets the name of the data type for the column.
		/// </summary>
		/// <param name="dialect">The <see cref="Dialect.Dialect"/> to use to get the valid data types.</param>
		/// <param name="mapping"></param>
		/// <returns>
		/// The name of the data type for the column. 
		/// </returns>
		/// <remarks>
		/// If the mapping file contains a value of the attribute <c>sql-type</c> this will
		/// return the string contained in that attribute.  Otherwise it will use the 
		/// typename from the <see cref="Dialect.Dialect"/> of the <see cref="SqlType"/> object. 
		/// </remarks>
		public string GetSqlType(Dialect.Dialect dialect, IMapping mapping)
		{
			if (sqlType == null)
			{
				SqlType sqlTypeObject = GetAutoSqlType(mapping);
				if (Length != DefaultPropertyLength)
				{
					return dialect.GetTypeName(sqlTypeObject, Length);
				}
				else
				{
					return dialect.GetTypeName(sqlTypeObject);
				}
			}
			else
			{
				return sqlType;
			}
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:32,代码来源:Column.cs

示例6: SqlCreateStrings

		/// <summary>
		/// The SQL required to create the database objects for a TableGenerator.
		/// </summary>
		/// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with creating the sql.</param>
		/// <returns>
		/// An array of <see cref="String"/> objects that contain the Dialect specific sql to 
		/// create the necessary database objects and to create the first value as <c>1</c> 
		/// for the TableGenerator.
		/// </returns>
		public string[ ] SqlCreateStrings( Dialect.Dialect dialect )
		{
			// changed the first value to be "1" by default since an uninitialized Int32 is 0 - leaving
			// it at 0 would cause problems with an unsaved-value="0" which is what most people are 
			// defaulting <id>'s with Int32 types at.
			return new string[ ]
				{
					"create table " + tableName + " ( " + columnName + " " + dialect.GetTypeName( SqlTypeFactory.GetInt32() ) + " )",
					"insert into " + tableName + " values ( 1 )"
				};
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:20,代码来源:TableGenerator.cs

示例7: GetDialectTypeName

 private string GetDialectTypeName(Dialect.Dialect dialect, IMapping mapping)
 {
     if (IsCaracteristicsDefined())
         return dialect.GetTypeName(GetSqlTypeCode(mapping), Length, Precision, Scale);
     else
         return dialect.GetTypeName(GetSqlTypeCode(mapping));
 }
开发者ID:zibler,项目名称:zibler,代码行数:7,代码来源:Column.cs


注:本文中的Dialect.GetTypeName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。