@opscogs/octools
    Preparing search index...

    Function tabularFromModels

    • Return items as a table with schema's fields as columns.

      Columns are the fields in declaration order; a value an item lacks is a null cell. Each kind comes from the field's schema, optional, nullable and default wrappers removed: a date or a z.iso.datetime() that requires an offset is timestamp; z.ipv4() or z.ipv6() is ip, z.cidrv4() or z.cidrv6() is ip_block; z.bigint() is big_integer, its cells decimal strings; a union, enum or literal takes the kind its members share, number for a mix of integers and numbers; anything else is text. An array or object is compact JSON text, as is any other non-string value in a text column, and a non-finite number is null. columnKinds overrides per column, which is how a column becomes big_integer or fqdn; a key that is not a column throws OCToolError. Field descriptions fill column_descriptions when any field has one. truncated and nextCursor describe a capped read, under the envelope's own checks.

      Parameters

      Returns TabularEnvelope