class Flux::AnnotatedCSV

Overview

Extensions to the base CSV class to support a set of annotation rows containing additional column metadat.

Annotations are rows that have been prefixed with a #. These must appear prior to any headers or data.

Defined in:

flux/annotated_csv.cr

Constant Summary

ANNOTATION_CHAR = '#'
DIALECT = {header: true, annotations: ["group", "datatype", "default"], commentPrefix: ANNOTATION_CHAR.to_s, dateTimeFormat: "RFC3339"}

Dialect options for query responses. See: https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions

Constructors

Instance Method Summary

Constructor Detail

def self.new(string_or_io : String | IO, headers = false, strip = false, separator : Char = DEFAULT_SEPARATOR, quote_char : Char = DEFAULT_QUOTE_CHAR) #

[View source]

Instance Method Detail

def annotations(header : String) #

Provides annotations for the passed column.


[View source]
def annotations #

Provides an array containing the annotations for each column.


[View source]