@influxdata/influxdb3-client
    Preparing search index...

    Class PointValues

    Point defines values of a single measurement.

    Index

    Constructors

    Methods

    • Gets the boolean field value associated with the specified name. Throws if actual type of field with given name is not boolean. If the field is not present, returns undefined.

      Parameters

      • name: string

        field name

      Returns boolean

      The boolean field value or undefined.

      GetFieldTypeMissmatchError Actual type of field doesn't match boolean type.

    • Get field of numeric type. Throws if actual type of field with given name is not given numeric type. If the field is not present, returns undefined.

      Parameters

      • name: string

        field name

      • type: "float" | "integer" | "uinteger"

        field numeric type

      Returns number

      this

      GetFieldTypeMissmatchError Actual type of field doesn't match provided numeric type.

    • Get field of string type. Throws if actual type of field with given name is not string. If the field is not present, returns undefined.

      Parameters

      • name: string

        field name

      • type: "string"

        field string type

      Returns string

      this

      GetFieldTypeMissmatchError Actual type of field doesn't match provided 'string' type.

    • Get field of boolean type. Throws if actual type of field with given name is not boolean. If the field is not present, returns undefined.

      Parameters

      • name: string

        field name

      • type: "boolean"

        field boolean type

      Returns boolean

      this

      GetFieldTypeMissmatchError Actual type of field doesn't match provided 'boolean' type.

    • Get field without type check. If the field is not present, returns undefined.

      Parameters

      • name: string

        field name

      Returns string | number | boolean

      this

    • Gets the float field value associated with the specified name. Throws if actual type of field with given name is not float. If the field is not present, returns undefined.

      Parameters

      • name: string

        field name

      Returns number

      The float field value or undefined.

      GetFieldTypeMissmatchError Actual type of field doesn't match float type.

    • Gets the integer field value associated with the specified name. Throws if actual type of field with given name is not integer. If the field is not present, returns undefined.

      Parameters

      • name: string

        field name

      Returns number

      The integer field value or undefined.

      GetFieldTypeMissmatchError Actual type of field doesn't match integer type.

    • Get measurement name. Can be undefined if not set. It will return undefined when querying with SQL Query.

      Returns string

      measurement name or undefined

    • Gets the string field value associated with the specified name. Throws if actual type of field with given name is not string. If the field is not present, returns undefined.

      Parameters

      • name: string

        field name

      Returns string

      The string field value or undefined.

      GetFieldTypeMissmatchError Actual type of field doesn't match string type.

    • Gets value of tag with given name. Returns undefined if tag not found.

      Parameters

      • name: string

        tag name

      Returns string

      tag value or undefined

    • Gets the uint field value associated with the specified name. Throws if actual type of field with given name is not uint. If the field is not present, returns undefined.

      Parameters

      • name: string

        field name

      Returns number

      The uint field value or undefined.

      GetFieldTypeMissmatchError Actual type of field doesn't match uint type.

    • Sets point timestamp. Timestamp can be specified as a Date (preferred), number, string or an undefined value. An undefined value instructs to assign a local timestamp using the client's clock. An empty string can be used to let the server assign the timestamp. A number value represents time as a count of time units since epoch, the exact time unit then depends on the precision of the API that writes the point.

      Beware that the current time in nanoseconds can't precisely fit into a JS number, which can hold at most 2^53 integer number. Nanosecond precision numbers are thus supplied as a (base-10) string. An application can also use ES2020 BigInt to represent nanoseconds, BigInt's toString() returns the required high-precision string.

      Note that InfluxDB requires the timestamp to fit into int64 data type.

      Parameters

      • value: string | number | Date

        point time

      Returns PointValues

      this