This class contains information about a Spotfire data type and the properties of that data type. This is an enumeration class with one static instance for each of the supported data types.

2.0

Hierarchy (view full)

Methods

  • Casts this object to the specified type. Throws error on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns T1

  • Determines whether the specified object is equal to the current object.

    Parameters

    • obj: any

      The object to compare with the current object.

    Returns boolean

    true if the specified object is equal to the current object; otherwise, false.

  • Serves as the default hash function.

    Returns number

    A hash code for the current object.

  • Returns a string that represents the current object.

    Returns string

    A string that represents the current object.

  • Casts this object to the specified type. Returns null on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns null | T1

  • Determines whether the specified object instances are considered equal.

    Parameters

    • objA: any

      The first object to compare.

    • objB: any

      The second object to compare.

    Returns boolean

    true if the objects are considered equal; otherwise, false. If both objA and objB are null, the method returns true.

Default capability

Binary: DataType

Binary type.

2.0

Boolean: DataType

Boolean type.

2.0

Currency: DataType

Currency type.

2.0

Date: DataType

Date type.

2.0

DateTime: DataType

DateTime type (both date and a time stamp).

2.0

Integer: DataType

Integer type.

2.0

LongInteger: DataType

Long integer type.

2.0

Real: DataType

Real (double) type.

2.0

SingleReal: DataType

Short Real (float) type.

2.0

String: DataType

String type.

2.0

Time: DataType

Timestamp type (not including date).

2.0

TimeSpan: DataType

Time span type.

2.0

Undefined: DataType

Undefined type. This is not a real data type but can be used in some places when any type is acceptable.

2.0

  • get DefaultValue(): unknown
  • Gets the default value for the underlying type.

    Returns unknown

    2.0

  • get InvariantFormatter(): DataFormatterBase
  • Gets a read-only formatter for this data type that does invariant formatting. This formatting is independent of localization and uses System.Globalization.CultureInfo.InvariantCulture.

    Returns DataFormatterBase

    2.0

  • get IsNumeric(): boolean
  • Gets a value indicating whether the data type is numeric or not, that is, Integer, Currency, Real, LongInteger or SingleReal

    Returns boolean

    2.0

  • get IsSimple(): boolean
  • Gets a value indicating whether the data type is considered simple or not. E.g. String and int (etc) are simple, Binary is not.

    Returns boolean

    2.0

  • get IsTime(): boolean
  • Gets a value indicating whether the data type represents time or not, that is, Date, Time or DateTime.

    Returns boolean

    2.0

  • get Name(): string
  • Gets the type name.

    Returns string

    2.0

  • get NullValue(): unknown
  • Gets a null (empty) value for the underlying type.

    Returns unknown

    2.0

  • get RepresentationType(): Type
  • Gets the representation type of the data type. This is the .NET type that values of this data type are stored as.

    Returns Type

    2.0

  • Validates a value with the representation type.

    Parameters

    • value: any

      The value to validate.

    • error: OutParam<String>

      Contains an error description if the result was false.

    Returns boolean

    true if the value is valid; otherwise false.

    2.0

  • Converts a DataSourceDataType to a DataType.

    Parameters

    Returns DataType

    The DataType.

    2.0

  • Converts the type from an import source to the DataType used in the Data Manager.

    Parameters

    • type: Type

      The import source .Net-type.

    Returns DataType

    The converted DataType, DataType.Undefined if no conversion was possible.

    2.0

  • Looks up a data type by name.

    Parameters

    • name: string | String

      The type name.

    Returns DataType

    The data type.

    2.0

  • Converts a value from a numeric (double) representation, to the value representation defined by dataType.

    Parameters

    • numericValue: number | Double

      A numeric value.

    • value: OutParam<System.Object>

      The converted value.

    • dataType: DataType

      A data type that determines the type of the converted value.

    Returns boolean

    true if conversion was possible; otherwise false.

    2.0

  • Converts a value to a numeric (double) representation.

    Parameters

    • value: any

      A value of any type.

    • numericValue: OutParam<Double>

      The converted numeric value.

    Returns boolean

    true if conversion was possible; otherwise false.

    2.0