Introspection helpers for AshCsvInterchange-using resources.
Covers both directions: csv_import_types/1/csv_import_type/2 for
import entities declared under csv_imports, and
csv_export_types/1/csv_export_type/2 for export entities declared
under csv_exports.
Summary
Functions
Looks up a single CSV export type on a resource by id. Returns
:error if the resource doesn't declare a type with that id.
Returns every CSV export type declared on a resource. Returns []
for a resource that doesn't have the AshCsvInterchange extension.
Looks up a single CSV import type on a resource by id. Returns
:error if the resource doesn't declare a type with that id.
Returns every CSV import type declared on a resource. Returns []
for a resource that doesn't have the AshCsvInterchange extension.
Functions
@spec csv_export_type(module(), atom()) :: {:ok, AshCsvInterchange.Export.Type.t()} | :error
Looks up a single CSV export type on a resource by id. Returns
:error if the resource doesn't declare a type with that id.
@spec csv_export_types(module()) :: [AshCsvInterchange.Export.Type.t()]
Returns every CSV export type declared on a resource. Returns []
for a resource that doesn't have the AshCsvInterchange extension.
@spec csv_import_type(module(), atom()) :: {:ok, AshCsvInterchange.Import.Type.t()} | :error
Looks up a single CSV import type on a resource by id. Returns
:error if the resource doesn't declare a type with that id.
@spec csv_import_types(module()) :: [AshCsvInterchange.Import.Type.t()]
Returns every CSV import type declared on a resource. Returns []
for a resource that doesn't have the AshCsvInterchange extension.