Represents an inet column for Data API tables.

You may use the inet function as a shorthand for creating a new InetAddress.

See the official DataStax documentation for more information.

Implements

Constructors

  • Creates a new InetAddress instance from a vector-like value.

    If you pass a version, the value will be validated as an IPv4 or IPv6 address; otherwise, it'll be validated as either, and the version will be inferred from the value.

    You can set validate to false to bypass any validation if you're confident the value is a valid inet address.

    Parameters

    • address: string

      The address to create the InetAddress from

    • Optional version: null | 4 | 6

      The IP version to validate the address as

    • validate: boolean = true

      Whether to actually validate the address

    Returns InetAddress

    Throws

    TypeError If the address is not a valid IPv4 or IPv6 address

Properties

#raw: string
#version: nullish | 4 | 6

Accessors

Methods