Table of Contents

Class DatabaseType

Namespace
LinqToDB.Schema
Assembly
linq2db.Tools.dll

Database type descriptor.

public sealed record DatabaseType : IEquatable<DatabaseType>
Inheritance
DatabaseType
Implements
Extension Methods

Remarks

While for some types some databases provide Length, Precision or Scale values, this descriptor include values for those properties only if they are part of type definition in SQL and not equal to default value for this type (in cases when such values could be ommited from type definition).

Type nullability also not included here, as it is a property of typed object.

Constructors

DatabaseType(string?, int?, int?, int?)

Database type descriptor.

public DatabaseType(string? Name, int? Length, int? Precision, int? Scale)

Parameters

Name string

Type name.

Length int?

Optional type length.

Precision int?

Optional type precision.

Scale int?

Optional type scale.

Remarks

While for some types some databases provide Length, Precision or Scale values, this descriptor include values for those properties only if they are part of type definition in SQL and not equal to default value for this type (in cases when such values could be ommited from type definition).

Type nullability also not included here, as it is a property of typed object.

Properties

Length

Optional type length.

public int? Length { get; init; }

Property Value

int?

Name

Type name.

public string? Name { get; init; }

Property Value

string

Precision

Optional type precision.

public int? Precision { get; init; }

Property Value

int?

Scale

Optional type scale.

public int? Scale { get; init; }

Property Value

int?

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.