PhoenixKitCatalogue.Import.Matcher (PhoenixKitCatalogue v0.10.0)

Copy Markdown View Source

Matches PRO100 rows to existing catalogue items by digits-only SKU. The index is built once over the selected catalogue's items; resolution is O(1).

Summary

Functions

index(items)

resolve(index, id)

@spec resolve(map(), String.t()) ::
  {:matched, PhoenixKitCatalogue.Schemas.Item.t()}
  | {:ambiguous, [PhoenixKitCatalogue.Schemas.Item.t()]}
  | :unmatched