Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DataTypes

Diffusion datatype implementations.

Datatypes are accessed via the diffusion singleton.

Example:

// Get the JSON datatype
var json = diffusion.datatypes.json();

Example:

// Get a datatype via name
var json = diffusion.datatypes.get('json');
namespace

diffusion.datatypes

since

5.7

Hierarchy

  • DataTypes

Implemented by

Index

Methods

any

  • Get the Any data type

    Returns AnyDataType

    the Any data type

binary

  • Get the binary data type

    Returns BinaryDataType

    the Binary data type

double

  • Get the double data type

    Returns DoubleDataType

    the Double data type

get

  • get(name: any): DataType<any, any, any> | null
  • Obtain a DataType implementation by type name, topic type, or value class

    Parameters

    • name: any

      the type name as returned by DataType.name, the value or a topic type.

    Returns DataType<any, any, any> | null

    the data type or null if no datatype was found

getByClass

  • getByClass(valueClass: object): DataType<any, any, any>
  • Obtain a DataType implementation by value class.

    For DoubleDataType, the associated value class is Number.

    throws

    an Error if there is no data type for provided class

    Parameters

    • valueClass: object

      the class

    Returns DataType<any, any, any>

    the data type

int64

  • Get the Int64 data type

    Returns Int64DataType

    the Int64 data type

json

  • Get the JSON data type

    Returns JSONDataType

    the JSON data type

recordv2

  • Get the record V2 data type

    Returns RecordV2DataType

    the RecordV2 data type

string

  • Get the string data type

    Returns StringDataType

    the String data type

timeseries

  • Get the timeseries data type

    Type parameters

    • ValueType

    • SourceType

    Parameters

    • valueType: DataType<ValueType, SourceType, any>

      the value type of the timeseries data type

    Returns DataType<Event<ValueType>, Event<SourceType>, Bytes>

    a timeseries data type