View Source DSL: AshCsv.DataLayer

The data layer implementation for AshCsv

csv

Examples

csv do
  file "priv/data/tags.csv"
  create? true
  header? true
  separator '-'
  columns [:id, :name]
end

Options

NameTypeDefaultDocs
fileString.tThe file to read the data from
create?booleanfalseWhether or not the file should be created if it does not exist (this will only happen on writes)
header?booleanfalseIf the csv file has a header that should be skipped
separatorany44The separator to use, defaults to a comma. Pass in a character (not a string).
columnsanyThe order that the attributes appear in the columns of the CSV