Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Null

Represents a null[1] value in an Ion stream.

An Ion null differs from a Javascript null in that an instance of an Ion null may have data associated with it.

In particular, Ion nulls have an Ion data type:

 text encoding | Ion data type

====================================== null | IonType.NULL null.null | IonType.NULL null.string | IonType.STRING null.int | IonType.INT null.struct | IonType.STRUCT ...

They can also be annotated:

 customerName::null.string
 dollars::null.decimal
 meters::null.float

[1] http://amzn.github.io/ion-docs/docs/spec.html#null

Hierarchy

  • newClass<ObjectConstructor, this> & Object
    • Null

Implements

Index

Constructors

constructor

  • new Null(ionType?: IonType, annotations?: string[]): Null
  • Constructor.

    Parameters

    • Default value ionType: IonType = IonTypes.NULL

      The Ion data type associated with this null value.

    • Default value annotations: string[] = []

      An optional array of strings to associate with this null value.

    Returns Null

Properties

_ionAnnotations

_ionAnnotations: string[]

_ionType

_ionType: IonType

should

should: Assertion

Static Object

Object: ObjectConstructor

Provides functionality common to all JavaScript objects.

Methods

_setAnnotations

  • _setAnnotations(annotations: string[]): void

_unsupportedOperation

  • _unsupportedOperation<T>(functionName: string): never

_valueEquals

  • _valueEquals(other: any, options?: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true; onlyCompareIon?: undefined | false | true }): boolean
  • Parameters

    • other: any
    • Default value options: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true; onlyCompareIon?: undefined | false | true } = {epsilon: null,ignoreAnnotations: false,ignoreTimestampPrecision: false,onlyCompareIon: true,}
      • Optional epsilon?: number | null
      • Optional ignoreAnnotations?: undefined | false | true
      • Optional ignoreTimestampPrecision?: undefined | false | true
      • Optional onlyCompareIon?: undefined | false | true

    Returns boolean

allFields

  • allFields(): [string, Value[]][]

as

bigIntValue

  • bigIntValue(): JSBI | null

booleanValue

  • booleanValue(): boolean | null

dateValue

  • dateValue(): Date | null

decimalValue

deleteField

  • deleteField(name: string): boolean

elements

equals

  • equals(other: any, options?: { epsilon?: number | null }): boolean
  • Implementation of the dom.Value interface method equals()

    Parameters

    • other: any
    • Default value options: { epsilon?: number | null } = { epsilon: null }
      • Optional epsilon?: number | null

    Returns boolean

fieldNames

  • fieldNames(): string[]

fields

  • fields(): [string, Value][]

get

getAll

getAnnotations

  • getAnnotations(): string[]

getType

hasOwnProperty

  • hasOwnProperty(v: PropertyKey): boolean
  • Determines whether an object has a property with the specified name.

    Parameters

    • v: PropertyKey

      A property name.

    Returns boolean

ionEquals

  • ionEquals(other: Value, options?: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true }): boolean
  • Implementation of the dom.Value interface method ionEquals()

    Parameters

    • other: Value
    • Default value options: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true } = {epsilon: null,ignoreAnnotations: false,ignoreTimestampPrecision: false,}
      • Optional epsilon?: number | null
      • Optional ignoreAnnotations?: undefined | false | true
      • Optional ignoreTimestampPrecision?: undefined | false | true

    Returns boolean

isNull

  • isNull(): boolean

isPrototypeOf

  • isPrototypeOf(v: Object): boolean
  • Determines whether an object exists in another object's prototype chain.

    Parameters

    • v: Object

      Another object whose prototype chain is to be checked.

    Returns boolean

numberValue

  • numberValue(): number | null

propertyIsEnumerable

  • propertyIsEnumerable(v: PropertyKey): boolean
  • Determines whether a specified property is enumerable.

    Parameters

    • v: PropertyKey

      A property name.

    Returns boolean

stringValue

  • stringValue(): string | null

timestampValue

toJSON

  • toJSON(): null
  • Converts this dom.Null to a Javascript null when being serialized with JSON.stringify().

    Returns null

toLocaleString

  • toLocaleString(): string
  • Returns a date converted to a string using the current locale.

    Returns string

toString

  • toString(): string

uInt8ArrayValue

  • uInt8ArrayValue(): Uint8Array | null

valueOf

  • Returns the primitive value of the specified object.

    Returns Object

writeTo

  • writeTo(writer: Writer): void

Static _fromJsValue

  • _fromJsValue(jsValue: any, annotations: string[]): Value

Static _getIonType