Flux experimental record package

Flux 0.131.0+

The record package is experimental and subject to change at any time. By using this package, you accept the risks of experimental functions.

The Flux experimental record package provides tools for working with Flux records. Import the experimental/record package.

import "experimental/record"

This package is an interim solution

The experimental/record package is an interim solution for influxdata/flux#3461 and will either be removed after this issue is resolved or promoted out of the experimental package if other uses are found.


The experimental/record package provides the following constants:

record.any = {} // polymorphic record with unconstrained property types


Currently, default function parameter values constrain the parameter’s type. record.any is a polymorphic record value that can be used as a default record value when input record property types are not known.

addFoo = (r=record.any) => ({ r with foo: "bar" })

addFoo(r: {})
// Returns {foo: "bar"}

addFoo(r: {baz: "quz", int: 123})
// {baz: "quz", int: 123, foo: "bar"}

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.