This class maps a DbType to names.

Namespace:  NHibernate.Dialect
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
Public Class TypeNames
C#
public class TypeNames
Visual C++
public ref class TypeNames
JavaScript
NHibernate.Dialect.TypeNames = function();

Type.createClass(
	'NHibernate.Dialect.TypeNames');

Remarks

Associations may be marked with a capacity. Calling the Get() method with a type and actual size n will return the associated name with smallest capacity >= n, if available and an unmarked default type otherwise. Eg, setting
 Copy Code
            	Names.Put(DbType,			"TEXT" );
            	Names.Put(DbType,	255,	"VARCHAR($1)" );
            	Names.Put(DbType,	65534,	"LONGVARCHAR($1)" );
            
will give you back the following:
 Copy Code
            	Names.Get(DbType)			// --> "TEXT" (default)
            	Names.Get(DbType,100)		// --> "VARCHAR(100)" (100 is in [0:255])
            	Names.Get(DbType,1000)	// --> "LONGVARCHAR(1000)" (100 is in [256:65534])
            	Names.Get(DbType,100000)	// --> "TEXT" (default)
            
On the other hand, simply putting
 Copy Code
            	Names.Put(DbType, "VARCHAR($1)" );
            
would result in
 Copy Code
            	Names.Get(DbType)			// --> "VARCHAR($1)" (will cause trouble)
            	Names.Get(DbType,100)		// --> "VARCHAR(100)" 
            	Names.Get(DbType,1000)	// --> "VARCHAR(1000)"
            	Names.Get(DbType,10000)	// --> "VARCHAR(10000)"
            

Inheritance Hierarchy

System..::.Object
  NHibernate.Dialect..::.TypeNames

See Also